Release 6.1.10

This commit is contained in:
Yuxin Zhou
2022-01-29 00:24:03 +00:00
parent b216ceb25e
commit f7f0957188
3111 changed files with 495735 additions and 40800 deletions

View File

@@ -1,5 +0,0 @@
@ECHO OFF
CALL clean.bat
CALL setenv.bat
CALL initws.bat
CALL build.bat

View File

@@ -1,24 +0,0 @@
@ECHO OFF
ECHO Build starting...
SETLOCAL ENABLEEXTENSIONS
IF DEFINED ARMDSIDEC GOTO IARBUILD_DEFINED
ECHO ERROR: please set ARMDSIDEC to the path of the ARM Developer Studio eclipsec.exe program
EXIT /B 2
:IARBUILD_DEFINED
IF EXIST %ARMDSIDEC% GOTO ARMDSIDEC_FOUND
ECHO ERROR: the command ARMDSIDEC doesn't exist: %ARMDSIDEC%
EXIT /B 2
:ARMDSIDEC_FOUND
%ARMDSIDEC% -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data .\workspace -build all
IF %ERRORLEVEL% EQU 0 GOTO BUILD_OK
ECHO ERROR: build failed.
EXIT /B 1
:BUILD_OK
ECHO Build completed without errors.
EXIT /B 0

View File

@@ -1,4 +0,0 @@
@ECHO OFF
ECHO Cleaning...
RMDIR /Q /S workspace
ECHO Done.

View File

@@ -1,14 +0,0 @@
@ECHO OFF
ECHO Initializing the workspace...
SETLOCAL ENABLEEXTENSIONS
%ARMDSIDEC% -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data .\workspace -import .\tx -import .\txm -import .\sample_threadx -import .\sample_threadx_module -import .\sample_threadx_module_manager
IF %ERRORLEVEL% EQU 0 GOTO WS_INITIALIZED
ECHO ERROR: failed to initialize the workspace
EXIT /B 2
:WS_INITIALIZED
echo Workspace initialized.
EXIT /B 0

View File

@@ -1,16 +0,0 @@
@ECHO OFF
SET ARMDSDIR="C:\Program Files\Arm\Development Studio 2020.0"
IF EXIST %ARMDSDIR% GOTO FOUND_ARMDS
ECHO ARM Development Studio not found.
EXIT /B 1
:FOUND_ARMDS
SET ARMDSIDEC=%ARMDSDIR%\bin\armds_idec.exe
IF EXIST %ARMDSIDEC% GOTO FOUND_ARMDS_IDEC
ECHO armds_idec.exe not found.
EXIT /B 1
:FOUND_ARMDS_IDEC
ECHO armds_idec.exe found at %ARMDSIDEC%
EXIT /B 0

View File

@@ -26,7 +26,7 @@
/* APPLICATION INTERFACE DEFINITION RELEASE */
/* */
/* txm_module_port.h Cortex-M4/AC6 */
/* 6.1.9 */
/* 6.1.10 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -41,6 +41,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 10-15-2021 Scott Larson Initial Version 6.1.9 */
/* 01-31-2022 Scott Larson Modified comments and made */
/* heap user-configurable, */
/* resulting in version 6.1.10 */
/* */
/**************************************************************************/
@@ -91,6 +94,11 @@ The following extensions must also be defined in tx_port.h:
VOID (*tx_timer_module_expiration_function)(ULONG id);
*/
/* Users can define the module heap size. */
#ifndef TXM_MODULE_HEAP_SIZE
#define TXM_MODULE_HEAP_SIZE 512
#endif
/* Define the kernel stack size for a module thread. */
#ifndef TXM_MODULE_KERNEL_STACK_SIZE
#define TXM_MODULE_KERNEL_STACK_SIZE 768

View File

