soc: boards: Enable Segger RTT/SystemView on mimxrt1170_evk_cm7
Adds a devicetree chosen node to the mimxrt1170_evk_cm7 board to link Segger RTT and SystemView sections in DTCM by default. Enables the AHB clock while the CM7 is sleeping to allow debug access to the TCM. Note that automatic RTT control block detection may not search the DTCM address region, therefore you may need to manually set the RTT control block address or search range in the Segger host tools (SystemView or RTT Viewer). For example, $ JLinkRTTViewer -ra 0x20000000 Tested with: - samples/subsys/shell/shell_module/ - samples/subsys/tracing/ Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
72cc39d843
commit
ae056a7300
2 changed files with 8 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
zephyr,sram = &sdram0;
|
zephyr,sram = &sdram0;
|
||||||
|
zephyr,dtcm = &dtcm;
|
||||||
zephyr,console = &lpuart1;
|
zephyr,console = &lpuart1;
|
||||||
zephyr,shell-uart = &lpuart1;
|
zephyr,shell-uart = &lpuart1;
|
||||||
zephyr,can-primary = &flexcan3;
|
zephyr,can-primary = &flexcan3;
|
||||||
|
|
|
@ -349,6 +349,13 @@ static ALWAYS_INLINE void clock_init(void)
|
||||||
GPC_CM_SetNextCpuMode(GPC_CPU_MODE_CTRL_1, kGPC_RunMode);
|
GPC_CM_SetNextCpuMode(GPC_CPU_MODE_CTRL_1, kGPC_RunMode);
|
||||||
GPC_CM_EnableCpuSleepHold(GPC_CPU_MODE_CTRL_0, false);
|
GPC_CM_EnableCpuSleepHold(GPC_CPU_MODE_CTRL_0, false);
|
||||||
GPC_CM_EnableCpuSleepHold(GPC_CPU_MODE_CTRL_1, false);
|
GPC_CM_EnableCpuSleepHold(GPC_CPU_MODE_CTRL_1, false);
|
||||||
|
|
||||||
|
#ifdef CONFIG_SEGGER_RTT_SECTION_DTCM
|
||||||
|
/* Enable the AHB clock while the CM7 is sleeping to allow debug access
|
||||||
|
* to TCM
|
||||||
|
*/
|
||||||
|
IOMUXC_GPR->GPR16 |= IOMUXC_GPR_GPR16_CM7_FORCE_HCLK_EN_MASK;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue