I am able to build and flash my program. But I'm using a custom partition table with 2 app sections, one smaller than the other. How can I make VS Code flash into the 2nd partition instead of the first app partition it finds?
I know VS Code uses the build/flash_projects_args file, but it is automatically generated. In make I could use Makefile to add custom flash commands, how would the equivalent be for cmake in VS Code?
Thanks
How to custom flash command VS Code
- gunar.kroeger
- Posts: 143
- Joined: Fri Jul 27, 2018 6:48 pm
How to custom flash command VS Code
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."
-
- Posts: 229
- Joined: Wed May 02, 2018 12:12 pm
Re: How to custom flash command VS Code
What kind of custom flash commands you would like to use?
Usually for handling partitions, setting a Custom Partition CSV table in menuconfig as shown here https://docs.espressif.com/projects/esp ... tom-tables would allow you to organize the partition table as you see fit.
You could try using the partition tool in ESP-IDF https://docs.espressif.com/projects/esp ... -interface to write specific partitions for the moment, since we haven't implemented this functionality in the extension for the moment.
Usually for handling partitions, setting a Custom Partition CSV table in menuconfig as shown here https://docs.espressif.com/projects/esp ... tom-tables would allow you to organize the partition table as you see fit.
You could try using the partition tool in ESP-IDF https://docs.espressif.com/projects/esp ... -interface to write specific partitions for the moment, since we haven't implemented this functionality in the extension for the moment.
- gunar.kroeger
- Posts: 143
- Joined: Fri Jul 27, 2018 6:48 pm
Re: How to custom flash command VS Code
This is the flash command in Makefile that I used. connectag is the main partition at 0x90000 and Updater is a small partition (other project) that takes updates the main partition with data from the SD card.
My partitions.csv is as follows:
Is there no way to alter the flash command, or a way to send this command in the powershell integrated to VS Code?
Code: Select all
fullflash:
python ${IDF_PATH}/components/esptool_py/esptool/esptool.py --chip esp32 --port COM4 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0xd000 ${PWD_UPDATER}/build/ota_data_initial.bin 0x1000 ${PWD_UPDATER}/build/bootloader/bootloader.bin 0x10000 ${PWD_UPDATER}/build/ESP32_Updater.bin 0x90000 ${PWD}/build/ESP32_connectag.bin 0x8000 ${PWD_UPDATER}/build/partitions.bin
Code: Select all
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
ota_0, app, ota_0, 0x10000, 0x80000
ota_1, app, ota_1, , 0x360000
storage, data, spiffs, , 0x10000
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."
- gunar.kroeger
- Posts: 143
- Joined: Fri Jul 27, 2018 6:48 pm
Re: How to custom flash command VS Code
The parttool.py would work for me, but how can I make PowerShell find it? I'm getting the CommandNotFoundException.ESP_bignacio wrote: ↑Mon Mar 16, 2020 11:45 amYou could try using the partition tool in ESP-IDF https://docs.espressif.com/projects/esp ... -interface to write specific partitions for the moment, since we haven't implemented this functionality in the extension for the moment.
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."
- gunar.kroeger
- Posts: 143
- Joined: Fri Jul 27, 2018 6:48 pm
Re: How to custom flash command VS Code
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."
Who is online
Users browsing this forum: Bing [Bot] and 51 guests