What is the compiler used with the Arduino MCU ? if it is not gcc or g++ , so what is it?
Turn on verbose compiler option in 'preferences', and compile blink.ino. Peruse the reams of information relating to the compilation process. You should find it there.
almost all toolchains for different MCU supported by Arduino are based on gnu toolchain
but this is the IDE, not the toolchain. the toolchain depends on the selected MCU
Guess you didn't read past my first sentence.
compile...
"C:\Users...\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=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "- {etc}
However, others are correct, this isn't quite the answer to "toolchain", so I'll leave it to them.
Where do I find the toolchain? Sorry, but I have no information.
When you install a board, through the board manager, part of their board definitions includes which set of tools to install including which compiler:
Once the board is installed, the tools are stored in the Arduino15 directory...
Which for example for ESP32... you see, something like this:
Which on my machine is setup at: C:\Users\kurte\AppData\Local\Arduino15\packages\esp32\tools
As mentioned by others, which tools are used depends on the board type.
They specify a bunch of this information in their boards.txt and platform.txt which are
stored at the root of their hardware install. Again in my case for Esp32, that would be:
C:\Users\kurte\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.4
This is my case, is that mean the compiler is gcc?
It may really depend...
Note: I am not an ESP32 expert, hopefully others can fill in the details.
But I do know that not all ESP32s are the same. I think they have several different architectures and for example some may be: ARM based, others are RISC based, ...
Which compiler that is used may easily depend on which ESP32 you choose.
The best thing is to turn on verbose output: In the preferences dialog you showed,
the checkboxes for Show verbose output during... turn on at least compilation.
I tried to build something for a PICO-D4 and some of the compile lines looked like:
"C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-x32\\2302/bin/xtensa-esp32-elf-g++" -MMD -c "@C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-b6b4727c58\\esp32/flags/cpp_flags" -Wall -Wextra -Os -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_PICO -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ESP32_PICO\"" "-DARDUINO_VARIANT=\"pico32\"" -DARDUINO_PARTITION_default "-DARDUINO_HOST_OS=\"windows\"" "-DARDUINO_FQBN=\"esp32:esp32:pico32:UploadSpeed=921600,PartitionScheme=default,DebugLevel=none,EraseFlash=none\"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 "@C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-b6b4727c58\\esp32/flags/defines" "-IC:\\Users\\kurte\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024718-38264-pxu9jl.xnure\\GetChipID" -iprefix "C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-b6b4727c58\\esp32/include/" "@C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-b6b4727c58\\esp32/flags/includes" "-IC:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-b6b4727c58\\esp32/dio_qspi/include" "-IC:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.4\\cores\\esp32" "-IC:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.4\\variants\\pico32" "@C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino\\sketches\\C9A954706F78C6022EB510D2BE06D0F1/build_opt.h" "@C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino\\sketches\\C9A954706F78C6022EB510D2BE06D0F1/file_opts" "C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.4\\cores\\esp32\\Esp.cpp" -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino\\sketches\\C9A954706F78C6022EB510D2BE06D0F1\\core\\Esp.cpp.o"
Actually they are various Tensilica cores and RISC-V depending on the variant.
all the common arduino MCU toolchains use gcc
So, once you enabled verbose compiler output, what did you see in the compiler output when you compiled something trivial, like blink?
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.