summaryrefslogtreecommitdiff
path: root/AT91SAM7S256/armdebug
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-03-21 08:47:34 +0800
committerTat-Chee Wan (USM)2011-03-21 08:47:34 +0800
commit5912236ae6c18ad7c00747407d9e6e6043bcf113 (patch)
treeaf8f5eeafbcee9f24cb660c091d6b2d861735644 /AT91SAM7S256/armdebug
parent1748e17b2672669b41da5d34fdcca44f1e90d6b1 (diff)
parentedc8ef9f05a2f02f401990c8b1b73da538114099 (diff)
Merge branch 'master' of ssh://svc.cs.usm.my/~/gitrepo-bare/armdebug
Diffstat (limited to 'AT91SAM7S256/armdebug')
-rw-r--r--AT91SAM7S256/armdebug/Debugger/debug_stub.S3
-rw-r--r--AT91SAM7S256/armdebug/Host/gdb-commands.txt9
-rw-r--r--AT91SAM7S256/armdebug/SConstruct6
3 files changed, 14 insertions, 4 deletions
diff --git a/AT91SAM7S256/armdebug/Debugger/debug_stub.S b/AT91SAM7S256/armdebug/Debugger/debug_stub.S
index c9b9ad7..839d661 100644
--- a/AT91SAM7S256/armdebug/Debugger/debug_stub.S
+++ b/AT91SAM7S256/armdebug/Debugger/debug_stub.S
@@ -429,8 +429,7 @@ cCommHandleDebug:
bl dbg__copyNxtDebugMsg /* setup Debugger Message Buffers, validate input, CPSR returned in R0 */
/* pop {r1-r3} */ /* restore values */
_dbg_getmode r0 /* Get Debug Mode */
- ldr r1, =TRUE /* Thumb mode can't accept direct constant */
- cmp r0, r1
+ cmp r0, #(TRUE & BYTE0) /* Confine it to Byte size */
/* If Debug Mode is TRUE, this means that we're already running the Debugger */
beq _cCommHandleDebug_cont
diff --git a/AT91SAM7S256/armdebug/Host/gdb-commands.txt b/AT91SAM7S256/armdebug/Host/gdb-commands.txt
index 37b84d5..03f72a1 100644
--- a/AT91SAM7S256/armdebug/Host/gdb-commands.txt
+++ b/AT91SAM7S256/armdebug/Host/gdb-commands.txt
@@ -17,3 +17,12 @@ $p!#91
# Set R1 to 0xAA
$P1=000000AA#60
+
+# Read 16 bytes of Memory from 0x00201d74 (padding bytes after debug_mode + 4 bytes of debug_InUSBBuf)
+$m00201D74,0010#FC
+
+# Write 2 bytes of memory to 0x00201d74 (padding bytes after debug_mode)
+$M00201D74,0002:AA55#03
+
+# Write 2 bytes of memory to 0x00201d74 (padding bytes after debug_mode)
+$M00201D74,0002:9966#F5 \ No newline at end of file
diff --git a/AT91SAM7S256/armdebug/SConstruct b/AT91SAM7S256/armdebug/SConstruct
index b82d2af..4ca6207 100644
--- a/AT91SAM7S256/armdebug/SConstruct
+++ b/AT91SAM7S256/armdebug/SConstruct
@@ -162,11 +162,13 @@ else:
myasflags.append('-Wa,-mcpu=arm7tdmi,-mfpu=softfpa')
mycflags.append('-g')
mycflags.append('-ggdb')
-mycflags.append('-D__NXOS__')
+# Test build for NXT Firmware first
+#mycflags.append('-D__NXOS__')
myasflags.append('-g')
myasflags.append('-ggdb')
-myasflags.append('-D__NXOS__')
+# Test build for NXT Firmware first
+#myasflags.append('-D__NXOS__')
env.Replace(CCFLAGS = mycflags, ASFLAGS = myasflags )