digistump / DigistumpArduino

Files to add Digistump support (Digispark, Pro, DigiX) to Arduino 1.6.X (1.6.5+)
932 stars 377 forks source link

UPDATE avr-gcc #132

Open Denial-Steinberg opened 3 years ago

Denial-Steinberg commented 3 years ago

PLEASE UPDATE avr-gcc !!!

pfeerick commented 3 years ago

Why? From what version? To what version? What newer version is compatible? Have you tried the more update to date fork at https://github.com/ArminJo/DigistumpArduino ?

ArminJo commented 3 years ago

@Denial-Steinberg Please close the issue. Thanks!

neatc0der commented 2 years ago

Wait a minute. After years of negligence I have recovered my DigiX but unable to bring it back to life.

Here's the background:

Arduino: 1.8.19 (Mac OS X), Board: "Digistump DigiX"

Warning: platform.txt from core 'Digistump ARM (32-bits) Boards' contains deprecated recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "{build.path}/syscalls_sam3.c.o" {object_files} "{build.variant.path}/{build.variant_system_lib}" "{build.path}/{archive_file}" -Wl,--end-group -lm -gcc, automatically converted to recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "{build.path}/core/syscalls_sam3.c.o" {object_files} "{build.variant.path}/{build.variant_system_lib}" "{build.path}/{archive_file}" -Wl,--end-group -lm -gcc. Consider upgrading this core.
Warning: platform.txt from core 'Digistump ARM (32-bits) Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.
Sketch uses 12852 bytes (2%) of program storage space. Maximum is 524288 bytes.
java.io.IOException: Cannot run program "/Users/user/Library/Arduino15/packages/digistump/tools/bossac/1.3a-arduino/bossac": error=86, Bad CPU type in executable
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at java.lang.Runtime.exec(Runtime.java:620)
    at java.lang.Runtime.exec(Runtime.java:485)
    at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:11)
    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:2061)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: error=86, Bad CPU type in executable
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
    at java.lang.ProcessImpl.start(ProcessImpl.java:134)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    ... 11 more
An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

any flaws in my logic?

DeuxVis commented 2 years ago

@neatc0der I would try with an old arduino version if I were you, released around the date of the last update to those "Digistump SAM Boards" package.

Or maybe try with platformio ? https://docs.platformio.org/en/latest/boards/atmelsam/digix.html

aaronw2 commented 1 year ago

Please update it. I get collect2: error: ld terminated with signal 11 [Segmentation fault], core dumped when using the supplied 4.8.1. If I manually link it using the latest 7.3.0 it links without any issue.

/home/xxxxxx/.arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-gcc -Os -Wl,--gc-sections -mmcu=attiny85 -o /tmp/arduino_build_698262/ServoSaver.ino.elf /tmp/arduino_build_698262/sketch/ServoSaver.ino.cpp.o /tmp/arduino_build_698262/libraries/DigisparkTinyPinChange/TinyPinChange.cpp.o /tmp/arduino_build_698262/libraries/DigisparkSoftSerial/SoftSerial.cpp.o /tmp/arduino_build_698262/libraries/DigisparkSoftRcPulseIn/SoftRcPulseIn.cpp.o /tmp/arduino_build_698262/core/pins_arduino.c.o /tmp/arduino_cache_505193/core/core_digistump_avr_digispark-tiny8_91b9000a5bfd673e7bfcbaf492b2faae.a -L/tmp/arduino_build_698262 -lm collect2: error: ld terminated with signal 11 [Segmentation fault], core dumped