So why is some of the Arduino core written in C, rather than C++?

I was thinking that if only wiring_digital.c was wiring_digital.cpp, then one could (for example), make digitalWrite() polymorphic and support things like:

   digitalWrite(i2cexpander, pin, value);

And so on.

This would mean that it would be difficult to call the core digitalWrite() from straight C modules. But why should there be ANY straight C modules? Simply renaming them to .cpp would pretty much preserve all the existing functionality, except for (perhaps) ISR code.

End users could be forced into this as well. They could still write C code, but they'd have to name it (and have it compiled) as C++

would that make digitalWrite/Read() slower?

Nothing is stopping you from writing all the digitalWrite() variations you want. It does not matter that one version is written in C.

Could it be that some low-level code was inherited and reused from Atmel support packages that were written in C?

C++ came from C so some of it is still the same as no change was needed, actually a lot.
Also, the Arduino Company uses the Arduino Language on their boards, NOT C or C++.

All Arduino code is compiled with a standard C++ compiler. It's pretty hard to argue that it's not C++.

Edit: *.c files (like wiring_digital.c ), of course, are compiled as standard C.

I am simply repeating what @ptillisch said on another post today. I agree it uses the C++ compiler.

There is one little preprocessor directive that does and is used a lot #pragma.
In C++, #pragma is a preprocessor directive used to provide special instructions to the compiler. NOTE It is compiler-specific meaning its behavior can vary depending on which compiler you are using (GCC, Clang, MSVC, etc.).

no, the Arduino IDE uses the industry standard GCC compiler

Maybe, but according to a top Arduino employee contributor on the forum, the Arduino Corporation calls THEIR language Arduino Language. See the following link https://forum.arduino.cc/t/seeed-xiao-nrf52840-requires-python/1387022/2?u=sonofcy

To quote:

The Arduino company considers the language used in the .ino files of sketches to be a unique language ("Arduino language"). However, it is essentially C++.

yes. the .ino file is translated by a java script into a complete .cpp file. the .ino is less restrictive than .cpp, avoiding details for less experienced programmer. the java script will add #inlcudes, function prototypes, ... and the translated file becomes a .cpp file

and while you can have multiple files in your project, only the main one, with setup() and loop() needs to be a .ino, all others can be .ino, .cpp or .c

this is the output from the IDE showing the use of avr-gcc use to cross compile for the AVR processors

C:\Tools\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Tools\Arduino\hardware -hardware C:\Users\lenovo\AppData\Local\Arduino15\packages -tools C:\Tools\Arduino\tools-builder -tools C:\Tools\Arduino\hardware\tools\avr -tools C:\Users\lenovo\AppData\Local\Arduino15\packages -built-in-libraries C:\Tools\Arduino\libraries -libraries C:\Users\lenovo\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10813 -build-path C:\Users\lenovo\AppData\Local\Temp\arduino_build_667107 -warnings=more -build-cache C:\Users\lenovo\AppData\Local\Temp\arduino_cache_796544 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\lenovo\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\lenovo\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\lenovo\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\lenovo\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\lenovo\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\lenovo\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -verbose C:\stuff\SW\Arduino\_Others\Tst\Tst.ino
C:\Tools\Arduino\arduino-builder -compile -logger=machine -hardware C:\Tools\Arduino\hardware -hardware C:\Users\lenovo\AppData\Local\Arduino15\packages -tools C:\Tools\Arduino\tools-builder -tools C:\Tools\Arduino\hardware\tools\avr -tools C:\Users\lenovo\AppData\Local\Arduino15\packages -built-in-libraries C:\Tools\Arduino\libraries -libraries C:\Users\lenovo\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10813 -build-path C:\Users\lenovo\AppData\Local\Temp\arduino_build_667107 -warnings=more -build-cache C:\Users\lenovo\AppData\Local\Temp\arduino_cache_796544 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\lenovo\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\lenovo\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\lenovo\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\lenovo\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\lenovo\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\lenovo\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -verbose C:\stuff\SW\Arduino\_Others\Tst\Tst.ino
Using board 'uno' from platform in folder: C:\Users\lenovo\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\lenovo\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Detecting libraries used...
"C:\\Users\\lenovo\\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=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\sketch\\Tst.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Generating function prototypes...
"C:\\Users\\lenovo\\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=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\sketch\\Tst.ino.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\preproc\\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE
"C:\\Tools\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\sketch\\Tst.ino.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\sketch\\Tst.ino.cpp.o"
Compiling libraries...
Compiling core...
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -x assembler-with-cpp -flto -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\wiring_pulse.S" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\wiring_pulse.S.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -Os -Wall -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\WInterrupts.c" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\WInterrupts.c.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -Os -Wall -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\wiring_analog.c" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\wiring_analog.c.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -Os -Wall -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\wiring.c" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\wiring.c.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -Os -Wall -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\hooks.c" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\hooks.c.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -Os -Wall -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\wiring_digital.c" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\wiring_digital.c.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -Os -Wall -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\wiring_pulse.c" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\wiring_pulse.c.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -Os -Wall -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\wiring_shift.c" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\wiring_shift.c.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\HardwareSerial1.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\HardwareSerial1.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\CDC.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\CDC.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\HardwareSerial.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\HardwareSerial.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\HardwareSerial0.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\HardwareSerial0.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\HardwareSerial2.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\HardwareSerial2.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\HardwareSerial3.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\HardwareSerial3.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\IPAddress.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\IPAddress.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\PluggableUSB.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\PluggableUSB.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\Print.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\Print.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\Stream.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\Stream.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\Tone.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\Tone.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\USBCore.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\USBCore.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\WMath.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\WMath.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\WString.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\WString.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\abi.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\abi.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\main.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\main.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\new.cpp" -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\new.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\wiring_pulse.S.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\WInterrupts.c.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\hooks.c.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\wiring.c.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\wiring_analog.c.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\wiring_digital.c.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\wiring_pulse.c.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\wiring_shift.c.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\CDC.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\HardwareSerial.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\HardwareSerial0.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\HardwareSerial1.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\HardwareSerial2.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\HardwareSerial3.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\IPAddress.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\PluggableUSB.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\Print.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\Stream.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\Tone.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\USBCore.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\WMath.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\WString.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\abi.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\main.cpp.o"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar" rcs "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\core.a" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\core\\new.cpp.o"
Archiving built core (caching) in: C:\Users\lenovo\AppData\Local\Temp\arduino_cache_796544\core\core_arduino_avr_uno_408f562128edad4f0bb0053f2bb4f21e.a
Linking everything together...
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -Wall -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections,-u,vfprintf -lprintf_flt -lm -mmcu=atmega328p -o "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107/Tst.ino.elf" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107\\sketch\\Tst.ino.cpp.o" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107/core\\core.a" "-LC:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107" -lm
"C:\\Users\\lenovo\\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\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107/Tst.ino.elf" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107/Tst.ino.eep"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107/Tst.ino.elf" "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107/Tst.ino.hex"
"C:\\Users\\lenovo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\lenovo\\AppData\\Local\\Temp\\arduino_build_667107/Tst.ino.elf"
Sketch uses 4734 bytes (14%) of program storage space. Maximum is 32256 bytes.
Global variables use 194 bytes (9%) of dynamic memory, leaving 1854 bytes for local variables. Maximum is 2048 bytes.

