Release 6.1.9
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
/* PORT SPECIFIC C INFORMATION RELEASE */
|
||||
/* */
|
||||
/* tx_port.h Cortex-M23/IAR */
|
||||
/* 6.1.7 */
|
||||
/* 6.1.9 */
|
||||
/* */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
@@ -55,6 +55,9 @@
|
||||
/* 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 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
@@ -94,12 +97,6 @@ typedef short SHORT;
|
||||
typedef unsigned short USHORT;
|
||||
#define ULONG64_DEFINED
|
||||
|
||||
/* This port overrides tx_thread_stack_error_notify with an architecture specific version */
|
||||
#define TX_PORT_THREAD_STACK_ERROR_NOTIFY
|
||||
|
||||
/* This port overrides tx_thread_stack_error_handler with an architecture specific version */
|
||||
#define TX_PORT_THREAD_STACK_ERROR_HANDLER
|
||||
|
||||
/* Function prototypes for this port. */
|
||||
struct TX_THREAD_STRUCT;
|
||||
UINT _txe_thread_secure_stack_allocate(struct TX_THREAD_STRUCT *thread_ptr, ULONG stack_size);
|
||||
@@ -107,17 +104,9 @@ UINT _txe_thread_secure_stack_free(struct TX_THREAD_STRUCT *thread_ptr);
|
||||
UINT _tx_thread_secure_stack_allocate(struct TX_THREAD_STRUCT *tx_thread, ULONG stack_size);
|
||||
UINT _tx_thread_secure_stack_free(struct TX_THREAD_STRUCT *tx_thread);
|
||||
|
||||
/* This hardware has stack checking that we take advantage of - do NOT define. */
|
||||
#ifdef TX_ENABLE_STACK_CHECKING
|
||||
#error "Do not define TX_ENABLE_STACK_CHECKING"
|
||||
#endif
|
||||
/* This port handles stack errors. */
|
||||
#define TX_PORT_THREAD_STACK_ERROR_HANDLING
|
||||
|
||||
/* If user does not want to terminate thread on stack overflow,
|
||||
#define the TX_THREAD_NO_TERMINATE_STACK_ERROR symbol.
|
||||
The thread will be rescheduled and continue to cause the exception.
|
||||
It is suggested user code handle this by registering a notification with the
|
||||
tx_thread_stack_error_notify function. */
|
||||
/*#define TX_THREAD_NO_TERMINATE_STACK_ERROR */
|
||||
|
||||
/* Define the system API mappings based on the error checking
|
||||
selected by the user. Note: this section is only applicable to
|
||||
@@ -441,7 +430,7 @@ __istate_t interrupt_save;
|
||||
|
||||
#ifdef TX_THREAD_INIT
|
||||
CHAR _tx_version_id[] =
|
||||
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Cortex-M23/IAR Version 6.1.7 *";
|
||||
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Cortex-M23/IAR Version 6.1.9 *";
|
||||
#else
|
||||
#ifdef TX_MISRA_ENABLE
|
||||
extern CHAR _tx_version_id[100];
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
/* */
|
||||
/* This software is licensed under the Microsoft Software License */
|
||||
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
/* and in the root directory of this software. */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** Thread */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
#define TX_SOURCE_CODE
|
||||
|
||||
|
||||
/* Include necessary system files. */
|
||||
|
||||
#include "tx_api.h"
|
||||
#include "tx_thread.h"
|
||||
|
||||
/* 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);
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _tx_thread_stack_error_handler Cortex-M23 */
|
||||
/* 6.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* Scott Larson, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This function processes stack errors detected during run-time. */
|
||||
/* */
|
||||
/* */
|
||||
/* INPUT */
|
||||
/* */
|
||||
/* thread_ptr Thread control block pointer */
|
||||
/* */
|
||||
/* OUTPUT */
|
||||
/* */
|
||||
/* None */
|
||||
/* */
|
||||
/* CALLS */
|
||||
/* */
|
||||
/* _tx_thread_terminate */
|
||||
/* _tx_thread_application_stack_error_handler */
|
||||
/* */
|
||||
/* CALLED BY */
|
||||
/* */
|
||||
/* ThreadX internal code */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 09-30-2020 Scott Larson Initial Version 6.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
VOID _tx_thread_stack_error_handler(TX_THREAD *thread_ptr)
|
||||
{
|
||||
#ifndef TX_THREAD_NO_TERMINATE_STACK_ERROR
|
||||
/* Is there a thread? */
|
||||
if (thread_ptr)
|
||||
{
|
||||
/* Terminate the current thread. */
|
||||
_tx_thread_terminate(_tx_thread_current_ptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Determine if the application has registered an error handler. */
|
||||
if (_tx_thread_application_stack_error_handler != TX_NULL)
|
||||
{
|
||||
/* Yes, an error handler is present, simply call the application error handler. */
|
||||
(_tx_thread_application_stack_error_handler)(thread_ptr);
|
||||
}
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
/* */
|
||||
/* This software is licensed under the Microsoft Software License */
|
||||
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
/* and in the root directory of this software. */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** Thread */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
#define TX_SOURCE_CODE
|
||||
|
||||
|
||||
/* Include necessary system files. */
|
||||
|
||||
#include "tx_api.h"
|
||||
#include "tx_thread.h"
|
||||
#include "tx_trace.h"
|
||||
|
||||
extern VOID (*_tx_thread_application_stack_error_handler)(TX_THREAD *thread_ptr);
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _tx_thread_stack_error_notify Cortex-M23 */
|
||||
/* 6.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* Scott Larson, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This function registers an application stack error handler. If */
|
||||
/* ThreadX detects a stack error, this application handler is called. */
|
||||
/* */
|
||||
/* */
|
||||
/* INPUT */
|
||||
/* */
|
||||
/* stack_error_handler Pointer to stack error */
|
||||
/* handler, TX_NULL to disable */
|
||||
/* */
|
||||
/* OUTPUT */
|
||||
/* */
|
||||
/* status Service return status */
|
||||
/* */
|
||||
/* CALLS */
|
||||
/* */
|
||||
/* None */
|
||||
/* */
|
||||
/* CALLED BY */
|
||||
/* */
|
||||
/* Application Code */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 09-30-2020 Scott Larson Initial Version 6.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_thread_stack_error_notify(VOID (*stack_error_handler)(TX_THREAD *thread_ptr))
|
||||
{
|
||||
|
||||
TX_INTERRUPT_SAVE_AREA
|
||||
|
||||
/* Disable interrupts. */
|
||||
TX_DISABLE
|
||||
|
||||
/* Make entry in event log. */
|
||||
TX_TRACE_IN_LINE_INSERT(TX_TRACE_THREAD_STACK_ERROR_NOTIFY, 0, 0, 0, 0, TX_TRACE_THREAD_EVENTS)
|
||||
|
||||
/* Make entry in event log. */
|
||||
TX_EL_THREAD_STACK_ERROR_NOTIFY_INSERT
|
||||
|
||||
/* Setup global thread stack error handler. */
|
||||
_tx_thread_application_stack_error_handler = stack_error_handler;
|
||||
|
||||
/* Restore interrupts. */
|
||||
TX_RESTORE
|
||||
|
||||
/* Return success to caller. */
|
||||
return(TX_SUCCESS);
|
||||
}
|
||||
Reference in New Issue
Block a user