wokwi-features icon indicating copy to clipboard operation
wokwi-features copied to clipboard

ESP-IDF JSON Support - Custom Naming

Open martysweet opened this issue 1 year ago • 4 comments
trafficstars

Describe the bug With the VSCode plugin, I am looking to use the flasher_args.json functionality to read in a custom binary (containing NVS flash data).

AFAIK flasher_args.json is an internal idf framework file, and additional parameters cannot be easily added via a simple idf.py build command (I may be wrong, but haven't found much/any documentation on this).

To avoid conflicts, my workaround is to create a manual file called wokwi_flasher_args.json which will then:

  • On build, copy ./wokwi_flasher_args.json to ./build/wokwi_flasher_args.json
  • firmware: 'build/wokwi_flasher_args.json' is set

However, it looks like the current implementation may be checking for the exact path. The same file, with a different filename (within build) results in a simulation boot loop. It would be ideal if it could see it as a .json, and derive that it is a flasher_args from the extension - or is this a known issue with the functionality?

To Reproduce ESP-IDF project:

[wokwi]
version = 1
firmware = 'build/flasher_args.json'
elf = 'build/example_app.elf'

Works, however:

[wokwi]
version = 1
firmware = 'build/my_custom_flasher_args.json'
elf = 'build/example_app.elf'

Does not work.

Expected behavior I would like custom naming support for flasher_args.json, to avoid any internal conflicts with idf.py tooling.

Environment (please complete the following information):

  • OS: Linux
  • VSCode
  • Wokwi Extension v2.5.3

martysweet avatar Sep 24 '24 10:09 martysweet