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

@@ -2386,30 +2386,6 @@
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>185</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\module_manager\src\tx_thread_stack_error_handler.c</PathWithFileName>
<FilenameWithoutPath>tx_thread_stack_error_handler.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>186</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\module_manager\src\tx_thread_stack_error_notify.c</PathWithFileName>
<FilenameWithoutPath>tx_thread_stack_error_notify.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>187</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@@ -2959,6 +2935,30 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>231</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\common\src\tx_thread_stack_error_handler.c</PathWithFileName>
<FilenameWithoutPath>tx_thread_stack_error_handler.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>232</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\common\src\tx_thread_stack_error_notify.c</PathWithFileName>
<FilenameWithoutPath>tx_thread_stack_error_notify.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>

View File

@@ -1303,16 +1303,6 @@
<FileType>1</FileType>
<FilePath>..\module_manager\src\txe_thread_secure_stack_free.c</FilePath>
</File>
<File>
<FileName>tx_thread_stack_error_handler.c</FileName>
<FileType>1</FileType>
<FilePath>..\module_manager\src\tx_thread_stack_error_handler.c</FilePath>
</File>
<File>
<FileName>tx_thread_stack_error_notify.c</FileName>
<FileType>1</FileType>
<FilePath>..\module_manager\src\tx_thread_stack_error_notify.c</FilePath>
</File>
<File>
<FileName>tx_thread_context_restore.S</FileName>
<FileType>2</FileType>
@@ -1543,6 +1533,16 @@
<FileType>2</FileType>
<FilePath>..\module_manager\src\tx_thread_secure_stack_initialize.S</FilePath>
</File>
<File>
<FileName>tx_thread_stack_error_handler.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\common\src\tx_thread_stack_error_handler.c</FilePath>
</File>
<File>
<FileName>tx_thread_stack_error_notify.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\common\src\tx_thread_stack_error_notify.c</FilePath>
</File>
</Files>
</Group>
<Group>

View File

@@ -51,9 +51,10 @@
/* Define internal secure thread stack function prototypes. */
extern void _tx_thread_secure_stack_initialize(void);
extern UINT _tx_thread_secure_mode_stack_initialize(void);
extern UINT _tx_thread_secure_mode_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size);
extern UINT _tx_thread_secure_mode_stack_free(TX_THREAD *thread_ptr);
extern void _tx_thread_secure_stack_initialize(void);
extern void _tx_thread_secure_stack_context_save(TX_THREAD *thread_ptr);
extern void _tx_thread_secure_stack_context_restore(TX_THREAD *thread_ptr);

View File

@@ -26,7 +26,7 @@
/* APPLICATION INTERFACE DEFINITION RELEASE */
/* */
/* txm_module_port.h Cortex-M23/AC6 */
/* 6.1.6 */
/* 6.1.10 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -41,6 +41,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 04-02-2021 Scott Larson Initial Version 6.1.6 */
/* 01-31-2022 Scott Larson Modified comments and made */
/* heap user-configurable, */
/* resulting in version 6.1.10 */
/* */
/**************************************************************************/
@@ -90,6 +93,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
@@ -106,6 +114,8 @@ The following extensions must also be defined in tx_port.h:
/* Define the properties for this particular module port. */
#define TXM_MODULE_PORT_DISPATCH
#define TXM_MODULE_MEMORY_PROTECTION_ENABLED
#ifdef TXM_MODULE_MEMORY_PROTECTION_ENABLED
@@ -347,6 +357,6 @@ ALIGN_TYPE _txm_module_manager_port_dispatch(TXM_MODULE_INSTANCE *module_instanc
#define TXM_MODULE_MANAGER_VERSION_ID \
CHAR _txm_module_manager_version_id[] = \
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Module Cortex-M23/AC6 Version 6.1.9 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Module Cortex-M23/AC6 Version 6.1.10 *";
#endif

View File

@@ -33,7 +33,7 @@
/* FUNCTION RELEASE */
/* */
/* _txm_module_initialize Cortex-M23/AC6 */
/* 6.1.6 */
/* 6.1.10 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -63,12 +63,17 @@
/* DATE NAME DESCRIPTION */
/* */
/* 04-02-2021 Scott Larson Initial Version 6.1.6 */
/* 01-31-2022 Scott Larson Modified comments, fixed */
/* scatterload, 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 {r0-r3} // Save r0-r3
MOV r0, r8 // Copy r8-r11
MOV r1, r9
MOV r2, r10
@@ -78,7 +83,7 @@ _txm_module_initialize:
MOV r1, lr
PUSH {r0-r1} // Save r12, lr
//B __scatterload // Call ARM func to initialize variables
B __scatterload // Call ARM func to initialize variables
// Override the __rt_exit function.
.global __rt_exit
@@ -94,25 +99,21 @@ __rt_exit:
MOV r11, r3
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
// Override the __rt_entry function.
.global __rt_entry
.type __rt_entry, %function
__rt_entry:
MOV r0,sp
ADDS r0,r0,#40
LDM r0,{r0-r1}
BL __rt_lib_init // Call ARM func to initialize library
POP {r0-r1} // Restore dregs and LR
MOV r12, r0
MOV lr, r1
POP {r0-r7}
MOV r8, r0
MOV r9, r1
MOV r10, r2
MOV r11, r3
POP {r0-r3}
BX lr // Return to caller

View File

@@ -28,12 +28,13 @@
#define TX_SOURCE_CODE
#endif
/* Include necessary system files. */
#include "txm_module.h"
#include "tx_thread.h"
__asm(".global __ARM_use_no_argv");
/* Define the global module entry pointer from the start thread of the module. */
TXM_MODULE_THREAD_ENTRY_INFO *_txm_module_entry_info;
@@ -44,23 +45,27 @@ 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 ARM cstartup code. */
extern VOID _txm_module_initialize(VOID);
/* Define the module's heap and align it to 8 bytes. */
__attribute__((aligned(8))) UCHAR txm_heap[TXM_MODULE_HEAP_SIZE];
/* 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);
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _txm_module_thread_shell_entry Cortex-M23/AC6 */
/* 6.1.6 */
/* _txm_module_thread_shell_entry Cortex-M23/AC6 */
/* 6.1.10 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This function calls the specified entry function of the thread. It */
/* This function calls the specified entry function of the thread. It */
/* also provides a place for the thread's entry function to return. */
/* If the thread returns, this function places the thread in a */
/* "COMPLETED" state. */
@@ -90,6 +95,10 @@ extern VOID _txm_module_initialize(VOID);
/* DATE NAME DESCRIPTION */
/* */
/* 04-02-2021 Scott Larson Initial Version 6.1.6 */
/* 01-31-2022 Scott Larson Modified comments, fixed */
/* scatterload, 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)
@@ -99,13 +108,12 @@ VOID _txm_module_thread_shell_entry(TX_THREAD *thread_ptr, TXM_MODULE_THREAD_EN
VOID (*entry_exit_notify)(TX_THREAD *, UINT);
#endif
/* Determine if this is the start thread. If so, we must prepare the module for
execution. If not, simply skip the C startup code. */
if (thread_info -> txm_module_thread_entry_info_start_thread)
{
/* Initialize the ARM C environment. */
_txm_module_initialize();
/* Initialize the C environment. */
_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;
@@ -169,4 +177,3 @@ VOID _txm_module_thread_shell_entry(TX_THREAD *thread_ptr, TXM_MODULE_THREAD_EN
TX_SAFETY_CRITICAL_EXCEPTION(__FILE__, __LINE__, 0);
#endif
}