Building multiple targets inside the same project

bobcatt
Posts: 1
Joined: Thu Mar 07, 2019 12:23 am

Building multiple targets inside the same project

Postby bobcatt » Fri Mar 08, 2019 9:17 am

Hi

I have an esp-idf project for which I would like to compile two bin (firmware) files, each containing their own void app_main().

What I would like to have is something like this :
  • main_app.c with my main application
  • factory_app.c with a minimal application
Then, when I do make all, I get:
  • project_name.(bin|elf) as per usual
  • factory_app.(bin|elf) as a 2nd esp-32 firmware for factory purpose
Could someone give any pointer on this please?

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Building multiple targets inside the same project

Postby PeterR » Fri Mar 08, 2019 3:46 pm

This illustrates one approach where two builds share the same source code:
https://github.com/espressif/esp-idf/tr ... /unit_test

If you need conditional compilation within some of the files then add a compilation flag.
I think cleaner this way than all in one directory:
/project/production
/project/factory
etc
& I also believe that IDF CAN should be fixed.

Who is online

Users browsing this forum: No registered users and 145 guests