Writing Makefile for project

azarubkin
Posts: 6
Joined: Wed Sep 02, 2015 6:13 pm

Writing Makefile for project

Postby azarubkin » Fri Sep 04, 2015 7:49 pm

Espressif IOT SDK User Manual says that we need to put all source files to 'app' subfolder of SDK tree. And there are gen_misc.bat and gen_misc.sh which supply the compilation options.

But how do I write Makefile which makes use of these compilation options?

I have looked for Makefiles in examples - they all seem to ignore the options that are passed by gen_misc.sh script (i.e. BOOT, APP, SPI_SPEED, SPI_MODE and SPI_SIZE_MAP).

I have tried to use Makefile in the root folder of SDK - it compiles my sources, but it doesn't define any GEN_BINS, GEN_LIBS, GEN_IMAGES which are required to generate the firmware files. Where should I define these variables and what value should they contain?

dkinzer
Posts: 52
Joined: Fri Jul 31, 2015 7:37 am

Re: Writing Makefile for project

Postby dkinzer » Fri Sep 04, 2015 10:36 pm

azarubkin wrote:Espressif IOT SDK User Manual says that we need to put all source files to 'app' subfolder of SDK tree
Personally, I find the directory structure and build procedure provided unnecessarily complicated and difficult to understand. I adopted a much more straightforward procedure using just a makefile and a single-level directory structure for the source and the generated object files in a subdirectory. It could be expanded to utilize additional subdirectories along the lines of the "driver" subdirectory but, so far, I've avoided that complication.
Don Kinzer
Beaverton, OR, USA

eriksl
Posts: 159
Joined: Fri May 22, 2015 6:22 pm

Re: Writing Makefile for project

Postby eriksl » Sat Sep 05, 2015 2:31 am

Exactly!

I don't see AT ALL why you should stick to that monstrosity.

I just made up a Makefile myself, as I always do, and copied the relevant parts, which are only a few lines in the end.

Who is online

Users browsing this forum: No registered users and 42 guests