77@ *
88@ * SPDX - License - Identifier: MIT
99@ ************************************************************************** /
10- @
11- @
12- @/ ************************************************************************** /
13- @/ ************************************************************************** /
14- @/ ** * /
15- @/ ** ThreadX Component * /
16- @/ ** * /
17- @/ ** Initialize * /
18- @/ ** * /
19- @/ ************************************************************************** /
20- @/ ************************************************************************** /
21- @
22- @
23- @#define TX_SOURCE_CODE
24- @
25- @
26- @/ * Include necessary system files. * /
27- @
28- @#include "tx_api.h"
29- @#include "tx_initialize.h"
30- @#include "tx_thread.h"
31- @#include "tx_timer.h"
3210
3311 .arm
3412
@@ -39,8 +17,7 @@ SYS_MODE = 0xDF @ Disable IRQ/FIQ SYS mode
3917FIQ_STACK_SIZE = 512 @ FIQ stack size
4018IRQ_STACK_SIZE = 1024 @ IRQ stack size
4119SYS_STACK_SIZE = 1024 @ System stack size
42- @
43- @
20+
4421 . global _tx_thread_system_stack_ptr
4522 . global _tx_initialize_unused_memory
4623 . global _tx_thread_context_save
@@ -50,11 +27,9 @@ SYS_STACK_SIZE = 1024 @ System stack size
5027 . global _sp
5128 . global _stack_bottom
5229
53- @
54- @
5530@/ * Define the 16 - bit Thumb mode veneer for _tx_initialize_low_level for
56- @ applications calling this function from to 16 - bit Thumb mode. * /
57- @
31+ @ * applications calling this function from to 16 - bit Thumb mode.
32+ @ * /
5833 .text
5934 . align 2
6035 .thumb
@@ -68,22 +43,9 @@ $_tx_initialize_low_level:
6843 BL _tx_initialize_low_level @ Call _tx_initialize_low_level function
6944 LDMFD sp ! , {lr} @ Recover saved return address
7045 BX lr @ Return to 16 - bit caller
71- @
7246@
7347 .text
7448 . align 2
75- @/ ************************************************************************** /
76- @/ * * /
77- @/ * FUNCTION RELEASE * /
78- @/ * * /
79- @/ * _tx_initialize_low_level Cortex - R5/GNU * /
80- @/ * 6 . 1 * /
81- @/ * AUTHOR * /
82- @/ * * /
83- @/ * William E. Lamie , Microsoft Corporation * /
84- @/ * * /
85- @/ * DESCRIPTION * /
86- @/ * * /
8749@/ * This function is responsible for any low - level processor * /
8850@/ * initialization , including setting up interrupt vectors , setting * /
8951@/ * up a periodic timer interrupt source , saving the system stack * /
@@ -105,14 +67,7 @@ $_tx_initialize_low_level:
10567@/ * CALLED BY * /
10668@/ * * /
10769@/ * _tx_initialize_kernel_enter ThreadX entry function * /
108- @/ * * /
109- @/ * RELEASE HISTORY * /
110- @/ * * /
111- @/ * DATE NAME DESCRIPTION * /
112- @/ * * /
113- @/ * 09 - 30 - 2020 William E. Lamie Initial Version 6 . 1 * /
114- @/ * * /
115- @/ ************************************************************************** /
70+ @
11671@VOID _tx_initialize_low_level(VOID)
11772@{
11873 . global _tx_initialize_low_level
@@ -126,7 +81,6 @@ _tx_initialize_low_level:
12681 LDR r1 , =_sp @ Get pointer to stack area
12782
12883#ifdef TX_ENABLE_IRQ_NESTING
129- @
13084@ / * Setup the system mode stack for nested interrupt support * /
13185@
13286 LDR r2 , =SYS_STACK_SIZE @ Pickup stack size
@@ -184,7 +138,6 @@ _stack_error_loop:
184138#endif
185139@}
186140@
187- @
188141@/ * Define shells for each of the interrupt vectors. * /
189142@
190143 . global __tx_undefined
@@ -235,7 +188,6 @@ __tx_irq_processing_return:
235188 / * Use Rust to handle the interrupt * /
236189 BL handle_interrupt
237190@
238- @
239191@ / * If interrupt nesting was started earlier , the end of interrupt nesting
240192@ service must be called before returning to _tx_thread_context_restore.
241193@ This routine returns in processing in IRQ mode with interrupts disabled. * /
@@ -246,7 +198,6 @@ __tx_irq_processing_return:
246198@ / * Jump to context restore to restore system context. * /
247199 B _tx_thread_context_restore
248200@
249- @
250201@ / * This is an example of a vectored IRQ handler. * /
251202@
252203@ . global __tx_example_vectored_irq_handler
@@ -269,7 +220,6 @@ __tx_irq_processing_return:
269220@ small code sequences where lr is saved before enabling interrupts and
270221@ restored after interrupts are again disabled. * /
271222@
272- @
273223@ / * Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
274224@ from IRQ mode with interrupts disabled. This routine switches to the
275225@ system mode and returns with IRQ interrupts enabled.
@@ -292,7 +242,6 @@ __tx_irq_processing_return:
292242@ / * Jump to context restore to restore system context. * /
293243@ B _tx_thread_context_restore
294244@
295- @
296245#ifdef TX_ENABLE_FIQ_SUPPORT
297246 . global __tx_fiq_handler
298247 . global __tx_fiq_processing_return
@@ -333,11 +282,7 @@ __tx_fiq_handler:
333282 B __tx_fiq_handler @ FIQ interrupt handler
334283#endif
335284@
336- @
337285BUILD_OPTIONS:
338286 . word _tx_build_options @ Reference to bring in
339287VERSION_ID:
340288 . word _tx_version_id @ Reference to bring in
341-
342-
343-
0 commit comments