Using my raspberry pi 4 with Arduino IDE to upload sketches to my Arduino Uno. Raspberry Pi 4 is encased in an Argon Neo (in case that's important).
At first I tried to get the board info and received the response, "Native Serial Port, can't obtain info". I then tried uploading the Blink example sketch to Arduino and received a generic "upload failed" error. I switched usb and tried again but received the same error. I also switched ports and received the same error (/dev/ttyAMA0 & /dev/ttyS0). I did some searching online and enabled verbose output. The error output roughly says that it cannot locate the configuration file.
I am a complete newbie to raspberry pi but I have experience with using terminal. The point is that I want to use this to learn more about raspberry pi and not just get an answer. Will post error output later once I get to my pi-4.
Edit 1: Error output added and port names
User configuration file is "/home/pi/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Edit 2: Fixed port names
Arduino output after trying sudo usermod -aG dialout pi
System wide configuration file is "/opt/arduino-1.8.13/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/home/pi/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyAMA0
Using Programmer : arduino
Overriding Baud Rate : 115200
dmesg
output (wasn't sure how back to copy, but i saved the whole dmesg log in a separate file.
[ 19.914478] Voltage normalised (0x00000000)
[ 38.634664] Under-voltage detected! (0x00050005)
[ 65.674553] Voltage normalised (0x00000000)
[ 69.834601] Under-voltage detected! (0x00050005)
[ 82.321811] Voltage normalised (0x00000000)
[ 338.116949] rpi_firmware_get_throttled: 2 callbacks suppressed
[ 338.116958] Under-voltage detected! (0x00050005)
[ 342.278510] rpi_firmware_get_throttled: 2 callbacks suppressed
[ 342.278517] Voltage normalised (0x00000000)
[ 350.601983] Under-voltage detected! (0x00050005)
[ 354.763011] Voltage normalised (0x00000000)
[ 369.326954] Under-voltage detected! (0x00050005)
[ 373.487373] Voltage normalised (0x00000000)
[ 679.259193] rpi_firmware_get_throttled: 10 callbacks suppressed
[ 679.259201] Under-voltage detected! (0x00050005)
[ 687.580258] rpi_firmware_get_throttled: 10 callbacks suppressed
[ 687.580261] Voltage normalised (0x00000000)
[ 714.622795] Under-voltage detected! (0x00050005)
[ 720.862650] Voltage normalised (0x00000000)
[ 737.503185] Under-voltage detected! (0x00050005)
[ 741.662884] Voltage normalised (0x00000000)
[ 976.004220] usb 1-1.3: new full-speed USB device number 3 using xhci_hcd
[ 976.149437] usb 1-1.3: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01
[ 976.149462] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 976.149481] usb 1-1.3: Manufacturer: Arduino (www.arduino.cc)
[ 976.149499] usb 1-1.3: SerialNumber: 954373133353516141A2
[ 976.219972] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
[ 976.223204] usbcore: registered new interface driver cdc_acm
[ 976.223223] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
Tried updating Raspberry Pi 4, just in case, output from Arduino IDE with some more lines
Linking everything together...
/opt/arduino-1.8.13/hardware/tools/avr/bin/avr-gcc -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o /tmp/arduino_build_445772/Blink.ino.elf /tmp/arduino_build_445772/sketch/Blink.ino.cpp.o /tmp/arduino_build_445772/../arduino_cache_161333/core/core_arduino_avr_uno_cfd507e26af5a1235d5f5c8586d9a1e3.a -L/tmp/arduino_build_445772 -lm
/opt/arduino-1.8.13/hardware/tools/avr/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /tmp/arduino_build_445772/Blink.ino.elf /tmp/arduino_build_445772/Blink.ino.eep
/opt/arduino-1.8.13/hardware/tools/avr/bin/avr-objcopy -O ihex -R .eeprom /tmp/arduino_build_445772/Blink.ino.elf /tmp/arduino_build_445772/Blink.ino.hex
/opt/arduino-1.8.13/hardware/tools/avr/bin/avr-size -A /tmp/arduino_build_445772/Blink.ino.elf
Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
An error occurred while uploading the sketch
/opt/arduino-1.8.13/hardware/tools/avr/bin/avrdude -C/opt/arduino-1.8.13/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyAMA0 -b115200 -D -Uflash:w:/tmp/arduino_build_445772/Blink.ino.hex:i
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/opt/arduino-1.8.13/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/home/pi/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyAMA0
Using Programmer : arduino
Overriding Baud Rate : 115200
SOLUTION: Raspberry Pi 4 was not receiving sufficient voltage and therefore the Arduino USB connection was not stable. Once raspberry pi 4 was connected directly to wall power the issue was resolved and sketches were succesfully uploaded.
Thank you all for your answers and comments