MegaCoreX: exit status 0xc000007b

Hey Guys.

I trying to upload a simple blink sketch to a atmega4808 (SSOP28).

const int LED_STATUS = 5;

void setup() {
  pinMode(LED_STATUS, OUTPUT);

}

void loop() {
  digitalWrite(LED_STATUS, 1);
  delay(1000);
  digitalWrite(LED_STATUS, 0);
  delay(1000);
}

After compling, I get this error

exit status 0xc000007b

I tried it with both Arduino IDE 1.8x and IDE 2.0. What does this error message say?

Regards

Hi @s-fr. In order to gather more information that might help us to troubleshoot your problem, I'm going to ask you to post the full output from the upload when in verbose mode.


:exclamation: NOTE: These instructions will not solve the problem. They are only intended to gather more information which might provide a clue that eventually leads to a solution.


Please do this:

  1. Select File > Preferences from the Arduino IDE menus.
  2. Uncheck the checkbox next to Show verbose output during: compilation
  3. Check the checkbox next to Show verbose output during: ☐ upload.
  4. Click the OK button.
  5. Attempt an upload, as you did before.
  6. Wait for the upload to fail.
  7. You will see a "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the COPY ERROR MESSAGES button on that notification.
  8. Open a forum reply here by clicking the Reply button.
  9. Click the </> 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.
    Code block
  10. Press Ctrl+V.
    This will paste the error output from the upload into the code block.
  11. Move the cursor outside of the code tags before you add any additional text to your reply.
  12. Click the Reply button to post the output.

I'm affraid there's nothing more to tell but that one single line of error never the less here is the full output in verbose mode

Using board '4808' from platform in folder: C:\Users\enw\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.1.0
Using core 'coreX-corefiles' from platform in folder: C:\Users\enw\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.1.0
Verwendete Bibliotheken erkennen...
"C:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4808 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_ATmega4808 -DARDUINO_ARCH_MEGAAVR "-IC:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\MegaCoreX\\hardware\\megaavr\\1.1.0\\cores\\coreX-corefiles/api/deprecated" "-IC:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\MegaCoreX\\hardware\\megaavr\\1.1.0\\cores\\coreX-corefiles" "-IC:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\MegaCoreX\\hardware\\megaavr\\1.1.0\\variants\\28pin-standard" "C:\\Users\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76\\sketch\\sketch_nov21a.ino.cpp" -o nul
Funktionsprototypen werden generiert...
"C:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4808 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_ATmega4808 -DARDUINO_ARCH_MEGAAVR "-IC:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\MegaCoreX\\hardware\\megaavr\\1.1.0\\cores\\coreX-corefiles/api/deprecated" "-IC:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\MegaCoreX\\hardware\\megaavr\\1.1.0\\cores\\coreX-corefiles" "-IC:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\MegaCoreX\\hardware\\megaavr\\1.1.0\\variants\\28pin-standard" "C:\\Users\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76\\sketch\\sketch_nov21a.ino.cpp" -o "C:\\Users\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Users\\enw\\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\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Sketch wird kompiliert...
"C:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mrelax -mmcu=atmega4808 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_ATmega4808 -DARDUINO_ARCH_MEGAAVR "-IC:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\MegaCoreX\\hardware\\megaavr\\1.1.0\\cores\\coreX-corefiles/api/deprecated" "-IC:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\MegaCoreX\\hardware\\megaavr\\1.1.0\\cores\\coreX-corefiles" "-IC:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\MegaCoreX\\hardware\\megaavr\\1.1.0\\variants\\28pin-standard" "C:\\Users\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76\\sketch\\sketch_nov21a.ino.cpp" -o "C:\\Users\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76\\sketch\\sketch_nov21a.ino.cpp.o"
Bibliotheken werden kompiliert...
Kern wird kompiliert...
Using precompiled core: C:\Users\enw\AppData\Local\Temp\arduino-core-cache\core_6b1091369ab00efce11630d745978405.a
Linking everything together...
"C:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -mrelax -Wl,--gc-sections -Wl,--section-start=.text=0x0 -mmcu=atmega4808 -o "C:\\Users\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76/sketch_nov21a.ino.elf" "C:\\Users\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76\\sketch\\sketch_nov21a.ino.cpp.o" "C:\\Users\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76/..\\arduino-core-cache\\core_6b1091369ab00efce11630d745978405.a" "-LC:\\Users\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76" -lm
"C:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76/sketch_nov21a.ino.elf" "C:\\Users\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76/sketch_nov21a.ino.eep"
"C:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76/sketch_nov21a.ino.elf" "C:\\Users\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76/sketch_nov21a.ino.hex"
cmd /C "C:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objdump" --disassemble --source --line-numbers --demangle --section=.text "C:\\Users\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76/sketch_nov21a.ino.elf" > "C:\\Users\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76/sketch_nov21a.ino_atmega4808_16000000L.lst"

"C:\\Users\\enw\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\enw\\AppData\\Local\\Temp\\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76/sketch_nov21a.ino.elf"
Der Sketch verwendet 474 Bytes (0%) des Programmspeicherplatzes. Das Maximum sind 49152 Bytes.
Globale Variablen verwenden 4 Bytes (0%) des dynamischen Speichers, 6140 Bytes für lokale Variablen verbleiben. Das Maximum sind 6144 Bytes.
"C:\Users\enw\AppData\Local\Arduino15\packages\MegaCoreX\tools\avrdude\7.0.0-arduino2/bin/avrdude" "-CC:\Users\enw\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.1.0/avrdude.conf" -v -V -patmega4808 -cjtag2updi -PCOM3 "-Uflash:w:C:\Users\enw\AppData\Local\Temp\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76/sketch_nov21a.ino.with_bootloader.hex:i" "-Ufuse0:w:0x00:m" "-Ufuse1:w:0x54:m" "-Ufuse2:w:0x01:m" "-Ufuse4:w:0x00:m" "-Ufuse5:w:0b11001001:m" "-Ufuse6:w:0x06:m" "-Ufuse7:w:0x00:m" "-Ufuse8:w:0x00:m" "-Ulock:w:0xC5:m"
Fehlgeschlagene Programmierung: Hochladefehler: exit status 0xc000007b

My opinion is, that there is just a simple dll missing, but which? thats the 1 million dollar question

This thread may be of help.

https://answers.microsoft.com/en-us/windows/forum/all/unable-to-fix-0xc000007b-error-tried-everything/92446f3f-4b83-44fb-957a-a3c3e84bd3e6?page=1


Download
xinput1_3.dll - 32 bit and paste it into the immediate directory of the executable with this error. It doesn't matter if your computer is 32bit or 64bit, only use the 32bit version .

I've tried but that also didn't do the trick

When I was looking for a missing DLL with MegaCoreX, calling avrdude from the command prompt identified it.

I was also planning to suggest you run the upload command from the command line:

"C:\Users\enw\AppData\Local\Arduino15\packages\MegaCoreX\tools\avrdude\7.0.0-arduino2/bin/avrdude" "-CC:\Users\enw\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.1.0/avrdude.conf" -v -V -patmega4808 -cjtag2updi -PCOM3 "-Uflash:w:C:\Users\enw\AppData\Local\Temp\arduino-sketch-9D853FA9DD04B126D1BA6397736EDA76/sketch_nov21a.ino.with_bootloader.hex:i" "-Ufuse0:w:0x00:m" "-Ufuse1:w:0x54:m" "-Ufuse2:w:0x01:m" "-Ufuse4:w:0x00:m" "-Ufuse5:w:0b11001001:m" "-Ufuse6:w:0x06:m" "-Ufuse7:w:0x00:m" "-Ufuse8:w:0x00:m" "-Ulock:w:0xC5:m"

I can guess that the error is caused by the missing libusb0.dll, but the interactive dialog you will get from running the command in PowerShell would tell you the answer for certain.

Hey.

Your assumption was correct, the problem is avrdude itself (or more, some additional files) I've tried it in command line and get the exact error

But how can I find out which file is missing? I've already copied libusb0.dll into the avrdude directory with no success, this dll only repairs the error code 0xc0000135

Cheers

Bad news that the command line entry did not identify the missing dll.

Are you using a Thinary Nano Every with the ATmega4808 or some custom board you have built? Or is there another product with this chip?

If its the Thinary board, there may be some work arounds with 1.8.x and the Thinary core which was what people used before MegaCoreX support.

Trying this route may give you a clue, as it will be using a different version of avrdude and use the dll's packaged with 1.8.x

And suddenly it works and I cant say why... maybe it was the last windows update I made or it was a magical unicorn :face_with_symbols_over_mouth: nothing worse than a self repairing error that can return every time :pensive:

I'd take magically working over not working any time :wink:
A windows update is as good an explanation as any.

Yeah I really cant say what it was, but I got another PC also fresh set up with Win10 and also the same persisting problem. I'll try some things that may or may not solve the problem and if I find a propper solution I'll post it here

Until then....