Hi All,
To get the debugging function, I bought some Zero boards back around the time of IDE 2.0.x, but never found debugging stable and gave up on it. Pretty disappointing. Since then I've upgraded to IDE 2.3.2, which has been working well with other boards (without debugging). BUT - now I'm coming back to finish up something on the Zero boards, and with 2.3.2 I can't even compile, due to debug errors. I'd still like to be able to debug, but at this point I really need to finish a project on these zero boards, and I'd settle for disabling the debug function altogether, so I can get on with it. Any suggestions for going either way - fix or disable?
I have:
set programmer = Atmel EDBG;
deleted a launch.json file I found in the sketch folder;
tried Sketch > Upload Using Programmer;
attempted Ctrl-F5 (start without debugging) but I'm probably not using it correctly - it writes (and opens) another launch.json, seemingly for me to edit...?
Unfortunately, I don't know how to deal with debugger settings, or how it really works, so I'm a bit hamstrung on traditional troubleshooting.
Again, I'd be happy to fix the debugger function, or even ditch it altogether at this point. Would love to hear your experiences with this!
Output:
Open On-Chip Debugger 0.10.0+dev-gf0767a31 (2018-06-11-13:36)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
none separate
adapter speed: 400 kHz
cortex_m reset_config sysresetreq
Error: unable to find CMSIS-DAP device
Error: No Valid JTAG Interface Configured.
Failed uploading: uploading error: exit status 0xffffffff
I'm going to ask you to post the full output from a compilation.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
Select Sketch > Verify/Compile from the Arduino IDE menus.
Wait for the compilation to fail.
You will see a "Compilation error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
Open a forum reply here by clicking the "Reply" button.
Click the <CODE/> icon on the post composer toolbar.
This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
This will paste the compilation output into the code block.
Move the cursor outside of the code block markup before you add any additional text to your reply.
Click the "Reply" button to post the output.
In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here:
Open a forum reply here by clicking the "Reply" button.
Click the "Upload" icon () on the post composer toolbar:
The "Open" dialog will open.
Select the .txt file you saved from the "Open" dialog.
Click the "Open" button.
The dialog will close.
Click the "Reply" button to publish the post.
Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.
Do you have the USB cable connected to the "Programming Port" on the Zero board?:
Hi ptillisch,
I did verify the USB connection to the programming port. Just to summarize my long OP, this issue popped up after upgrading to 2.3.2; previous IDE was 1.8.x, if memory serves. Thanks so much for taking a look.
FQBN: arduino:samd:arduino_zero_edbg
Using board 'arduino_zero_edbg' from platform in folder: C:\Users\Patty\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14
Using core 'arduino' from platform in folder: C:\Users\Patty\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14
Detecting libraries used...
C:\Users\Patty\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino Zero" -IC:\Users\Patty\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\Patty\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\Patty\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated -IC:\Users\Patty\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated-avr-comp -IC:\Users\Patty\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino -IC:\Users\Patty\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\variants\arduino_zero C:\Users\Patty\AppData\Local\Temp\arduino\sketches\C1552F8054E4E63D7D5A35484EC8641C\sketch\camDriver_08_cleanup_code.ino.cpp -o nul
Generating function prototypes...
C:\Users\Patty\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino Zero" -IC:\Users\Patty\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\Patty\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\Patty\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated -IC:\Users\Patty\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino/api/deprecated-avr-comp -IC:\Users\Patty\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\cores\arduino -IC:\Users\Patty\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14\variants\arduino_zero C:\Users\Patty\AppData\Local\Temp\arduino\sketches\C1552F8054E4E63D7D5A35484EC8641C\sketch\camDriver_08_cleanup_code.ino.cpp -o C:\Users\Patty\AppData\Local\Temp\2667385581\sketch_merged.cpp
C:\Users\Patty\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\Patty\AppData\Local\Temp\2667385581\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\Patty\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Og -g3 -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino Zero\"" "-IC:\\Users\\Patty\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS\\4.5.0/CMSIS/Include/" "-IC:\\Users\\Patty\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS-Atmel\\1.2.0/CMSIS/Device/ATMEL/" "-IC:\\Users\\Patty\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\cores\\arduino/api/deprecated" "-IC:\\Users\\Patty\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\cores\\arduino/api/deprecated-avr-comp" "-IC:\\Users\\Patty\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\cores\\arduino" "-IC:\\Users\\Patty\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\variants\\arduino_zero" "C:\\Users\\Patty\\AppData\\Local\\Temp\\arduino\\sketches\\C1552F8054E4E63D7D5A35484EC8641C\\sketch\\camDriver_08_cleanup_code.ino.cpp" -o "C:\\Users\\Patty\\AppData\\Local\\Temp\\arduino\\sketches\\C1552F8054E4E63D7D5A35484EC8641C\\sketch\\camDriver_08_cleanup_code.ino.cpp.o"
Compiling libraries...
Compiling core...
Using previously compiled file: C:\Users\Patty\AppData\Local\Temp\arduino\sketches\C1552F8054E4E63D7D5A35484EC8641C\core\variant.cpp.o
Using precompiled core: C:\Users\Patty\AppData\Local\Temp\arduino\cores\arduino_samd_arduino_zero_edbg_0e45b57c8ea8eb3112020e7612756c07\core.a
Linking everything together...
"C:\\Users\\Patty\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" "-LC:\\Users\\Patty\\AppData\\Local\\Temp\\arduino\\sketches\\C1552F8054E4E63D7D5A35484EC8641C" -Og -g3 -Wl,--gc-sections -save-temps "-TC:\\Users\\Patty\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14\\variants\\arduino_zero/linker_scripts/gcc/flash_with_bootloader.ld" "-Wl,-Map,C:\\Users\\Patty\\AppData\\Local\\Temp\\arduino\\sketches\\C1552F8054E4E63D7D5A35484EC8641C/camDriver_08_cleanup_code.ino.map" --specs=nano.specs --specs=nosys.specs -mcpu=cortex-m0plus -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -o "C:\\Users\\Patty\\AppData\\Local\\Temp\\arduino\\sketches\\C1552F8054E4E63D7D5A35484EC8641C/camDriver_08_cleanup_code.ino.elf" "C:\\Users\\Patty\\AppData\\Local\\Temp\\arduino\\sketches\\C1552F8054E4E63D7D5A35484EC8641C\\sketch\\camDriver_08_cleanup_code.ino.cpp.o" "C:\\Users\\Patty\\AppData\\Local\\Temp\\arduino\\sketches\\C1552F8054E4E63D7D5A35484EC8641C\\core\\variant.cpp.o" -Wl,--start-group "-LC:\\Users\\Patty\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS\\4.5.0/CMSIS/Lib/GCC/" -larm_cortexM0l_math -lm "C:\\Users\\Patty\\AppData\\Local\\Temp\\arduino\\sketches\\C1552F8054E4E63D7D5A35484EC8641C/..\\..\\cores\\arduino_samd_arduino_zero_edbg_0e45b57c8ea8eb3112020e7612756c07\\core.a" -Wl,--end-group
"C:\\Users\\Patty\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-objcopy" -O binary "C:\\Users\\Patty\\AppData\\Local\\Temp\\arduino\\sketches\\C1552F8054E4E63D7D5A35484EC8641C/camDriver_08_cleanup_code.ino.elf" "C:\\Users\\Patty\\AppData\\Local\\Temp\\arduino\\sketches\\C1552F8054E4E63D7D5A35484EC8641C/camDriver_08_cleanup_code.ino.bin"
"C:\\Users\\Patty\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom "C:\\Users\\Patty\\AppData\\Local\\Temp\\arduino\\sketches\\C1552F8054E4E63D7D5A35484EC8641C/camDriver_08_cleanup_code.ino.elf" "C:\\Users\\Patty\\AppData\\Local\\Temp\\arduino\\sketches\\C1552F8054E4E63D7D5A35484EC8641C/camDriver_08_cleanup_code.ino.hex"
"C:\\Users\\Patty\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-size" -A "C:\\Users\\Patty\\AppData\\Local\\Temp\\arduino\\sketches\\C1552F8054E4E63D7D5A35484EC8641C/camDriver_08_cleanup_code.ino.elf"
Sketch uses 18476 bytes (7%) of program storage space. Maximum is 262144 bytes.
Global variables use 3056 bytes (9%) of dynamic memory, leaving 29712 bytes for local variables. Maximum is 32768 bytes.
"C:\Users\Patty\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7/bin/openocd.exe" -d2 -s "C:\Users\Patty\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7/share/openocd/scripts/" -f "C:\Users\Patty\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.14/variants/arduino_zero/openocd_scripts/arduino_zero.cfg" -c "telnet_port disabled; program {C:\Users\Patty\AppData\Local\Temp\arduino\sketches\C1552F8054E4E63D7D5A35484EC8641C/camDriver_08_cleanup_code.ino.bin} verify reset 0x2000; shutdown"
Open On-Chip Debugger 0.10.0+dev-gf0767a31 (2018-06-11-13:36)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
none separate
adapter speed: 400 kHz
cortex_m reset_config sysresetreq
Error: unable to find CMSIS-DAP device
Error: No Valid JTAG Interface Configured.
Failed uploading: uploading error: exit status 0xffffffff
Select View > Devices by type from the Device Manager menus.
Open the "View" menu.
If there is a ✓ to the left of the "Show hidden devices" menu item, click on "Show hidden devices" to disable it.
Disconnect the USB cable of the Arduino board from your computer.
Take note of the contents of the "Other devices" and "Ports (COM & LPT)" sections of the Device Manager tree.
Connect the Arduino board to your computer with a USB cable.
Select Action > Scan for hardware changes" from the Device Manager menus.
Did you see any new device appear in the Device Manager tree after doing this? If so, please tell us where it is located in the tree and what it is named.
You can repeat steps 5-8 multiple times if you are not sure.
Hi ptillisch,
Gosh, I should have thought of that. So, I had the Zero on a USB hub. Your advice made it obvious - the Zero would appear in device manager, only to disappear a short time later. I moved the Zero off of that hub - now it remains present in device manager (and compiles with no errors / warnings). My apologies - I feel bad that I didn't look at serial connectivity before posting; obviously I wasn't thinking of that.
In earlier troubleshooting, I read somewhere that it was important to use "Sketch > Upload Using Programmer" when uploading. I'm curious about the difference between the two. Thanks again so much for your help and advice on this!!!
Regards,
Nothing to apologize for. I'm just glad if I was able to be of some assistance (though you actually ended up doing the heavy lifting in the end!).
I wouldn't have expected the USB hub to be the culprit either. I was expecting it to be the USB cable, which is a common cause of Arduino boards not being recognized by the computer.
I'm actually not sure what the difference is for this specific board.
The Zero is distinctive in that it has an on-board debug probe (EDBG) connected to the "Programming Port". This acts as a programmer when you upload. Even when you do a standard "Upload", the EDBG is still used to flash the sketch to the ATSAMD21G microcontroller, so it is something similar to an "Upload Using Programmer" regardless.
However, I do see that there is a difference between the upload commands that are invoked depending on which you use.
This is the template the upload command is generated from when you use "Upload":
And this is the template for when you use "Upload Using Programmer":
I have always used "Upload" and never had any problems.
Ha! That's above my pay grade, but maybe it will help someone else. And same here, I've always just used "upload" without issues. Again, hearty thanks !!