SpenceKonde / megaTinyCore

Arduino core for the tinyAVR 0/1/2-series - Ones's digit 2,4,5,7 (pincount, 8,14,20,24), tens digit 0, 1, or 2 (featureset), preceded by flash in kb. Library maintainers: porting help available!
Other
564 stars 148 forks source link

Can't Compile After Updated Board and IDE: exit status -1073741701 #746

Closed intakenick closed 2 years ago

intakenick commented 2 years ago

So I have some code that was compiling and uploading just fine a few days ago. I was using an older version of the core where pyupdi upload was really slow. Updating to the newest version of the core no longer compiles, I get the following errors:

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\johns\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\johns\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\johns\OneDrive\Documents\Arduino\libraries -fqbn=megaTinyCore:megaavr:atxy4:chip=1614,clock=8internal,bodvoltage=1v8,bodmode=disabled,eesave=enable,millis=enabled,startuptime=8,wiremode=mors,printf=default,attach=allenabled -ide-version=10819 -build-path C:\Users\johns\AppData\Local\Temp\arduino_build_59666 -warnings=none -build-cache C:\Users\johns\AppData\Local\Temp\arduino_cache_256173 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\johns\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino4b -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-azduino4b.path=C:\Users\johns\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino4b -prefs=runtime.tools.python3.path=C:\Users\johns\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=C:\Users\johns\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1 -prefs=runtime.tools.arduinoOTA.path=C:\Users\johns\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\johns\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avrdude.path=C:\Users\johns\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18 -prefs=runtime.tools.avrdude-6.3.0-arduino17or18.path=C:\Users\johns\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18 -verbose C:\Users\johns\OneDrive\Desktop\VYBE\VYBE\VYBE_FW\VYBE_FW.ino C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\johns\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\johns\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\johns\OneDrive\Documents\Arduino\libraries -fqbn=megaTinyCore:megaavr:atxy4:chip=1614,clock=8internal,bodvoltage=1v8,bodmode=disabled,eesave=enable,millis=enabled,startuptime=8,wiremode=mors,printf=default,attach=allenabled -ide-version=10819 -build-path C:\Users\johns\AppData\Local\Temp\arduino_build_59666 -warnings=none -build-cache C:\Users\johns\AppData\Local\Temp\arduino_cache_256173 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\johns\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino4b -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-azduino4b.path=C:\Users\johns\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino4b -prefs=runtime.tools.python3.path=C:\Users\johns\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=C:\Users\johns\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1 -prefs=runtime.tools.arduinoOTA.path=C:\Users\johns\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\johns\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avrdude.path=C:\Users\johns\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18 -prefs=runtime.tools.avrdude-6.3.0-arduino17or18.path=C:\Users\johns\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18 -verbose C:\Users\johns\OneDrive\Desktop\VYBE\VYBE\VYBE_FW\VYBE_FW.ino Using board 'atxy4' from platform in folder: C:\Users\johns\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.5.11 Using core 'megatinycore' from platform in folder: C:\Users\johns\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.5.11 Detecting libraries used... "C:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino4b/bin/avr-g++" -c -g -Os -Wall -std=gnu++17 -fpermissive -Wno-sized-deallocation -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=attiny1614 -DF_CPU=8000000L -DCLOCK_SOURCE=0 -DTWI_MORS -DMILLIS_USE_TIMERD0 -DCORE_ATTACH_ALL -DARDUINO=10819 -DARDUINO_AVR_ATtiny1614 -DARDUINO_ARCH_MEGAAVR "-DMEGATINYCORE=\"2.5.11\"" -DMEGATINYCORE_MAJOR=2UL -DMEGATINYCORE_MINOR=5UL -DMEGATINYCORE_PATCH=11UL -DMEGATINYCORE_RELEASED=1 -DARDUINO_attinyxy4 "-IC:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.5.11\\cores\\megatinycore/api/deprecated" "-IC:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.5.11\\cores\\megatinycore" "-IC:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.5.11\\variants\\txy4" "C:\\Users\\johns\\AppData\\Local\\Temp\\arduino_build_59666\\sketch\\VYBE_FW.ino.cpp" -o nul Error while detecting libraries included by C:\Users\johns\AppData\Local\Temp\arduino_build_59666\sketch\VYBE_FW.ino.cpp "C:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino4b/bin/avr-g++" -c -g -Os -Wall -std=gnu++17 -fpermissive -Wno-sized-deallocation -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=attiny1614 -DF_CPU=8000000L -DCLOCK_SOURCE=0 -DTWI_MORS -DMILLIS_USE_TIMERD0 -DCORE_ATTACH_ALL -DARDUINO=10819 -DARDUINO_AVR_ATtiny1614 -DARDUINO_ARCH_MEGAAVR "-DMEGATINYCORE=\"2.5.11\"" -DMEGATINYCORE_MAJOR=2UL -DMEGATINYCORE_MINOR=5UL -DMEGATINYCORE_PATCH=11UL -DMEGATINYCORE_RELEASED=1 -DARDUINO_attinyxy4 "-IC:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.5.11\\cores\\megatinycore/api/deprecated" "-IC:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.5.11\\cores\\megatinycore" "-IC:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.5.11\\variants\\txy4" "C:\\Users\\johns\\AppData\\Local\\Temp\\arduino_build_59666\\sketch\\light.cpp" -o nul Error while detecting libraries included by C:\Users\johns\AppData\Local\Temp\arduino_build_59666\sketch\light.cpp Generating function prototypes... "C:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino4b/bin/avr-g++" -c -g -Os -Wall -std=gnu++17 -fpermissive -Wno-sized-deallocation -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=attiny1614 -DF_CPU=8000000L -DCLOCK_SOURCE=0 -DTWI_MORS -DMILLIS_USE_TIMERD0 -DCORE_ATTACH_ALL -DARDUINO=10819 -DARDUINO_AVR_ATtiny1614 -DARDUINO_ARCH_MEGAAVR "-DMEGATINYCORE=\"2.5.11\"" -DMEGATINYCORE_MAJOR=2UL -DMEGATINYCORE_MINOR=5UL -DMEGATINYCORE_PATCH=11UL -DMEGATINYCORE_RELEASED=1 -DARDUINO_attinyxy4 "-IC:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.5.11\\cores\\megatinycore/api/deprecated" "-IC:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.5.11\\cores\\megatinycore" "-IC:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.5.11\\variants\\txy4" "C:\\Users\\johns\\AppData\\Local\\Temp\\arduino_build_59666\\sketch\\VYBE_FW.ino.cpp" -o "C:\\Users\\johns\\AppData\\Local\\Temp\\arduino_build_59666\\preproc\\ctags_target_for_gcc_minus_e.cpp" exit status -1073741701 Error compiling for board ATtiny3224/1624/1614/1604/824/814/804/424/414/404/214/204.

