[Solving] open NUL: The system cannot find the file specified.

Hi all,

I've seen this problem a few times, but haven't seen a solution yet. I'm having this issue and am troubleshooting it to find a solution. Here's what I've found so far...

"C:\\progra~2\\Arduino\\hardware\\tools\\avr/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=atmega2560 -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\progra~2\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\progra~2\\Arduino\\hardware\\arduino\\avr\\variants\\mega" "C:\\Users\\Nathan\\AppData\\Local\\Temp\\arduino_build_469035\\sketch\\Blink2.ino.cpp" -o nul

the problem in the above codebox is the "nul" at the end (i.e. after the "-o"). The "-o" flag needs to be followed by a path to an output file, but instead is followed by 'nul'. When I copy/pasted the above command from the Arduino IDE terminal and then manually editied it by replacing "nul" with a file path, it outputted a file (attached to this post - "Blink2.ino.ppp" ).

This file looks like a c++ source file and is heavily documented with boilerplate comments. If I can somehow compile this outputted c++ source file and send the compiled version to the arduino, I think it would work. I'll update this thread as a figure out more.

Edit 1:
So it looks like my initial hypothesis was wrong, pert's verbose log also has "-o nul" in it. I guess the reason for the "-o nul" is to keep the console from displaying the output. If the -o is removed from the command, it spams the console with the output file.

Which version of the Arduino IDE are you using?

Which version of Arduino AVR Boards are you using? You can find the boards package version by checking in Tools > Board > Boards Manager.

Arduino IDE Version - 1.8.9

Arduino AVR Boards - Built in by Arduino - 1.6.23

Hi Pert, here's one thing I could really use your help with:
Could you enable verbose mode for verify and compile, then successfully compile a sketch and send it to the board, then copy/paste the log file as a reply to this forum post?

It'd really help me out.

Note: A slightly more comprehensive description of the problem, potential solution, and attached file can be found at: https://forum.arduino.cc/index.php?topic=618201.0
I accidentally double posted and can't figure out how to delete :confused:

It was longer than the Forums maximum of 9000 characters so I attached it as a txt file.

verbose_output.txt (32.9 KB)

Thanks man, really appreciate that!

Ok, so new update. It looks like somehow my Null.sys driver isn't being loaded and that is the new probable cause. I've tried a million things to get it up and running, but no luck so far.

Maybe the Chinese GhostDisk version of Win 10 I'm running has something to do with it...God, why is this so hard?

I'm sorry things are going difficult for you. For the vast majority of users, it's just install the IDE, plug in the Arduino, hit upload and they have a blinking LED already. Unfortunately, there is the rare situation where something doesn't work right and then it can be very frustrating.

One possible workaround would be to use the Arduino Web Editor. That does the compilation in the cloud so that would work around a local compilation issue. The upload process still occurs locally, but there is a good chance the cause of your compilation issue would not also affect the upload process: