Help me find error please

FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\HP\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\HP\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\HP\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\HP\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\HP\AppData\Local\Temp\arduino\sketches\E96B8AB6CAE833747893BC9048837C58\sketch\anu_light_blink.ino.cpp -o nul
Generating function prototypes...
C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\HP\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\HP\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\HP\AppData\Local\Temp\arduino\sketches\E96B8AB6CAE833747893BC9048837C58\sketch\anu_light_blink.ino.cpp -o C:\Users\HP\AppData\Local\Temp\595065291\sketch_merged.cpp
C:\Users\HP\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\HP\AppData\Local\Temp\595065291\sketch_merged.cpp
Compiling sketch...
"C:\Users\HP\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\HP\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\HP\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard" "C:\Users\HP\AppData\Local\Temp\arduino\sketches\E96B8AB6CAE833747893BC9048837C58\sketch\anu_light_blink.ino.cpp" -o "C:\Users\HP\AppData\Local\Temp\arduino\sketches\E96B8AB6CAE833747893BC9048837C58\sketch\anu_light_blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\HP\AppData\Local\Temp\arduino\cores\arduino_avr_uno_a95e79b39fbf45e26c873bf28fafbeba\core.a
Linking everything together...
"C:\Users\HP\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 -Wl,--gc-sections -mmcu=atmega328p -o "C:\Users\HP\AppData\Local\Temp\arduino\sketches\E96B8AB6CAE833747893BC9048837C58/anu_light_blink.ino.elf" "C:\Users\HP\AppData\Local\Temp\arduino\sketches\E96B8AB6CAE833747893BC9048837C58\sketch\anu_light_blink.ino.cpp.o" "C:\Users\HP\AppData\Local\Temp\arduino\sketches\E96B8AB6CAE833747893BC9048837C58/..\..\cores\arduino_avr_uno_a95e79b39fbf45e26c873bf28fafbeba\core.a" "-LC:\Users\HP\AppData\Local\Temp\arduino\sketches\E96B8AB6CAE833747893BC9048837C58" -lm
collect2.exe: error: ld returned 9 exit status

exit status 1

Compilation error: exit status 1

edit your post. place error message between CODE tags. show your sketch in next CODE tags.

1 Like

I asked Google to search "collect2.exe: error" and got a whole bunch of help links.

1 Like

How to Get the Right Help Faster after you have read the forum guidelines:

You can spend weeks spinning your wheels, or you might get lucky and solve your problem quickly. To avoid unnecessary delays, it’s crucial to provide an annotated schematic of your circuit as you have it wired, showing all connections, including power, ground, and supplies.

Why Detailed Information Matters:

  • Annotated Schematics: These are essential because they show exactly how your circuit is set up. Without them, it's difficult for anyone to understand what you’ve done, which makes troubleshooting nearly impossible. Fritzing diagrams or unclear pictures are not enough.
  • Technical Information: Many modules look similar and may even have the same name, but they can function differently. This is why we always ask for links to detailed technical information—not just sales pages like those on Amazon, which often lack the specifics we need.
  • Show All Connections: It’s important to include every connection, especially power and ground, in your schematic. Missing these details makes it hard to determine if a setup issue might be causing your problem.

My Process:

When I see a question, I spend a moment assessing it. If it’s missing critical information, I might ask for it. However, if it's repeatedly lacking important details, I may assume the questioner is not serious and move on to another query.

What You Need to Consider:

We don’t know your skill level or what resources you have available. If you’re missing key technical details or seem unprepared, it may indicate that you need to spend more time learning the basics before starting your project.

Providing the right information upfront will help you get the best possible assistance and avoid the frustration of running into dead ends. Let us help you by sharing what you have clearly and completely!

This thread had a solution... but your error might be different. Contacting @ptillisch

Thanks but this didn't help the folder they asked to delete is not on my pc can you tell me some other way

I can not, but the forum has a search window.

Normally at the end of the compilation you see memory usage statistics. That is before the linker stage. These appear to be missing from the output you supplied.
I'd first rename the sketch to clear any cached artifacts and try again.

Renaming also not working
Can you tell me another working alternative

9 exit status seems unusual.

Does the sketch contain both the setup() and loop() functions?

Looking in detail at the link provided by @xfpd and your compilation log, the possibly corrupt core appears to be at this location on your PC. The instructions were to delete this folder.

C:\Users\HP\AppData\Local\Temp\arduino\cores\arduino_avr_uno_a95e79b39fbf45e26c873bf28fafbeba\

Instead of actually deleting the folder, simply move it elsewhere to allow you to recover more easily from an erroneous deletion

Yes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.