Flash bootloader with JTAG ICE3 over JTAG immediately disables JTAG and fails
- Dominant language
- Java
- Stars
- 14.6k
- Forks
- 7k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
selecting "JTAGICE3 JTAG" in the arduino IDE and trying to burn the bootloader results in an error.
I tryed to discuss it on the forum before i came here but with little response:
https://forum.arduino.cc/index.php?topic=639257.0
Expected behaviour:
IDE flashes bootloader over the JTAG interface using JTAGICE3
Actual Behaviour:
IDE disables JTAG on the Target and fails flashing the bootloader
All the details are on the forum, to make it short, the first thing the ide does is set the fused to:
avrdude: writing lock (1 bytes): 0x3F
avrdude: writing efuse (1 bytes): 0xcb
avrdude: writing hfuse (1 bytes): 0xd8
avrdude: writing lfuse (1 bytes): 0xff
Which disables JTAG. Since this happens right at the start it obviously can't continue flashing the bootloader.
What i suggest is leaving the JTAG fuse active when starting the "burn bootloader" process and possibly not disabling it at all.
Contributor guide
Research direction
Start by reproducing the Arduino IDE "Burn Bootloader" flow with a JTAGICE3 over JTAG and capture the avrdude fuse-writing sequence shown in the report. Trace where the IDE selects the JTAGICE3 programmer and applies the lock, extended, high, and low fuse values; done means the bootloader is flashed without disabling JTAG first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools, embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100