Skip to content

Commit

Permalink
Add support for CMSIS v6
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertRostohar committed Nov 20, 2023
1 parent 46273dd commit eb9e95e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
15 changes: 9 additions & 6 deletions ARM.CMSIS-View.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
<release version="0.0.0">
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
</release>
</releases>

Expand Down Expand Up @@ -48,18 +49,20 @@
<condition id="EventRecorder">
<description>Conditions for Event Recorder</description>
<require condition="Cortex-M Device"/>
<deny Cclass="Compiler" Cgroup="Event Recorder"/>
<require Cclass="CMSIS" Cgroup="CORE"/>
<deny Cclass="Compiler" Cgroup="Event Recorder"/>
</condition>
<condition id="FaultRecord">
<description>Conditions for Fault Record</description>
<require condition="Cortex-M Device"/>
<require Cclass="CMSIS" Cgroup="CORE"/>
<require Cclass="CMSIS-View" Cgroup="Fault" Csub="Storage"/>
<require Cclass="CMSIS-View" Cgroup="Event Recorder"/>
</condition>
</conditions>

<components>
<component Cclass="CMSIS-View" Cgroup="Event Recorder" Cvariant="DAP" Cversion="1.5.2" condition="EventRecorder">
<component Cclass="CMSIS-View" Cgroup="Event Recorder" Cvariant="DAP" Cversion="1.5.3" condition="EventRecorder">
<description>Event Recording via Debug Access Port (DAP)</description>
<RTE_Components_h>
#define RTE_CMSIS_View_EventRecorder
Expand All @@ -73,7 +76,7 @@
<file category="other" name="EventRecorder/EventRecorder.scvd"/>
</files>
</component>
<component Cclass="CMSIS-View" Cgroup="Event Recorder" Cvariant="Semihosting" Cversion="1.5.2" condition="EventRecorder">
<component Cclass="CMSIS-View" Cgroup="Event Recorder" Cvariant="Semihosting" Cversion="1.5.3" condition="EventRecorder">
<description>Event Recording via Debug Access Port (DAP) and Semihosting</description>
<RTE_Components_h>
#define RTE_CMSIS_View_EventRecorder
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Doxygen/gen_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 9 additions & 3 deletions EventRecorder/Source/EventRecorder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stdatomic.h>
#endif
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion gen_pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
"
Expand Down

0 comments on commit eb9e95e

Please sign in to comment.