Multiple "main" targets in a single project

koshin
Posts: 10
Joined: Sat Apr 15, 2023 11:30 pm

Multiple "main" targets in a single project

Postby koshin » Tue Apr 18, 2023 12:12 pm

I have a project that involves a few ESP32 chips running different software. I would like to set up an ESP-IDF project in which there is more than one "main" target that I can build. So I would like to be able to run ninja main_abc and ninja main_xyz or something like that in order to build different targets. I would also need some way to load different targets onto the chip, like idf.py flash does, but with a specific target specified. Is something like this possible using idf.py?

I considered just creating multiple separate projects with idf.py create-project, but each piece of software shares a lot of the same components, and having multiple different projects makes it difficult to share components.

I also considered just writing a single main target with #ifdefs for switching between the different bits of software that I'm trying to build, but it gets really messy that way.

Who is online

Users browsing this forum: aapee-jcv and 453 guests