@@ -33,7 +33,7 @@
/* FUNCTION RELEASE */
/* */
/* _txm_module_initialize Cortex-M4/AC6 */
/* 6.1.9 */
/* 6.1.10 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -63,14 +63,17 @@
/* DATE NAME DESCRIPTION */
/* */
/* 10-15-2021 Scott Larson Initial Version 6.1.9 */
/* 01-31-2022 Scott Larson Modified comments and made */
/* heap user configurable, */
/* resulting in version 6.1.10 */
/* */
/**************************************************************************/
// VOID _txm_module_initialize(VOID)
.global _txm_module_initialize
.thumb_func
_txm_module_initialize:
PUSH {r4-r12,lr} // Save dregs and LR
//B __scatterload // Call ARM func to initialize variables
PUSH {r0-r12,lr} // Save dregs and LR
B __scatterload // Call ARM func to initialize variables
// Override the __rt_exit function.
.global __rt_exit
@@ -79,25 +82,10 @@ __rt_exit:
POP {r4-r12,lr} // Restore dregs and LR
BX lr // Return to caller
#define TXM_MODULE_HEAP_SIZE 512
// returns heap start address in R0
// returns heap end address in R2
// does not touch SP, it is already set up before the module runs
.global __user_setup_stackheap
.thumb_func
__user_setup_stackheap:
LDR r1, _txm_heap // load heap offset
MOV r2, TXM_MODULE_HEAP_SIZE // load heap size
ADD r2, r2, r0 // calculate heap end address
BX lr
// dummy main function
.global main
.thumb_func
main:
BX lr
.align 8
_txm_heap:
.zero TXM_MODULE_HEAP_SIZE
.global __rt_entry
.type __rt_entry, %function
__rt_entry:
POP {r0-r1}
BL __rt_lib_init
POP {r2-r12,lr} // Restore dregs and LR
BX lr // Return to caller

View File

@@ -44,10 +44,12 @@ TXM_MODULE_THREAD_ENTRY_INFO *_txm_module_entry_info;
ULONG (*_txm_module_kernel_call_dispatcher)(ULONG kernel_request, ULONG param_1, ULONG param_2, ULONG param3);
/* Define the startup code that clears the uninitialized global data and sets up the
preset global variables. */
/* Define the module's heap and align it to 8 bytes. */
__attribute__((aligned(8))) UCHAR txm_heap[TXM_MODULE_HEAP_SIZE];
extern VOID _txm_module_initialize(VOID);
/* Use our asm routine that calls the ARM code to initialize data and heap. */
extern VOID _txm_module_initialize(VOID *heap_base, VOID *heap_top);
/**************************************************************************/
@@ -55,7 +57,7 @@ extern VOID _txm_module_initialize(VOID);
/* FUNCTION RELEASE */
/* */
/* _txm_module_thread_shell_entry Cortex-M4/AC6 */
/* 6.1.9 */
/* 6.1.10 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -92,6 +94,9 @@ extern VOID _txm_module_initialize(VOID);
/* DATE NAME DESCRIPTION */
/* */
/* 10-15-2021 Scott Larson Initial Version 6.1.9 */
/* 01-31-2022 Scott Larson Modified comments and made */
/* heap user configurable, */
/* resulting in version 6.1.10 */
/* */
/**************************************************************************/
VOID _txm_module_thread_shell_entry(TX_THREAD *thread_ptr, TXM_MODULE_THREAD_ENTRY_INFO *thread_info)
@@ -107,7 +112,7 @@ VOID _txm_module_thread_shell_entry(TX_THREAD *thread_ptr, TXM_MODULE_THREAD_EN
if (thread_info -> txm_module_thread_entry_info_start_thread)
{
/* Initialize the C environment. */
_txm_module_initialize();
_txm_module_initialize(&txm_heap[0], &txm_heap[TXM_MODULE_HEAP_SIZE-1]);
/* Save the entry info pointer, for later use. */
_txm_module_entry_info = thread_info;

View File

@@ -38,7 +38,7 @@
/* FUNCTION RELEASE */
/* */
/* _tx_timer_interrupt Cortex-M4/AC6 */
/* 6.1.7 */
/* 6.1.10 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -71,11 +71,15 @@
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
/* 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 */
/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
#ifndef TX_NO_TIMER
.global _tx_timer_interrupt
.thumb_func
_tx_timer_interrupt:
@@ -248,3 +252,4 @@ __tx_timer_nothing_expired:
DSB // Complete all memory access
BX lr // Return to caller
// }
#endif