Type of files accepted by Arduino IDE?

Good day everyone,

Where can I found some extended instructions about what type of files are accepted by the Arduino IDE, (except the standard *.ino and *.h files) and how the compiler parse them ?

I've seen many examples where files such *.cpp and multiple *.ino files coexist in the same design.

As I understood, could be a master.ino file and some functions.ino files called by the master. All *.h files can be included in the master or in the function files. But the *.cpp? There are other types of files?

I have experience with PIC microcontrollers and pascal compilers. In my humble opinion using the Arduino environment "as is" is very frustrating mostly because the user can't found a complete operating manual (except the Reference). Even a manual in pdf containing the htm from reference could be a good starting point. As a beginner you have to dig too much for undocumented features on the forum.

If the Arduino IDE is based on C++ gcc, then why any operating manual of this compiler can't be found on arduino webpage (or I didn't find it)? There is a link for documentation?

thank you,
Vasile

1 Like

The .ino files are concatenated (in alphabetic order I think) with the "main" sketch being at the start.

Any .cpp files are compiled as separate compilation units and linked in.

Any .h files are used if the are included in the usual way.

Also .asm files are compiled and linked in (I think, I haven't used them).

If the Arduino IDE is based on C++ gcc, ...

It is. Any .ino files are compiled as .cpp files.

1 Like

This post might help: How to avoid the quirks of the IDE sketch file pre-preprocessing

Thank you Nick, you are a great help here, I've saw a few of your webpages too.

I found some answers to my question in arduino: Hacking/BuildProcess

However, where is located the latest avr-gcc compiler used in the latest released Arduino IDE?

thx,
Vasile

1 Like

Let me ask you a question. You just downloaded the Arduino IDE. Where do you think the compiler would be?