Page 1 of 1

Get the value of the addresses dynamically

Posted: Fri Jun 09, 2023 9:19 am
by pepopi
Hello I am modifying the esp-serial-flaser and I would like to know if there is a way to obtain the application's address. Almost always the bootloader address and the partition table address is the same. But how could I obtain the address of where to flash the firmware.bin dynamically?
Thank you

Re: Get the value of the addresses dynamically

Posted: Fri Jun 09, 2023 11:28 am
by MicroController

Code: Select all

build/flasher_args.json
or

Code: Select all

build/flash_args

Re: Get the value of the addresses dynamically

Posted: Sun Jun 11, 2023 6:34 pm
by pepopi
Thank you for answering, but could you give a more comprehensive response or an example where this is used?
Thank you

Re: Get the value of the addresses dynamically

Posted: Sun Jun 11, 2023 7:07 pm
by MicroController
The build system writes the FLASH addresses for the binaries into these files in the build directory. There are the flash_*_args files which are passed to esptool.py by idf.py flash and the same information is also made available as a .json file for third-party software.
The .bin files themselves do not contain this meta-information. You could probably also parse the partition table (binary) and infer from partition names/types which binary is supposed to go where.