* Follow the Getting Started instructions which include building the "Hello World" example.
* Change into the directory of the new example you'd like to build.
* Run `idf.py menuconfig` to open the project configuration menu. Most examples have a project-specific "Example Configuration" section here (for example, to set the WiFi SSID & password to use).
-* `make` to build the example.
-* Follow the printed instructions to flash, or run `idf.py flash`.
+* `idf.py build` to build the example.
+* Follow the printed instructions to flash, or run `idf.py -p PORT flash`.
# Copying Examples
Build each project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
Build the project and flash it to the board, then run monitor tool to view serial output.
```
-idf.py flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
> 1. Please flash the [`ble_mesh_fast_prov_server`](https://glab.espressif.cn/ble_mesh/esp-ble-mesh-v0.6/tree/ble_mesh_release/esp-ble-mesh-v0.6/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server) to your boards first;
> 2. To have a better understanding of the performance of the BLE Mesh network, we recommend that at least 3 devices should be added in your network.
> 3. We recommend that you solder LED indicators if your development board does not come with lights.
-> 4. Please check the type of board and LED pin definition enabled in `Example BLE Mesh Config` by running `make menuconfig`
+> 4. Please check the type of board and LED pin definition enabled in `Example BLE Mesh Config` by running `idf.py menuconfig`
![Board](images/device.png)
![Checkenvironment](images/picture1.png)
-4. Run `make -j4 flash` to compile codes and flash the codes to the device.
+4. Run `idf.py -p PORT flash` to compile codes and flash the codes to the device.
![compiledcode](images/picture2.png)
- **Configuration Server model**: The role of this model is mainly to configure Provisioner device’s AppKey and set up its relay function, TTL size, subscription, etc.
- **OnOff Server model**: This model implements the most basic function of turning the lights on and off.
-The default purpose of this demo is to enable the advertising function with 20-ms non-connectable interval in BLE 5.0. You can disable this function through menuconfig: `make menuconfig --> Example Configuration --> This option facilitates sending with 20ms non-connectable interval...`
+The default purpose of this demo is to enable the advertising function with 20-ms non-connectable interval in BLE 5.0. You can disable this function through menuconfig: `idf.py menuconfig --> Example Configuration --> This option facilitates sending with 20ms non-connectable interval...`
For a better demonstration effect, an RGB LED can be soldered onto the ESP32-DevKitC board, by connecting their corresponding GPIO pins are GPIO\_NUM\_25, GPIO\_NUM\_26, GPIO\_NUM\_27. Then you need to select the following option in menuconfig:
- `make menuconfig --> Example Configuration --> Board selection for BLE Mesh --> ESP-WROOM-32`
+ `idf.py menuconfig --> Example Configuration --> Board selection for BLE Mesh --> ESP-WROOM-32`
Please check the [tutorial](tutorial/Ble_Mesh_Node_Example_Walkthrough.md) for more information about this example.
├── README.md /* Quick start guide */
├── build
├── main /* Stores the `.c` and `.h` application code files for this demo */
-├── sdkconfig /* Current parameters of `make menuconfig` */
-├── sdkconfig.defaults /* Default parameters of `make menuconfig` */
-├── sdkconfig.old /* Previously saved parameters of `make menuconfig` */
+├── sdkconfig /* Current parameters of `idf.py menuconfig` */
+├── sdkconfig.defaults /* Default parameters of `idf.py menuconfig` */
+├── sdkconfig.old /* Previously saved parameters of `idf.py menuconfig` */
└── tutorial /* More in-depth information about the demo */
```
To be functional across different applications, the BLE Mesh menuconfig is specifically designed to offer a variety of configuration options, which can be helpful in tailoring your own configuration.
-The list of configuration options in BLE Mesh menuconfig is stored in `Component config` ---> `[]Bluetooth Mesh support` and can be accessed with the command `make menuconfig`. This configuration option list is shown below.
+The list of configuration options in BLE Mesh menuconfig is stored in `Component config` ---> `[]Bluetooth Mesh support` and can be accessed with the command `idf.py menuconfig`. This configuration option list is shown below.
```
—— Bluetooth Mesh support
├── Makefile /* Compiling parameters for the demo */
├── README.md /* Quick start guide */
├── build
-├── sdkconfig /* Current parameters of `make menuconfig` */
-├── sdkconfig.defaults /* Default parameters of `make menuconfig` */
-├── sdkconfig.old /* Previously saved parameters of `make menuconfig` */
+├── sdkconfig /* Current parameters of `idf.py menuconfig` */
+├── sdkconfig.defaults /* Default parameters of `idf.py menuconfig` */
+├── sdkconfig.old /* Previously saved parameters of `idf.py menuconfig` */
└── tutorial /* More in-depth information about the demo */
```
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
### Project configuration in menuconfig
-Enter `make menuconfig` if you are using GNU Make based build system or enter `idf.py menuconfig` if you' are using CMake based build system.
+Enter `idf.py menuconfig` if you are using GNU Make based build system or enter `idf.py menuconfig` if you' are using CMake based build system.
1. In the `Example Configuration` menu:
* Choose the kind of Ethernet this example will run on under `Ethernet Type`.
### Build and Flash
-Enter `make -j4 flash monitor` if you are using GNU Make based build system or enter `idf.py build flash monitor` if you' are using CMake based build system.
+Enter `idf.py -p PORT flash monitor` if you are using GNU Make based build system or enter `idf.py build flash monitor` if you' are using CMake based build system.
(To exit the serial monitor, type ``Ctrl-]``.)
### Project configuration in menuconfig
-Enter `make menuconfig` if you are using GNU Make based build system or enter `idf.py menuconfig` if you' are using CMake based build system.
+Enter `idf.py menuconfig` if you are using GNU Make based build system or enter `idf.py menuconfig` if you' are using CMake based build system.
1. In the `Example Configuration` menu:
* Enable storing history commands in flash under `Store command history in flash`.
### Build and Flash
-Enter `make -j4 flash monitor` if you are using GNU Make based build system or enter `idf.py build flash monitor` if you' are using CMake based build system.
+Enter `idf.py -p PORT flash monitor` if you are using GNU Make based build system or enter `idf.py build flash monitor` if you' are using CMake based build system.
(To exit the serial monitor, type ``Ctrl-]``.)
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
* program upload failure
- * Hardware connection is not correct: run `idf.py monitor`, and reboot your board to see if there are any output logs.
+ * Hardware connection is not correct: run `idf.py -p PORT monitor`, and reboot your board to see if there are any output logs.
* The baud rate for downloading is too high: lower your baud rate in the `menuconfig` menu, and try again.
For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
* program upload failure
- * Hardware connection is not correct: run `idf.py monitor`, and reboot your board to see if there are any output logs.
+ * Hardware connection is not correct: run `idf.py -p PORT monitor`, and reboot your board to see if there are any output logs.
* The baud rate for downloading is too high: lower your baud rate in the `menuconfig` menu, and try again.
For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.
### Configure the Project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
* Program upload failure
- * Hardware connection is not correct: run `idf.py monitor`, and reboot your board to see if there are any output logs.
+ * Hardware connection is not correct: run `idf.py -p PORT monitor`, and reboot your board to see if there are any output logs.
* The baud rate for downloading is too high: lower your baud rate in the `menuconfig` menu, and try again.
For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.
### Configure the Project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options, the flash size should be set to 4 MB.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
* Program upload failure
- * Hardware connection is not correct: run `idf.py monitor`, and reboot your board to see if there are any output logs.
+ * Hardware connection is not correct: run `idf.py -p PORT monitor`, and reboot your board to see if there are any output logs.
* The baud rate for downloading is too high: lower your baud rate in the `menuconfig` menu, and try again.
For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
* Programming fail
- * Hardware connection is not correct: run `idf.py monitor`, and reboot your board to see if there are any output logs.
+ * Hardware connection is not correct: run `idf.py -p PORT monitor`, and reboot your board to see if there are any output logs.
* The baud rate for downloading is too high: lower your baud rate in the `menuconfig` menu, and try again.
For any technical queries, please open an [issue] (https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
* program upload failure
- * Hardware connection is not correct: run `idf.py monitor`, and reboot your board to see if there are any output logs.
+ * Hardware connection is not correct: run `idf.py -p PORT monitor`, and reboot your board to see if there are any output logs.
* The baud rate for downloading is too high: lower your baud rate in the `menuconfig` menu, and try again.
For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.
### Configure the Project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
* Programming fail
- * Hardware connection is not correct: run `idf.py monitor`, and reboot your board to see if there is any output logs.
+ * Hardware connection is not correct: run `idf.py -p PORT monitor`, and reboot your board to see if there is any output logs.
* The baud rate for downloading is too high: lower your baud rate in the `menuconfig` menu, and try again.
For any technical queries, please open an [issue] (https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.
### Configure the Project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
* Programming fail
- * Hardware connection is not correct: run `idf.py monitor`, and reboot your board to see if there is any output logs.
+ * Hardware connection is not correct: run `idf.py -p PORT monitor`, and reboot your board to see if there is any output logs.
* The baud rate for downloading is too high: lower your baud rate in the `menuconfig` menu, and try again.
For any technical queries, please open an [issue] (https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
Set serial port under Serial Flasher Options and save the configuration.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
or
```
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
or
```
-idf.py flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
or
```
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
or
```
-idf.py flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
or
```
### Build and Flash
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
or
```
-idf.py flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
or
```
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
or
```
-idf.py flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
or
```
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
or
```
-idf.py flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
- Wi-Fi or Ethernet connection is established, and IP address is obtained.
- Asio chat client connects to the corresponding server whose port number and IP are defined through the project configuration menu.
-- Chat client receives all messages from other chat clients, also it sends message received from stdin using `idf.py monitor`.
+- Chat client receives all messages from other chat clients, also it sends message received from stdin using `idf.py -p PORT monitor`.
## Running the example
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher config
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set default serial port under Serial Flasher config
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
See the `esp_local_ctrl` component documentation for details.
-Before using the example, run `make menuconfig` (or `idf.py menuconfig` if using CMake build system) to configure Wi-Fi or Ethernet. See "Establishing Wi-Fi or Ethernet Connection" section in [examples/protocols/README.md](../README.md) for more details.
+Before using the example, run `idf.py menuconfig` (or `idf.py menuconfig` if using CMake build system) to configure Wi-Fi or Ethernet. See "Establishing Wi-Fi or Ethernet Connection" section in [examples/protocols/README.md](../README.md) for more details.
## Client Side Implementation
#include "lwip/err.h"
#include "lwip/sys.h"
-/* The examples use WiFi configuration that you can set via 'make menuconfig'.
+/* The examples use WiFi configuration that you can set via 'idf.py menuconfig'.
If you'd rather not, just change the below entries to strings with
the config you want - ie #define EXAMPLE_WIFI_SSID "mywifissid"
* In order to test the file server demo :
1. compile and burn the firmware `idf.py -p PORT flash`
- 2. run `idf.py monitor` and note down the IP assigned to your ESP module. The default port is 80
+ 2. run `idf.py -p PORT monitor` and note down the IP assigned to your ESP module. The default port is 80
3. test the example interactively on a web browser (assuming IP is 192.168.43.130):
1. open path `http://192.168.43.130/` or `http://192.168.43.130/index.html` to see an HTML web page with list of files on the server (initially empty)
2. use the file upload form on the webpage to select and upload a file to the server
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
- Wait for WiFi to connect to your access point
### Configure the application
Configure the UART pins used for modbus communication using command and table below.
```
-make menuconfig
+idf.py menuconfig
```
```
### Build and flash software of master device
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
### Configure the application
Configure the UART pins used for modbus communication using command and table below.
```
-make menuconfig
+idf.py menuconfig
```
```
### Build and flash software
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
# ESP-MQTT sample application
(See the README.md file in the upper level 'examples' directory for more information about examples.)
-This example connects to the broker URI selected using `make menuconfig` (using mqtt tcp transport) and as a demonstration subscribes/unsubscribes and send a message on certain topic.
+This example connects to the broker URI selected using `idf.py menuconfig` (using mqtt tcp transport) and as a demonstration subscribes/unsubscribes and send a message on certain topic.
(Please note that the public broker is maintained by the community so may not be always available, for details please see this [disclaimer](https://iot.eclipse.org/getting-started/#sandboxes))
Note: If the URI equals `FROM_STDIN` then the broker address is read from stdin upon application startup (used for testing)
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
## Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
## Configure the project
```
-make menuconfig
+idf.py menuconfig
```
Set following parameter under Serial Flasher Options:
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
## Configure the project
```
-make menuconfig
+idf.py menuconfig
```
Set following parameter under Serial Flasher Options:
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
## Configure the project
```
-make menuconfig
+idf.py menuconfig
```
Set following parameter under Serial Flasher Options:
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
## Configure the project
```
-make menuconfig
+idf.py menuconfig
```
Set following parameter under Serial Flasher Options:
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
```
make erase_flash
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
Or, enable `Reset Provisioning` option under `Example Configuration` under menuconfig. But this will erase the saved Wi-Fi credentials every time the device boots, so this is not the preferred solution.
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
```
make erase_flash
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
Or, enable `Reset Provisioning` option under `Example Configuration` under menuconfig. But this will erase the saved Wi-Fi credentials every time the device boots, so this is not the preferred solution.
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
```
make erase_flash
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
Or, enable `Reset Provisioning` option under `Example Configuration` under menuconfig. But this will erase the saved Wi-Fi credentials every time the device boots, so this is not the preferred solution.
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
```
make erase_flash
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
Or, enable `Reset Provisioning` option under `Example Configuration` under menuconfig. But this will erase the saved Wi-Fi credentials every time the device boots, so this is not the preferred solution.
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
When building the project and flashing it to the board FOR THE FIRST TIME after enabling flash encryption feature in menuconfig, run following command to program ESP32 and monitor the output
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
When reprogramming the device subsequently use following command for encrypted write of new plaintext application
```
-make -j4 encrypted-app-flash monitor
+idf.py encrypted-app-flash monitor
```
Please note above command programs only the app partition. In order to reprogram all partitions (bootloader, partition table and application) in encrypted form use
```
-make -j4 encrypted-flash monitor
+idf.py encrypted-flash monitor
```
## Example Output
This example demonstrates how to use the SPIFFS image generation tool [spiffsgen.py](../../../components/spiffs/spiffsgen.py) to automatically create a SPIFFS
filesystem image from the contents of a host folder during build, with an option of
-automatically flashing the created image on invocation of `idf.py flash`.
+automatically flashing the created image on invocation of `idf.py -p PORT flash`.
For more information, see description of `spiffsgen.py` on the ESP-IDF Programming Guide under API Reference > Storage > SPIFFS Filesystem.
The following gives an overview of the example:
2. The function `spiffs_create_partition_image` is used to specify that a SPIFFS image
should be created during build for the `storage` partition. For CMake, it is called from [the main component's CMakeLists.txt](./main/CMakeLists.txt);
for Make, from the [project Makefile](./Makefile). `FLASH_IN_PROJECT` specifies that the created image
-should be flashed on invocation of `idf.py flash` together with app, bootloader, partition table, etc.
+should be flashed on invocation of `idf.py -p PORT flash` together with app, bootloader, partition table, etc.
For both build systems, the image is created on the example's build directory with the output filename `storage.bin`.
-3. Upon invocation of `idf.py flash monitor`, application loads and
+3. Upon invocation of `idf.py -p PORT flash monitor`, application loads and
finds there is already a valid SPIFFS filesystem in the `storage` partition with files same as those in `spiffs_image` directory. The application is then
able to read those files.
or
```CMake
# CMake
-idf.py flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
# Create a SPIFFS image from the contents of the 'spiffs_image' directory
# that fits the partition named 'storage'. FLASH_IN_PROJECT indicates that
# the generated image should be flashed when the entire project is flashed to
-# the target with 'idf.py flash'.
+# the target with 'idf.py -p PORT flash'.
spiffs_create_partition_image(storage ../spiffs_image FLASH_IN_PROJECT)
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
```
cd $IDF_PATH/examples/system/network_tests
-make defconfig
-make -j4
-make flash
+idf.py build
+idf.py -p PORT flash
```
## Run test
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)
#include "esp_pm.h"
#include "nvs_flash.h"
-/*set the ssid and password via "make menuconfig"*/
+/*set the ssid and password via "idf.py menuconfig"*/
#define DEFAULT_SSID CONFIG_EXAMPLE_WIFI_SSID
#define DEFAULT_PWD CONFIG_EXAMPLE_WIFI_PASSWORD
### Configure the project
```
-make menuconfig
+idf.py menuconfig
```
* Set serial port under Serial Flasher Options.
Build the project and flash it to the board, then run monitor tool to view serial output:
```
-make -j4 flash monitor
+idf.py -p PORT flash monitor
```
(To exit the serial monitor, type ``Ctrl-]``.)