0

Arduino sketch not loaded to Trinket M0.
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Arduino sketch not loaded to Trinket M0.

by DucDoug on Mon May 06, 2019 9:38 pm

Hi,

My Trinket M0 script (or even the built-in blink sketch) is having problem with downloading from Arduino. The boards, port ID under tools are all correct. It just run, then shows error at the end. See below. I've been looking around for 2 weeks already. If there is anything you can help, please do.

Thanks,

======
Code: Select all | TOGGLE FULL SIZE

"C:\\Users\\nduc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\4.8.3-2014q1/bin/arm-none-eabi-ar" rcs "C:\\Users\\nduc\\AppData\\Local\\Temp\\arduino_build_157314\\core\\core.a" "C:\\Users\\nduc\\AppData\\Local\\Temp\\arduino_build_157314\\core\\wiring_private.c.o"
"C:\\Users\\nduc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\4.8.3-2014q1/bin/arm-none-eabi-ar" rcs "C:\\Users\\nduc\\AppData\\Local\\Temp\\arduino_build_157314\\core\\core.a" "C:\\Users\\nduc\\AppData\\Local\\Temp\\arduino_build_157314\\core\\wiring_shift.c.o"
Archiving built core (caching) in: C:\Users\nduc\AppData\Local\Temp\arduino_cache_543734\core\core_adafruit_samd_adafruit_trinket_m0_a66cad6ddc2710b87c4a5b48987a3845.a
Linking everything together...
"C:\\Users\\nduc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\4.8.3-2014q1/bin/arm-none-eabi-gcc" "-LC:\\Users\\nduc\\AppData\\Local\\Temp\\arduino_build_157314" -Os -Wl,--gc-sections -save-temps "-TC:\\Users\\nduc\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.4.1\\variants\\trinket_m0/linker_scripts/gcc/flash_with_bootloader.ld" "-Wl,-Map,C:\\Users\\nduc\\AppData\\Local\\Temp\\arduino_build_157314/IR.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\\nduc\\AppData\\Local\\Temp\\arduino_build_157314/IR.ino.elf" "C:\\Users\\nduc\\AppData\\Local\\Temp\\arduino_build_157314\\sketch\\IR.ino.cpp.o" "C:\\Users\\nduc\\AppData\\Local\\Temp\\arduino_build_157314\\core\\variant.cpp.o" -Wl,--start-group "-LC:\\Users\\nduc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS\\4.5.0/CMSIS/Lib/GCC/" -larm_cortexM0l_math "-LC:\\Users\\nduc\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.4.1\\variants\\trinket_m0" -lm "C:\\Users\\nduc\\AppData\\Local\\Temp\\arduino_build_157314/core\\core.a" -Wl,--end-group
"C:\\Users\\nduc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\4.8.3-2014q1/bin/arm-none-eabi-objcopy" -O binary "C:\\Users\\nduc\\AppData\\Local\\Temp\\arduino_build_157314/IR.ino.elf" "C:\\Users\\nduc\\AppData\\Local\\Temp\\arduino_build_157314/IR.ino.bin"
"C:\\Users\\nduc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\4.8.3-2014q1/bin/arm-none-eabi-size" -A "C:\\Users\\nduc\\AppData\\Local\\Temp\\arduino_build_157314/IR.ino.elf"
Sketch uses 10640 bytes (4%) of program storage space. Maximum is 262144 bytes.
java.io.IOException: Cannot run program "{runtime.tools.bossac-1.7.0.path}/bossac": CreateProcess error=2, The system cannot find the file specified
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
   at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:26)
   at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:129)
   at cc.arduino.packages.uploaders.SerialUploader.runCommand(SerialUploader.java:383)
   at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:197)
   at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
   at processing.app.SketchController.upload(SketchController.java:732)
   at processing.app.SketchController.exportApplet(SketchController.java:703)
   at processing.app.Editor$UploadHandler.run(Editor.java:2070)
   at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
   at java.lang.ProcessImpl.create(Native Method)
   at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
   at java.lang.ProcessImpl.start(ProcessImpl.java:137)
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
   ... 9 more
An error occurred while uploading the sketch
Last edited by franklin97355 on Tue May 07, 2019 1:24 am, edited 1 time in total.
Reason: Please use code tags when posting code or logs to the forums. It preserves formatting and makes it easier for everyone to read the code. Click the code button above the reply box and past your code between the tags created.

DucDoug
 
Posts: 1
Joined: Fri Apr 26, 2019 4:44 pm

Re: Arduino sketch not loaded to Trinket M0.

by adafruit_support_mike on Tue May 07, 2019 1:37 am

That means there's a problem with the board support package.. specifically, the Arduino IDE can't find that program that talks to the microcontroller and uploads your code.

It's easiest to fix the problem by deleting your Arduino15 folder and reinstalling the board support packages from scratch. That's much easier than trying to trace through all the files and locate the one that didn't get deleted properly in the last update.

adafruit_support_mike
 
Posts: 57856
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.