Unable to launch avr-gcc [message #1840754] |
Fri, 23 April 2021 11:25 |
Peter Charles-Jones Messages: 11 Registered: April 2021 |
Junior Member |
|
|
I am a newbie trying to move from Arduino IDE to Eclipse and am keen to program AVR MCU (I'm new at this too).
I have successfully installed (I hope) winAVR and the AVR Eclipse Plugin.
I can use the Project | Properties | AVR | Target Hardware to interrogate the AVR (it's an Arduino Uno - ATMegga328P) and the Project | Properties | AVR AVRDude | Fuses | direct hex values | Load from MCU seems to communicate (flashing Tx Rx on Arduino Uno) and update fuse settings on screen.
I have built my 'blinky' code, saved it (main.c) and now want to get something uploaded onto my AVR but when I Build it, I get an avr-gcc.exe - Application Error dialog - The application was unable to start correctly (0xc0000142):
My environment on a Windows 10 Home 64bit machine:
Eclipse IDE for C/C++ Developers (includes Incubating components)
Version: 2021-03 (4.19.0)
Build id: 20210312-0638
AVR Eclipse Plugin 2.4.2 de.innot.avreclipse.feature.group avr-eclipse.sourceforge.net
avrdude version 5.10, URL:
More detailed description of issue:
The command line Eclipse is trying to execute is:
avr-gcc -Wall -Os -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=atmega328p -DF_CPU=1000000UL -MMD -MP -MF"main.d" -MT"main.o" -c -o "main.o" "../main.c"
I was trying to use an IDE so I didn't need to use the command line directly. However I looked up an a article (How to compile and burn the code to AVR chip on Linux/MacOSX/Windows 2016-01-08 by Łukasz Podkalicki) to get a simplified command to see if there was a fundamental issue and this ran as below.
C:\Users\Peter\OtherWorkspace\Bliknk2>avr-gcc -Wall -g -mmcu=atmega328p -o main.bin main.c
C:\Users\Peter\OtherWorkspace\Bliknk2>dir
Volume in drive C has no label.
Volume Serial Number is F652-2CC9
Directory of C:\Users\Peter\OtherWorkspace\Bliknk2
23/04/2021 11:54 <DIR> .
23/04/2021 11:54 <DIR> ..
23/04/2021 10:25 8,739 .cproject
22/04/2021 21:55 840 .project
22/04/2021 22:07 <DIR> .settings
23/04/2021 11:54 2,947 main.bin
23/04/2021 11:17 189 main.c
22/04/2021 22:15 <DIR> Release
4 File(s) 12,715 bytes
4 Dir(s) 388,531,277,824 bytes free
C:\Users\Peter\OtherWorkspace\Bliknk2>avr-size -C main.bin
AVR Memory Usage
----------------
Device: Unknown
Program: 156 bytes
(.text + .data + .bootloader)
Data: 0 bytes
(.data + .bss + .noinit)
I must be close with the Eclipse setup but something must be incorrect. Please can you help me? What have I done wrong?
|
|
|
|
|
Re: Unable to launch avr-gcc [message #1840790 is a reply to message #1840787] |
Fri, 23 April 2021 17:45 |
Peter Charles-Jones Messages: 11 Registered: April 2021 |
Junior Member |
|
|
Well things have changed but still no solution:
I researched the error and ran
C:>DISM.exe /Online /Cleanup-image /Restorehealth
Then I ran
C:>sfc /scannow
It did claim to fix some things but I had the same result as before.
I also started PC in clean mode - with all the start up junk disabled just in case there was some type of app conflict.
Then I located the avr-gcc.exe and had Windows run Troubleshoot compatibility (right click on .exe)
Running Build in Eclipse now gives me a different error - Permission denied - I think the Troubleshoot compatibility utility was running avr-gcc.exec as administrator - I certainly had to confirm access before it was launched by Eclipse. Not sure I can get any more permissions higher than administrator.
I feel I am getting closer but I do not know how to resolve the issue. Maybe a complete re-install of Eclipse? I don't know.
Please help me if you can.
Best regards Peter
Details here
18:33:40 **** Incremental Build of configuration Release for project Bliknk2 ****
make all
Building file: ../main.c
Invoking: AVR Compiler
avr-gcc -Wall -Os -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=atmega328p -DF_CPU=1000000UL -MMD -MP -MF"main.d" -MT"main.o" -c -o "main.o" "../main.c"
/usr/bin/sh: /c/WinAVR-20100110/bin/avr-gcc: Permission denied
make: *** [main.o] Error 126
"make all" terminated with exit code 2. Build might be incomplete.
18:33:40 Build Failed. 1 errors, 0 warnings. (took 167ms)
[Updated on: Fri, 23 April 2021 18:14] Report message to a moderator
|
|
|
|
|
Re: Unable to launch avr-gcc [message #1864537 is a reply to message #1840938] |
Fri, 22 March 2024 04:49 |
|
I struggled with this recently.
Turns out I had 2 versions of AVRGCC installed. The older one was on the path, so the Make process would use 'make' from the older version. But that make would invoke avr-gcc in the newer version, which it had a problem with, generating this error.
So drop to a command line and type 'where make' to see where it's being called from.
|
|
|
Powered by
FUDForum. Page generated in 0.08663 seconds