Skip to content

Commit

Permalink
[ext] Update CMSIS Core to v6.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
salkinium committed Oct 6, 2024
1 parent cf48cae commit 1fa748f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
url = https://github.com/modm-io/ros-lib
[submodule "ext/arm/cmsis"]
path = ext/arm/cmsis
url = https://github.com/modm-ext/cmsis-5-partial.git
url = https://github.com/modm-ext/cmsis-core-partial.git
[submodule "ext/gcc/libstdc++"]
path = ext/gcc/libstdc++
url = https://github.com/modm-io/avr-libstdcpp.git
Expand Down
2 changes: 1 addition & 1 deletion ext/arm/cmsis
Submodule cmsis updated 48 files
+11 −3 .github/workflows/update.yml
+392 −0 CMSIS/Core/Include/a-profile/cmsis_armclang_a.h
+386 −0 CMSIS/Core/Include/a-profile/cmsis_clang_a.h
+564 −0 CMSIS/Core/Include/a-profile/cmsis_cp15.h
+223 −0 CMSIS/Core/Include/a-profile/cmsis_gcc_a.h
+558 −0 CMSIS/Core/Include/a-profile/cmsis_iccarm_a.h
+190 −0 CMSIS/Core/Include/a-profile/irq_ctrl.h
+0 −888 CMSIS/Core/Include/cmsis_armcc.h
+192 −988 CMSIS/Core/Include/cmsis_armclang.h
+708 −0 CMSIS/Core/Include/cmsis_clang.h
+45 −36 CMSIS/Core/Include/cmsis_compiler.h
+356 −1,561 CMSIS/Core/Include/cmsis_gcc.h
+16 −11 CMSIS/Core/Include/cmsis_version.h
+0 −2,222 CMSIS/Core/Include/core_armv8mbl.h
+0 −3,209 CMSIS/Core/Include/core_armv8mml.h
+3,000 −0 CMSIS/Core/Include/core_ca.h
+59 −44 CMSIS/Core/Include/core_cm0.h
+69 −53 CMSIS/Core/Include/core_cm0plus.h
+60 −47 CMSIS/Core/Include/core_cm1.h
+320 −364 CMSIS/Core/Include/core_cm23.h
+389 −287 CMSIS/Core/Include/core_cm3.h
+482 −514 CMSIS/Core/Include/core_cm33.h
+481 −513 CMSIS/Core/Include/core_cm35p.h
+433 −325 CMSIS/Core/Include/core_cm4.h
+1,170 −615 CMSIS/Core/Include/core_cm52.h
+794 −716 CMSIS/Core/Include/core_cm55.h
+441 −339 CMSIS/Core/Include/core_cm7.h
+927 −663 CMSIS/Core/Include/core_cm85.h
+78 −53 CMSIS/Core/Include/core_sc000.h
+397 −286 CMSIS/Core/Include/core_sc300.h
+341 −319 CMSIS/Core/Include/core_starmc1.h
+48 −20 CMSIS/Core/Include/m-profile/armv7m_cachel1.h
+7 −9 CMSIS/Core/Include/m-profile/armv7m_mpu.h
+7 −10 CMSIS/Core/Include/m-profile/armv81m_pac.h
+92 −23 CMSIS/Core/Include/m-profile/armv8m_mpu.h
+7 −9 CMSIS/Core/Include/m-profile/armv8m_pmu.h
+818 −0 CMSIS/Core/Include/m-profile/cmsis_armclang_m.h
+824 −0 CMSIS/Core/Include/m-profile/cmsis_clang_m.h
+717 −0 CMSIS/Core/Include/m-profile/cmsis_gcc_m.h
+94 −53 CMSIS/Core/Include/m-profile/cmsis_iccarm_m.h
+305 −782 CMSIS/Core/Include/m-profile/cmsis_tiarmclang_m.h
+161 −0 CMSIS/Core/Include/r-profile/cmsis_armclang_r.h
+161 −0 CMSIS/Core/Include/r-profile/cmsis_clang_r.h
+163 −0 CMSIS/Core/Include/r-profile/cmsis_gcc_r.h
+5 −7 CMSIS/Core/Include/tz_context.h
+201 −0 LICENSE
+3 −3 README.md
+9 −7 update.py
7 changes: 4 additions & 3 deletions ext/arm/core.lb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ def build(env):
env.copy("cmsis/CMSIS/Core/Include/cmsis_version.h", "cmsis_version.h")
env.copy("cmsis/CMSIS/Core/Include/cmsis_compiler.h", "cmsis_compiler.h")
env.copy("cmsis/CMSIS/Core/Include/cmsis_gcc.h", "cmsis_gcc.h")
env.copy("cmsis/CMSIS/Core/Include/m-profile/cmsis_gcc_m.h", "m-profile/cmsis_gcc_m.h")
if "33" in core:
env.copy("cmsis/CMSIS/Core/Include/mpu_armv8.h", "mpu_armv8.h")
env.copy("cmsis/CMSIS/Core/Include/m-profile/armv8m_mpu.h", "m-profile/armv8m_mpu.h")
elif core != "0": # 0+ has MPU support though!
env.copy("cmsis/CMSIS/Core/Include/mpu_armv7.h", "mpu_armv7.h")
env.copy("cmsis/CMSIS/Core/Include/m-profile/armv7m_mpu.h", "m-profile/armv7m_mpu.h")
if core == "7":
env.copy("cmsis/CMSIS/Core/Include/cachel1_armv7.h", "cachel1_armv7.h")
env.copy("cmsis/CMSIS/Core/Include/m-profile/armv7m_cachel1.h", "m-profile/armv7m_cachel1.h")

