Browse Source
Merge pull request #28 from h4yn0nnym0u5e/bugfix/mask-ITCM-for-T3
Fix issue with use on Teensy 3.x
master
Fernando Trias
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
5 additions and
3 deletions
-
library.properties
-
src/TeensyDebug.cpp
|
|
@ -1,5 +1,5 @@ |
|
|
|
name=TeensyDebug |
|
|
|
version=0.0.3 |
|
|
|
version=0.0.4 |
|
|
|
author=Fernando Trias |
|
|
|
maintainer=Fernando Trias |
|
|
|
sentence=Debugging using GDB on PJRC Teensy. |
|
|
|
|
|
@ -365,7 +365,7 @@ int debug_isBreakpoint(void *p) { |
|
|
|
} |
|
|
|
|
|
|
|
/*
|
|
|
|
* Breakpint handlers |
|
|
|
* Breakpoint handlers |
|
|
|
* |
|
|
|
* During a breakpoint: |
|
|
|
* 1. The interrupt is initiated and registers are saved. |
|
|
@ -1179,7 +1179,8 @@ void debug_init() { |
|
|
|
// dumpmem(xtable, 32);
|
|
|
|
#endif |
|
|
|
|
|
|
|
// Recent startup.c has disabled writes to ITCM - re-enable those
|
|
|
|
#if defined(__IMXRT1062__) // doesn't apply to Teensy 3.x
|
|
|
|
// Recent teensy4/startup.c has disabled writes to ITCM - re-enable those
|
|
|
|
// Various macros cribbed from there...
|
|
|
|
#define READWRITE SCB_MPU_RASR_AP(3) |
|
|
|
#define MEM_NOCACHE SCB_MPU_RASR_TEX(1) |
|
|
@ -1187,6 +1188,7 @@ void debug_init() { |
|
|
|
#define REGION(n) (SCB_MPU_RBAR_REGION(n) | SCB_MPU_RBAR_VALID) |
|
|
|
SCB_MPU_RBAR = 0x00000000 | REGION(1); // *** assumed *** ITCM
|
|
|
|
SCB_MPU_RASR = MEM_NOCACHE | READWRITE | SIZE_512K; |
|
|
|
#endif // defined(__IMXRT1062__)
|
|
|
|
|
|
|
|
debug_trace = 1; |
|
|
|
|
|
|
|