From eb9e95e20149db67a5e91f93be94ff7c5a48cb13 Mon Sep 17 00:00:00 2001 From: Robert Rostohar Date: Mon, 20 Nov 2023 07:54:51 +0100 Subject: [PATCH] Add support for CMSIS v6 --- ARM.CMSIS-View.pdsc | 15 +++++++++------ Documentation/Doxygen/gen_doc.sh | 2 +- EventRecorder/Source/EventRecorder.c | 12 +++++++++--- gen_pack.sh | 3 ++- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/ARM.CMSIS-View.pdsc b/ARM.CMSIS-View.pdsc index 6ccf8b9..abd533e 100644 --- a/ARM.CMSIS-View.pdsc +++ b/ARM.CMSIS-View.pdsc @@ -11,12 +11,13 @@ Active development ... Event Recorder: + - Add support for CMSIS v6 - Update conditions to prevent simultaneous selection of CMSIS-View::Event Recorder and Compiler::Event Recorder components - - Update Event Statistic example to support CMSIS-Toolbox v2.0.0 + - Update Event Statistic example to support CMSIS-Toolbox v2 Fault component: - Extend section name for fault information, for easier absolute addressing via the linker script - - Update Fault example for Cortex-M33 (B-U585I-IOT02A) with improved GCC support and add support for building with CMSIS-Toolbox v2.0.0 - - Update Fault example for AVH Cortex-M7 to support CMSIS-Toolbox v2.0.0 + - Update Fault example for Cortex-M33 (B-U585I-IOT02A) with improved GCC support and add support for building with CMSIS-Toolbox v2 + - Update Fault example for AVH Cortex-M7 to support CMSIS-Toolbox v2 @@ -48,18 +49,20 @@ Conditions for Event Recorder - + + Conditions for Fault Record + - + Event Recording via Debug Access Port (DAP) #define RTE_CMSIS_View_EventRecorder @@ -73,7 +76,7 @@ - + Event Recording via Debug Access Port (DAP) and Semihosting #define RTE_CMSIS_View_EventRecorder diff --git a/Documentation/Doxygen/gen_doc.sh b/Documentation/Doxygen/gen_doc.sh index cfd8791..c164d86 100755 --- a/Documentation/Doxygen/gen_doc.sh +++ b/Documentation/Doxygen/gen_doc.sh @@ -67,7 +67,7 @@ find_doxygen "${REQ_DXY_VERSION}" [[ ${RUN_LINKCHECKER} != 0 ]] && find_linkchecker if [ -z "${VERSION_FULL}" ]; then - VERSION_FULL=$(git_describe "v") + VERSION_FULL=$(git_describe "pack/") fi pushd "${DIRNAME}" > /dev/null diff --git a/EventRecorder/Source/EventRecorder.c b/EventRecorder/Source/EventRecorder.c index 8454934..6a45c04 100644 --- a/EventRecorder/Source/EventRecorder.c +++ b/EventRecorder/Source/EventRecorder.c @@ -16,12 +16,18 @@ * limitations under the License. */ -//lint -emacro((923,9078),CoreDebug,DWT,SysTick) "cast from unsigned long to pointer" +//lint -emacro((923,9078),DCB,DWT,SysTick) "cast from unsigned long to pointer" //lint -ecall(534,__disable_irq) "Ignoring return value" #include "RTE_Components.h" #include CMSIS_device_header +/* Support for legacy Debug Control Block Register definitions (CMSIS v5) */ +#if (!defined(DCB) && defined(CoreDebug)) +#define DCB CoreDebug +#define DCB_DEMCR_TRCENA_Msk CoreDebug_DEMCR_TRCENA_Msk +#endif + #if (__CORTEX_M >= 3U) #include #endif @@ -841,8 +847,8 @@ __STATIC_INLINE uint32_t SysTimerIsRunning (void) { __WEAK uint32_t EventRecorderTimerSetup (void) { #if (EVENT_TIMESTAMP_SOURCE == 0) #if ((__CORTEX_M >= 3U) && (__CORTEX_M != 23U)) - CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk; - DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk; + DCB->DEMCR |= DCB_DEMCR_TRCENA_Msk; + DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk; return 1U; #else TimeStamp = 0U; diff --git a/gen_pack.sh b/gen_pack.sh index dd4cc6c..988d596 100755 --- a/gen_pack.sh +++ b/gen_pack.sh @@ -12,7 +12,7 @@ set -o pipefail REQUIRED_GEN_PACK_LIB="0.9.0" # Set default command line arguments -DEFAULT_ARGS=(-c "v") +DEFAULT_ARGS=(-c "pack/") # Pack warehouse directory - destination # Default: ./output @@ -64,6 +64,7 @@ PACK_DELETE_FILES=" # Default: empty # PACKCHK_DEPS=" + ARM.CMSIS.pdsc ARM.V2M_MPS3_SSE_300_BSP.pdsc Keil.B-U585I-IOT02A_BSP.pdsc "