Things I've tried:

intakenick commented 2 years ago

Update: I've tried compiling the tinyNeoPixel "simple" example (with no changes) and it also fails to compile. Here is the compiler output: C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\johns\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\johns\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\johns\OneDrive\Documents\Arduino\libraries -fqbn=megaTinyCore:megaavr:atxy4:chip=1614,clock=8internal,bodvoltage=1v8,bodmode=disabled,eesave=enable,millis=enabled,startuptime=8,wiremode=mors,printf=default,attach=allenabled -ide-version=10819 -build-path C:\Users\johns\AppData\Local\Temp\arduino_build_403004 -warnings=none -build-cache C:\Users\johns\AppData\Local\Temp\arduino_cache_256173 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\johns\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino4b -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-azduino4b.path=C:\Users\johns\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino4b -prefs=runtime.tools.python3.path=C:\Users\johns\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=C:\Users\johns\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1 -prefs=runtime.tools.arduinoOTA.path=C:\Users\johns\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\johns\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avrdude.path=C:\Users\johns\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18 -prefs=runtime.tools.avrdude-6.3.0-arduino17or18.path=C:\Users\johns\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18 -verbose C:\Users\johns\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.5.11\libraries\tinyNeoPixel\examples\simple\simple.ino C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\johns\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\johns\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\johns\OneDrive\Documents\Arduino\libraries -fqbn=megaTinyCore:megaavr:atxy4:chip=1614,clock=8internal,bodvoltage=1v8,bodmode=disabled,eesave=enable,millis=enabled,startuptime=8,wiremode=mors,printf=default,attach=allenabled -ide-version=10819 -build-path C:\Users\johns\AppData\Local\Temp\arduino_build_403004 -warnings=none -build-cache C:\Users\johns\AppData\Local\Temp\arduino_cache_256173 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\johns\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino4b -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-azduino4b.path=C:\Users\johns\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino4b -prefs=runtime.tools.python3.path=C:\Users\johns\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=C:\Users\johns\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1 -prefs=runtime.tools.arduinoOTA.path=C:\Users\johns\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\johns\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avrdude.path=C:\Users\johns\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18 -prefs=runtime.tools.avrdude-6.3.0-arduino17or18.path=C:\Users\johns\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18 -verbose C:\Users\johns\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.5.11\libraries\tinyNeoPixel\examples\simple\simple.ino Using board 'atxy4' from platform in folder: C:\Users\johns\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.5.11 Using core 'megatinycore' from platform in folder: C:\Users\johns\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.5.11 Detecting libraries used... "C:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino4b/bin/avr-g++" -c -g -Os -Wall -std=gnu++17 -fpermissive -Wno-sized-deallocation -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=attiny1614 -DF_CPU=8000000L -DCLOCK_SOURCE=0 -DTWI_MORS -DMILLIS_USE_TIMERD0 -DCORE_ATTACH_ALL -DARDUINO=10819 -DARDUINO_AVR_ATtiny1614 -DARDUINO_ARCH_MEGAAVR "-DMEGATINYCORE=\"2.5.11\"" -DMEGATINYCORE_MAJOR=2UL -DMEGATINYCORE_MINOR=5UL -DMEGATINYCORE_PATCH=11UL -DMEGATINYCORE_RELEASED=1 -DARDUINO_attinyxy4 "-IC:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.5.11\\cores\\megatinycore/api/deprecated" "-IC:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.5.11\\cores\\megatinycore" "-IC:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.5.11\\variants\\txy4" "C:\\Users\\johns\\AppData\\Local\\Temp\\arduino_build_403004\\sketch\\simple.ino.cpp" -o nul Error while detecting libraries included by C:\Users\johns\AppData\Local\Temp\arduino_build_403004\sketch\simple.ino.cpp Generating function prototypes... "C:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino4b/bin/avr-g++" -c -g -Os -Wall -std=gnu++17 -fpermissive -Wno-sized-deallocation -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=attiny1614 -DF_CPU=8000000L -DCLOCK_SOURCE=0 -DTWI_MORS -DMILLIS_USE_TIMERD0 -DCORE_ATTACH_ALL -DARDUINO=10819 -DARDUINO_AVR_ATtiny1614 -DARDUINO_ARCH_MEGAAVR "-DMEGATINYCORE=\"2.5.11\"" -DMEGATINYCORE_MAJOR=2UL -DMEGATINYCORE_MINOR=5UL -DMEGATINYCORE_PATCH=11UL -DMEGATINYCORE_RELEASED=1 -DARDUINO_attinyxy4 "-IC:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.5.11\\cores\\megatinycore/api/deprecated" "-IC:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.5.11\\cores\\megatinycore" "-IC:\\Users\\johns\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.5.11\\variants\\txy4" "C:\\Users\\johns\\AppData\\Local\\Temp\\arduino_build_403004\\sketch\\simple.ino.cpp" -o "C:\\Users\\johns\\AppData\\Local\\Temp\\arduino_build_403004\\preproc\\ctags_target_for_gcc_minus_e.cpp" exit status -1073741701 Error compiling for board ATtiny3224/1624/1614/1604/824/814/804/424/414/404/214/204.

