mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
change(tools): export.ps1: define functions for helper python tools
Follows the approach used in Initialise-Idf.ps1 created by the tools installer. This is the closes equivalent of "alias" used in export.bat Closes https://github.com/espressif/esp-idf/issues/9849
This commit is contained in:
parent
6db7b11d7e
commit
4153351bb8
@ -51,11 +51,10 @@ foreach ($pair in $envars_array) {
|
||||
}
|
||||
|
||||
# Allow calling some IDF python tools without specifying the full path
|
||||
# ${IDF_PATH}/tools is already added by 'idf_tools.py export'
|
||||
$IDF_ADD_PATHS_EXTRAS = ${S} + [IO.Path]::Combine(${IDF_PATH}, "components", "app_update")
|
||||
$IDF_ADD_PATHS_EXTRAS += ${S} + [IO.Path]::Combine(${IDF_PATH}, "components", "espcoredump")
|
||||
$IDF_ADD_PATHS_EXTRAS += ${S} + [IO.Path]::Combine(${IDF_PATH}, "components", "partition_table")
|
||||
$env:PATH = $IDF_ADD_PATHS_EXTRAS + $S + $env:PATH
|
||||
function idf.py { &python "$IDF_PATH\tools\idf.py" $args }
|
||||
function espefuse.py { &python "$IDF_PATH\components\esptool_py\esptool\espefuse.py" $args }
|
||||
function otatool.py { &python "$IDF_PATH\components\app_update\otatool.py" $args }
|
||||
function parttool.py { &python "$IDF_PATH\components\partition_table\parttool.py" $args }
|
||||
|
||||
#Compare Path's OLD vs. NEW
|
||||
$NEW_PATH = $env:PATH.split($S) | Select-Object -Unique # array without duplicates
|
||||
|
Loading…
x
Reference in New Issue
Block a user