Skip to content

Commit

Permalink
Merge branch 'bugfix/ps_export_extra_paths_v4.4' into 'release/v4.4'
Browse files Browse the repository at this point in the history
tools: export.ps1: define functions for helper python tools (v4.4)

See merge request espressif/esp-idf!25142
  • Loading branch information
dobairoland committed Aug 2, 2023
2 parents 949739c + 2c79e03 commit 681f55b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions export.bat
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ if not "%PATH_ADDITIONS%"=="" echo %PATH_ADDITIONS:;=&echo. %
DOSKEY idf.py=python.exe "%IDF_PATH%\tools\idf.py" $*
DOSKEY esptool.py=python.exe "%IDF_PATH%\components\esptool_py\esptool\esptool.py" $*
DOSKEY espefuse.py=python.exe "%IDF_PATH%\components\esptool_py\esptool\espefuse.py" $*
DOSKEY espsecure.py=python.exe "%IDF_PATH%\components\esptool_py\esptool\espsecure.py" $*
DOSKEY otatool.py=python.exe "%IDF_PATH%\components\app_update\otatool.py" $*
DOSKEY parttool.py=python.exe "%IDF_PATH%\components\partition_table\parttool.py" $*

Expand Down
11 changes: 5 additions & 6 deletions export.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@ 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 = [IO.Path]::Combine(${IDF_PATH}, "components", "esptool_py", "esptool")
$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 espsecure.py { &python "$IDF_PATH\components\esptool_py\esptool\espsecure.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
Expand Down

0 comments on commit 681f55b

Please sign in to comment.