changeset 20:35cf31794a42

Fix debug & load targets for BMP.
author Daniel O'Connor <darius@dons.net.au>
date Wed, 14 Nov 2012 12:47:10 +1030
parents d078651f5353
children bd8e2cf04034
files BSDmakefile BSDmakefile.arm
diffstat 2 files changed, 6 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/BSDmakefile	Wed Nov 14 12:46:48 2012 +1030
+++ b/BSDmakefile	Wed Nov 14 12:47:10 2012 +1030
@@ -68,13 +68,6 @@
 .PATH:		${COREDIR}
 .PATH:		${SYSDIR}
 
-debug:
-	${GDB} --eval-command="target remote 127.0.0.1:61234" ${PROG}.elf
-
-load:
-	${GDB} --eval-command="target remote 127.0.0.1:61234" --eval-command "load" ${PROG}.elf
-
-png2bin:	png2bin.c
-	gcc ${.CURDIR}/png2bin.c -o ${.OBJDIR}/png2bin -O2 -Wall -I/opt/local/include -L/opt/local/lib -lpng
+DBGPORT=	/dev/cu.usbmodemfa1421
 
 .include "${.CURDIR}/BSDmakefile.arm"
--- a/BSDmakefile.arm	Wed Nov 14 12:46:48 2012 +1030
+++ b/BSDmakefile.arm	Wed Nov 14 12:47:10 2012 +1030
@@ -38,8 +38,11 @@
 clean:
 		${RM} ${PROG}.hex ${PROG}.out ${PROG}.elf ${PROG}.bin ${PROG}.map ${OBJS} ${OBJS:S/.o/.lst/} ${PROG}.dmp
 
-prog:
-		/Users/darius/projects/stm32loader/stm32loader.py -p /dev/tty.usbserial -b 115200 -e -w -v ${PROG}.bin
+debug:
+		${GDB} -ex "target extended-remote ${DBGPORT}" -ex "attach 1" ${PROG}.elf
+
+load:
+		${GDB} -ex "target extended-remote ${DBGPORT}" -ex "attach 1" -ex "load" -ex "detach" -ex "quit" ${PROG}.elf
 
 #########################
 #;;; Local Variables: ***