How to compile the examples?

RollingRocker
Posts: 16
Joined: Tue Feb 09, 2021 10:45 pm

How to compile the examples?

Postby RollingRocker » Thu Sep 23, 2021 3:36 pm

Can someone please share with me the proper way to compile the examples especially the ones under system?

I am able to compile the esp-at and flash that to my board but I don’t know how to build and test the various examples…

I’m on windows BTW

Thanks in advance

dtaylor
Posts: 8
Joined: Tue Aug 24, 2021 5:27 pm

Re: How to compile the examples?

Postby dtaylor » Thu Sep 23, 2021 5:56 pm

This is the guide that I used.
https://docs.espressif.com/projects/esp ... t-started/

Essentially you setup the command line build environment which is based in python.
Then looks like in Windows you get a shortcut which fires the esport.bat script that initializes the build environment. You have to do this each time you start working so the terminal has the build environment setup.

You recursively copy the example you want somewhere so you can have a working copy.
Change directory into the copied folder.
The first time you are in the newly copied folder you need to run idf.py set-target esp32
Then you need to run idf.py menuconfig, this is also only required the first time unless you need to make changes, after hit q it will save.
Then you can run idf.py build which will just build.
To build then flash run idf.py -p PORT [-b BAUD] flash
I found with the esp32 wroom did not need baud rate so if you have a device at COM1 run idf.py -p COM1 flash
If you also want to see the out of serial logging in the terminal run idf.py -p COM1 monitor flash

I found it was helpful to setup aliases for these commands for easy running.

RollingRocker
Posts: 16
Joined: Tue Feb 09, 2021 10:45 pm

Re: How to compile the examples?

Postby RollingRocker » Thu Sep 23, 2021 7:08 pm

@dtaylor thank you very much. I will give that a try.

Who is online

Users browsing this forum: No registered users and 116 guests