doc/mega-xplained: add JTAG/Atmel-ICE instructions#11209
doc/mega-xplained: add JTAG/Atmel-ICE instructions#11209benpicco merged 1 commit intoRIOT-OS:masterfrom
Conversation
|
addressed comments |
boards/mega-xplained/doc.txt
Outdated
| If using the Atmel-ICE: | ||
|
|
||
| ``` | ||
| make BOARD=mega-xplained PROGRAMMER=atmelice -C examples/hello-world flash |
There was a problem hiding this comment.
The BOARD and PROGRAMMER should be put as environment variable, not a command line overwrite as it is not needed.
There was a problem hiding this comment.
With the current configuration, it does not work: was on an old PR…
avrdude -p m1284p -c atmelice -P /dev/ttyUSB0 -F -U flash:w:/home/harter/work/git/RIOT/tests/bloom_bytes/bin/mega-xplained/tests_bloom_bytes.hex
avrdude: jtag3_open_common(): JTAGICE3/EDBG port names must start with "usb"
avrdude done. Thank you.
/home/harter/work/git/RIOT/tests/bloom_bytes/../../Makefile.include:531: recipe for target 'flash' failed
make: *** [flash] Error 1
make: Leaving directory '/home/harter/work/git/RIOT/tests/bloom_bytes'
PROGRAMMER_FLAGS in the board Makefile.include should be put overwritable:
diff --git a/boards/mega-xplained/Makefile.include b/boards/mega-xplained/Makefile.include
index 9a8d7e5f4..4d7e1b138 100644
--- a/boards/mega-xplained/Makefile.include
+++ b/boards/mega-xplained/Makefile.include
@@ -23,7 +23,7 @@ export DEBUGGER = $(DIST_PATH)/debug.sh $(DEBUGSERVER_FLAGS) $(DIST_PATH) $(DEBU
# PROGRAMMER defaults to the Bus Pirate ISP
export PROGRAMMER ?= buspirate
-export PROGRAMMER_FLAGS = -P /dev/ttyUSB0
+export PROGRAMMER_FLAGS ?= -P /dev/ttyUSB0
OFLAGS += -j .text -j .data
export FFLAGS += -p m1284p -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -F -U flash:w:$(HEXFILE)and then the following works
BOARD=mega-xplained PROGRAMMER=atmelice PROGRAMMER_FLAGS= make -C tests/bloom_bytes/ flash term
There was a problem hiding this comment.
The other solution is to make the PROGRAMMER_FLAGS conditional to PROGRAMMER being buspirate.
There was a problem hiding this comment.
My bad, I was on another branch while testing this one. So no need to change PROGRAMMER_FLAGS.
There was a problem hiding this comment.
ok, so just to clarify: provide BOARD and PROGRAMMER via changing environment variables; no other changes?
cladmi
left a comment
There was a problem hiding this comment.
Please change the commands to flash, configuration should almost never be put in the command line but only in the environment. It also currently has nasty side effect to define variables on the command line.
In place of the picture, you can also just mention to match the JTAG square pin if it helps plugging it right.
Otherwise I now manage to flash with the atmelice with the updated procedure.
Would be good if we manage to have reset for this too, but would be another PR I guess.
c56410e to
26b8cc4
Compare
cladmi
left a comment
There was a problem hiding this comment.
Good for me like this. Please squash.
26b8cc4 to
1ce846f
Compare
1ce846f to
4554b6c
Compare
Adds instrucions for the Atmel-ICE with the JTAG header.
Contribution description
Adds instructions for flashing with the Atmel-ICE with the JTAG header.
Testing procedure
Get an Atmel-ICE and mega-xplained, follow these instructions, and see if it works
Issues/PRs references
Depends on #9818 because there's an image of the setup that needs including