aboutsummaryrefslogtreecommitdiff
path: root/gdb-start
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2016-01-04 23:53:44 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2016-01-04 23:53:44 +0100
commitec96951943921b57ef9c1e9dacb63e34716fe5b7 (patch)
treec85d1c0a063712459ad12144900eb522b39ef7a0 /gdb-start
parentbaedda497d16c5096971eee83a0c467fe663fe6d (diff)
downloadstm32f103-playground-ec96951943921b57ef9c1e9dacb63e34716fe5b7.tar.gz
stm32f103-playground-ec96951943921b57ef9c1e9dacb63e34716fe5b7.tar.bz2
stm32f103-playground-ec96951943921b57ef9c1e9dacb63e34716fe5b7.tar.xz
stm32f103-playground-ec96951943921b57ef9c1e9dacb63e34716fe5b7.zip
o Actually working implementation of context switching.
It is important to remember to update the stack to the task descriptor on every switch!
Diffstat (limited to 'gdb-start')
-rw-r--r--gdb-start37
1 files changed, 27 insertions, 10 deletions
diff --git a/gdb-start b/gdb-start
index eed3cfd..de85932 100644
--- a/gdb-start
+++ b/gdb-start
@@ -8,8 +8,8 @@ define flash_test1
monitor reset halt
set confirm off
- file build/test1.elf
- load build/test1.elf
+ file build/apps/test1/test1.elf
+ load build/apps/test1/test1.elf
set confirm on
monitor stm32f1x.cpu mwb 0x20000000 0x5a 20480
@@ -23,8 +23,8 @@ define flash_serial1
monitor reset halt
set confirm off
- file build/serial1.elf
- load build/serial1.elf
+ file build/apps/serial1/serial1.elf
+ load build/apps/serial1/serial1.elf
set confirm on
monitor stm32f1x.cpu mwb 0x20000000 0x5a 20480
@@ -38,8 +38,8 @@ define flash_serial2
monitor reset halt
set confirm off
- file build/serial2.elf
- load build/serial2.elf
+ file build/apps/serial2/serial2.elf
+ load build/apps/serial2/serial2.elf
set confirm on
monitor stm32f1x.cpu mwb 0x20000000 0x5a 20480
@@ -53,8 +53,8 @@ define flash_os1
monitor reset halt
set confirm off
- file build/os1.elf
- load build/os1.elf
+ file build/apps/os1/os1.elf
+ load build/apps/os1/os1.elf
set confirm on
set $r0=0, $r1=-1, $r2=-2, $r3=-3, $r4=-4, $r5=-5, $r6=-6, $r7=-7, $r8=-8, $r9=-9, $r10=-10, $r11=-11, $r12=-12
@@ -70,8 +70,8 @@ define flash_os2
monitor reset halt
set confirm off
- file build/os2.elf
- load build/os2.elf
+ file build/apps/os2/os2.elf
+ load build/apps/os2/os2.elf
set confirm on
set $r0=0, $r1=-1, $r2=-2, $r3=-3, $r4=-4, $r5=-5, $r6=-6, $r7=-7, $r8=-8, $r9=-9, $r10=-10, $r11=-11, $r12=-12
@@ -96,3 +96,20 @@ define flash_dma1
echo Run this if first run:\n hbreak halt\n
end
+
+define flash_cpp1
+ shell cd build && make cpp1.elf
+
+ monitor arm semihosting enable
+ monitor reset halt
+
+ set confirm off
+ file build/apps/cpp1/cpp1.elf
+ load build/apps/cpp1/cpp1.elf
+ set confirm on
+
+ set $r0=0, $r1=-1, $r2=-2, $r3=-3, $r4=-4, $r5=-5, $r6=-6, $r7=-7, $r8=-8, $r9=-9, $r10=-10, $r11=-11, $r12=-12
+ monitor stm32f1x.cpu mwb 0x20000000 0x5a 20480
+
+ echo Run this if first run:\n hbreak halt\n
+end