[riot-notifications] [RIOT-OS/RIOT] boards: Add JLink support for samr21-xpro board (#7582)

Michael Andersen notifications at github.com
Fri Sep 8 02:12:14 CEST 2017


immesys requested changes on this pull request.



> +
+  include $(RIOTMAKE)/boards/sam0.inc.mk
+else ifeq ($(PROGRAMMER),jlink)
+  export DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh
+  export DEBUGSERVER = JLinkGDBServer -device atsamr21e18a -if swd
+  export RESET = $(RIOTBOARD)/$(BOARD)/dist/reset.sh
+
+  export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
+  export FFLAGS  = $(BINDIR) $(HEXFILE)
+
+  export OFLAGS    = -O binary --gap-fill 0xff
+  export HEXFILE = $(ELFFILE:.elf=.bin)
+  export DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE)
+  export RESET_FLAGS = $(BINDIR)
+
+  export TERMPROG = JLinkRTTClient

Using rtt_stdio is separate from flashing with JTAG, you may want to flash with JTAG but still use the serial for stdio

> @@ -0,0 +1,18 @@
+#!/bin/sh
+
+# This script resets a CC2538SF53 target using JLink called

I think at some point there was talk of having a central standard version of these scripts, if so, you should use those and if not you should update this comment to not say CC2538

> +
+  include $(RIOTMAKE)/boards/sam0.inc.mk
+else ifeq ($(PROGRAMMER),jlink)
+  export DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh
+  export DEBUGSERVER = JLinkGDBServer -device atsamr21e18a -if swd
+  export RESET = $(RIOTBOARD)/$(BOARD)/dist/reset.sh
+
+  export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
+  export FFLAGS  = $(BINDIR) $(HEXFILE)
+
+  export OFLAGS    = -O binary --gap-fill 0xff
+  export HEXFILE = $(ELFFILE:.elf=.bin)
+  export DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE)
+  export RESET_FLAGS = $(BINDIR)
+
+  export TERMPROG = JLinkRTTClient

Maybe put a guard here and only specify this if rtt_stdio is in USE_MODULEs

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/7582#pullrequestreview-61385542
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20170908/ca430a1d/attachment.html>


More information about the notifications mailing list