SpenceKonde commented 2 years ago

There are two possible causes for this problem - either the sketch contains a defect, or there is an arduino-wide/system-wide problem.

I think the best clue might be the "error detecting libraries included by" which suggests an issue with the libraries in your sketchbook or one of the libraries included by the sketch. That the error occurs with an example sketch that compiles for me speaks against it being sketch specific, I'm afraid. (Tested on 1.8.13 of the IDE, which thus far is the best version - they broke some things since then without adding compelling features, while pre 1.8.13 version of the IDE mishandle the tools -> programmers menu (acting under the assumption that all programmers work with all targets).

BTW, you were using an ancient version of the core of date if the SerialUPDI upload was super-slow (unless you're using an FTDI adapter, and have not adjusted the latency timer as described in the SerialUPDI section - it defaults to a 16ms delay for every round trip, and tinyAVR is particularly heavy in round trips (more so than DxCore) due to the different NVM controller.

Initially we used pymcuprog essentially unaltered from microchip's version. It quickly (well, sort of) became apparent that the performance left a great deal to be desired and 2 years ago a large effort was undertaken to figure out why and try to improve the performance. IIRC it was 8x faster by the end of the day, and 30x faster by the end of a week or two. (in other words, Microchip's implementation is not anything resembling optimized

intakenick commented 2 years ago

Hey 1.8.13 did the trick! I deleted the folders in Arduino15 and installed the older version, everything compiles now, thanks Dr. Azzy!

I'm not sure how old my previous version was but now with my custom board (using CH340N) upload went from ~30 seconds to .32s! 2 orders of magnitude!

Much appreciated.

SpenceKonde commented 2 years ago

Ugh - closing. I wish the arduino team would go back to fixing ide bugs instead of adding new ones.

Says pot to kettle, as 11 of the past 12 versions of this core were totally hosed

CH340 is pretty good. A FT232 is slightly faster, but you need to change settings in control panel or it is much slower