Image.base_address option value ('hl.platformiopackages') is not valid

Hi.

When I try to upload my program using upload_protocol = esp-prog I receive this error:

Error: Invalid command argument
image.base_address option value (‘hl.platformiopackages’) is not valid
embedded:startup.tcl:454: Error: ** Programming Failed **

I’m using VS-Code and
platform = espressif32
board = nodemcu-32s

I have no problem uploading using Comport.
I can also debug my program.

Kind regard
Thomas

Can you build with -v (for verbosity) and upload the full log when pio run -v -t upload-ing?

Hi MaxGerhardt.

I will send you a full log tomorrow.

I have tested it on another computer, with --verbose upload, and similar problem.

openocd -s C:\Users\Trine.platformio\packages\tool-openocd-esp32 -s C:\Users\Trine.platformio\packages\tool-openocd-esp32/share/openocd/scripts -f share/openocd/scripts/interface/ftdi/esp32_devkitj_v1.cfg -f share/openocd/scripts/board/esp32-wrover.cfg -c “program_esp32 “{{.pioenvs\esp32doit-devkit-v1\firmware.bin}}” 0x10000 verify” -c “program_esp32 “C:\Users\Trine.platformio\packages\framework-arduinoespressif32\tools\sdk\bin\bootloader_dio_40m.bin” 0x1000 verify” -c “program_esp32 “e:\ESP\PlatformIO\Code\Test1.pioenvs\esp32doit-devkit-v1\partitions.bin” 0x8000 verify” -c “program_esp32 “C:\Users\Trine.platformio\packages\framework-arduinoespressif32\tools\partitions\boot_app0.bin” 0xe000 verify” -c "reset run; shutdown"openocd -s C:\Users\Trine.platformio\packages\tool-openocd-esp32 -s C:\Users\Trine.platformio\packages\tool-openocd-esp32/share/openocd/scripts -f share/openocd/scripts/interface/ftdi/esp32_devkitj_v1.cfg -f share/openocd/scripts/board/esp32-wrover.cfg -c “program_esp32 “{{.pioenvs\esp32doit-devkit-v1\firmware.bin}}” 0x10000 verify” -c “program_esp32 “C:\Users\Trine.platformio\packages\framework-arduinoespressif32\tools\sdk\bin\bootloader_dio_40m.bin” 0x1000 verify” -c “program_esp32 “e:\ESP\PlatformIO\Code\Test1.pioenvs\esp32doit-devkit-v1\partitions.bin” 0x8000 verify” -c “program_esp32 “C:\Users\Trine.platformio\packages\framework-arduinoespressif32\tools\partitions\boot_app0.bin” 0xe000 verify” -c “reset run; shutdown”

Error is:
Error: Invalid command argument
image.base_address option value (‘ramework-arduinoespressif32’) is not valid
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure ‘program_esp32’
in procedure ‘program_error’ called at file “C:\Users\Trine.platformio\packages\tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg”, line 152
at file “embedded:startup.tcl”, line 454

It looks like, it is this command that goes wrong:

“program_esp32 “C:\Users\Trine.platformio\packages\framework-arduinoespressif32\tools\partitions\boot_app0.bin” 0xe000 verify”

The image.base_address should be 0xe000, but it is set to a subtext from the path ‘ramework-arduinoespressif32’

It looks like, that it can’t extract the correct path from the boot_app0.bon file.

Here is the openocd upload command from the other computer.

openocd -s C:\Users\thl.platformio\packages\tool-openocd-esp32 -s C:\Users\thl.platformio\packages\tool-openocd-esp32/share/openocd/scripts -f share/openocd/scripts/interface/ftdi/esp32_devkitj_v1.cfg -f share/openocd/scripts/board/esp-wroom-32.cfg -c “program_esp32 “{{.pioenvs\nodemcu-32s\firmware.bin}}” 0x10000 verify” -c “program_esp32 “C:\Users\thl.platformio\packages\framework-arduinoespressif32\tools\sdk\bin\bootloader_dio_40m.bin” 0x1000 verify” -c “program_esp32 “d:\VSCode\WeightScale_v4_0.pioenvs\nodemcu-32s\partitions.bin” 0x8000 verify” -c “program_esp32 “C:\Users\thl.platformio\packages\framework-arduinoespressif32\tools\partitions\boot_app0.bin” 0xe000 verify” -c “reset run; shutdown”

Error is:
Error: Invalid command argument
image.base_address option value (‘hl.platformiopackages’) is not valid
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure ‘program_esp32’
in procedure ‘program_error’ called at file “C:\Users\thl.platformio\packages\tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg”, line 152
at file “embedded:startup.tcl”, line 454

Same program_esp32 command with error:
“program_esp32 “C:\Users\thl.platformio\packages\framework-arduinoespressif32\tools\partitions\boot_app0.bin” 0xe000 verify”

The image.base_address should be 0xe000, but it is set to a subtext from the path ‘hl.platformio\packages’

OK.
I can se it has to do with the use of BACKSLASH in the path names.
if i manually executes the openocd command from a DOS prompt and changes all "" to “/” it will work.
So the paths are adjustet using escape sequences. E.g. “\b” works as a Backspace, “\t” works as a Horizontal tab, and so on.

Do you have an easy fix for this problem, or do I need to manually run the openocd command for a while?

I’m also seeing this exact symptom and can confirm that switching from \ to / fixes it for my system (Win7 x64, iot-bus-jtag for upload/debug).

I’m looking at upgrading to a paid PIO Plus plan but this issue is the only reason I am hesitant to get one at this time.

Well, found a solution that isn’t exactly pretty but does work Force forward slash for paths for openocd-esp32, new board D-duino-32 by atanisoft · Pull Request #139 · platformio/platform-espressif32 · GitHub

1 Like

Hi Atanisoft.

Perfect.
This small fix works as it should :smile:
Thanks for helping mee out.

Thomas

1 Like