Guys,
I have verbose enabled and I can see what its compiling, but what I'd love to know is where the build rules that determine which cpp, c and s files are compiled.
What I'm trying to do is to support several different microcontrollers using the new feature in 1.5 where the My Documents Arduino folder can have a hardware folder inside it.
(There is a massive thread about it in the microcontrollers section.)
However although the code I have works for the STM32F1 series of processors, I now have a STM32F407 processor board I want to use.
But I don't want to completely duplicate all the code for the F1 into a whole new section of hardware, I
I've looked in boards.txt and platforms.txt but I can't see that platforms.txt (or boards.txt) specifices which source files to compile.
e.g the recipies in platform.txt
## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.libsam.c.flags} {includes} "{source_file}" -o "{object_file}"
Just appears to be describing how to compile a c (or cpp or s file), rather than defining search paths to look for the source files.
e.g. How does the IDE know to look in the cores, and system folders etc
I can see that in some places there are .mk files, that may be part of the process, but I can only see one of these files in 1.5.8 in the SAM tree for Due.
So it looks like the IDE just searches through, For Example. the hardware/arduino/avr folder and then possibly compiles every c, cpp or s file it encounters ?
I'm not sure what the variant folder does e.g. in SAM
There seems to be a make file in in build_gcc
Is the build process for this documented anywhere ?