env.collect(":build:path.include", "modm/ext/cmsis/core")
4 changes: 2 additions & 2 deletions src/modm/platform/core/cortex/delay.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ modm_dwt_enable(void)
// Enable Tracing Debug Unit
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
%% if core.startswith("cortex-m7")
// Unlock key
DWT->LAR = 0xC5ACCE55;
// Unlock key in LAR register
*(uint32_t*)(DWT_BASE+0xFB0) = 0xC5ACCE55;
%% endif
// Reset counter to 0
DWT->CYCCNT = 0;
Expand Down
14 changes: 5 additions & 9 deletions src/modm/platform/uart/cortex/itm.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,25 @@ void
Itm::enable(uint8_t prescaler)
{
// Trace Port Interface Selected Pin Protocol Register
TPI->ACPR = prescaler;
TPIU->ACPR = prescaler;

// Trace Port Interface Selected Pin Protocol Register
TPI->SPPR = (0b10 << TPI_SPPR_TXMODE_Pos);
TPIU->SPPR = (0b10 << TPIU_SPPR_TXMODE_Pos);

// Trace Port Interface Formatter and Flush Control Register
TPI->FFCR = (1 << TPI_FFCR_TrigIn_Pos);
TPIU->FFCR = (1 << TPIU_FFCR_TrigIn_Pos);

// Trace Port Interface Current Parallel Port Size Register
TPI->CSPSR = 0b1;
TPIU->CSPSR = 0b1;

// Enable write access to ITM registers
ITM->LAR = 0xC5ACCE55;
*(uint32_t*)(ITM_BASE+0xFB0) = 0xC5ACCE55;

// Trace Privilege Register
ITM->TPR = 0;

// Trace Control Register
%% if target.platform == "stm32" and target.family in ["l5", "u5"]
ITM->TCR = (1 << ITM_TCR_TRACEBUSID_Pos) |
%% else
ITM->TCR = (1 << ITM_TCR_TraceBusID_Pos) |
%% endif
(1 << ITM_TCR_DWTENA_Pos) |
(1 << ITM_TCR_ITMENA_Pos);

Expand Down

0 comments on commit 1fa748f

Please sign in to comment.