I too was surprised that the core was C and not C++ given everything else in Arduino is C++

I have a few guesses about the C based core library

  1. avr-gcc tools weren't totally stable back when Arduino started.
    In fact the very first week I started to play with AVRs (not Arduino) back in the 2006/2007 time frame (I was hanging out over on AVRfreaks back then)
    I ran into an issue where the avr-gcc compiler was screwing up the stack frame on ISR C functions when they used local variables. At that point in time was no way to write an ISR in C much less C++ - when it had local variables.
    I was shocked that nobody on the avr-gcc development team had even tried it because if they had it wouldn't work.
    So I'm assuming that there were likely C++ related issues at that point as well.
    C could make things simpler and easier to debug for the Arduino developers.
    Also, when I starting playing with Arduino back around 2007/2008 there were some issues with C++, things like trying to declare AVR progmem had issues.
    Depending on how you did the declaration, it either would not compile or would generate a warning. It was very ugly back then.

  2. I'm guessing early Arduino.cc developers/founders were not familiar with C++
    This one is speculation on my part but from my interactions and conversations with Arduino developers such as Dave Mellis back in the early days going back to 2007/2008, it was pretty clear that they were very green and lacked programming and project development experience.
    For example, concepts such as atomicity and some unique issues related to RISC based processors and the AVR were totally foreign and not understood by them.
    This conclusion about atomicity came from an argument I had with Mellis over the implementation of digitalWrite() - I found an Atmoiciy race condition issue in the code the first week I was playing with Arduino.
    The interrupt masking in wiring_digital.c was added after I pointed out the atmoicity issue and proved that this would fix the issue and in particular once fixed allow the servo library to finally work as intended.
    Dave would not listen to me, so I had Paul Stoffregen (Teensy creator, who I had been working with at the time) offer the fixes to Dave since he had a relationship with Dave.
    In Dave's defense there were many people that could not grasp how foreground code could corrupt a register when interrupted by an ISR.
    They would blame the ISR but in fact it was the foreground code that was doing the actual register corruption.

--- bill

No.

"#pragma" is essentially unused in the Arduino cores. (only in some MBED code, of all the cores I have installed.)
and it's present in C as well as C++ (at least, in gcc C)

I too was surprised that the core was C and not C++ given everything else in Arduino is C++

Huh. The oldest Arduino I have is v0003, which is indeed all in C (no Serial.print() !) The next version I have is 0012, at which point C++ does seem to start to sneak in. It's possible that in the timeframe of the original Wiring code (2003!), C++ didn't work on AVRs.


Huh. I could swear that I had tried overloading digitalWrite() and had it not work (with an error that implied that you could not do that), but I tried again and it DOES seem to go OK! Maybe it was trying to combine the idea with templates (I wanted digitalWrite({10, 11, 12}, 1);)

/*
 * Write multiple pins
 */
 void digitalWrite(byte *pinList, byte val) __attribute__((noinline));
void digitalWrite(byte *pinList, byte val) {
  while (*pinList != 0xFF) {
    digitalWrite(*pinList++, val);
  }
}

void setup() {
  pinMode(13, OUTPUT);
}

byte pins[] = {13, 2, 3, 0xFF};

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

I'd usually ignore this controversial subject, but I'll point out that the IDE will happily compile .cpp files (as C++, without the usual pre-processing) or .c files (as C), if you include them in a project.

And the language "the core" is written in doesn't have to match the language that is implemented for users.

I am simply repeating what the seniour Arduino employee said.

Interesting but does not change what the seniour Arduino employee said.

what do you think?
Does the Arduino IDE use C/C++ or some other cross compiler?
Will a C/C++ progam using GCC run on an Arduino board?

Hi,
I'm new to Arduino, and am unable to write C(++), and have been using Basic since the 80s :confused:

Anyway, I think I recall Elon Musk saying that some of the code on his rockets is in original C not C++ because it is a kind on C++ core and works faster.
C.

while i believe code without using more elaborate C++ features is compiled the same as in C, it's not clear what the performance penalty is for using elaborate features such as virtual functions that require indirection.

Stroustrup warned about using C++ features unnecessarily. I believe following that advice avoids performance penalties