For Renesas, with the custom IDE’s specifically tailored to those microcontrollers designed by Renesas, a lot of work is done for the developer.  Linking, toolchain selection, makefile creation, all of these items are either taken care of entirely or in good part by the IDE.  The argument can be made that there’s no reason to learn these things, the tools have been provided and by now, they’re pretty good.  And this is true.  However, as embedded developers, I feel that by nature, we need to go a little more in depth.  In a limited playing field, significantly constrained by both memory space and processor speed, sometimes every bit of performance from a microcontroller needs to be utilized.  Also, a better understanding yields a better ability to debug.

For those a bit newer to the embedded world, there may be some confusion as to what a makefile even is.  Basically, the makefile simplifies the entire process of compiling code.  It also has the capability of immediately starting a debug session after compiling, or immediately loading it onto the microcontroller upon successfully compiling.  It detects what files were changed since the last time it compiled and decides whether or not it needs to recompile everything or just a portion, and it can also be forced to do a complete recompile even if there haven’t been major changes.  In our Renesas IDEs, the makefiles are mostly transparent because these actions, building, cleaning, and so on are done through our interactions with the GUI interface, which then in turn utilizes the makefile.

The makefile of your project isn’t actually created until the first time you build your project.  I created a project for an RX63N demo board and, without making any changes, built it so I could see the bare makefile.  Your first build takes considerably longer because it is looking at all of the dependencies and creating the makefile before it executes it and actually builds the project.  This makefile has a large warning at the top:

###########################################################################

Automatically-generated file. Do not edit!

##########################################################################

This is good advice.  But do not edit does not mean do not review.  I find it extremely helpful to review everything and make sure that I didn’t miss anything in the setup of my workspace and the particular project.  I check to see if the linkers are correct - (is this the correct toolchain for the RX63N?), if the FPU settings are what I need them to be, and if my included libraries are actually included, though this is something that will be checked throughout the entire design process.  Also, if there is an error in the build process, there’s the option of going into the makefile, looking at what follows the @echo and seeing exactly what it is that the build was attempting to do when it failed.

If you never make mistakes with your settings and always create your projects perfectly and always link your libraries correctly, delving into the makefile may be a waste of time.  As for me, I enjoy the ability to double check that my project is starting off on the right foot and doing what it’s supposed to.