Get the value of the addresses dynamically

pepopi
Posts: 32
Joined: Mon Apr 11, 2022 9:45 am

Get the value of the addresses dynamically

Postby pepopi » Fri Jun 09, 2023 9:19 am

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

MicroController
Posts: 1729
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Get the value of the addresses dynamically

Postby MicroController » Fri Jun 09, 2023 11:28 am

Code: Select all

build/flasher_args.json
or

Code: Select all

build/flash_args

pepopi
Posts: 32
Joined: Mon Apr 11, 2022 9:45 am

Re: Get the value of the addresses dynamically

Postby pepopi » Sun Jun 11, 2023 6:34 pm

Thank you for answering, but could you give a more comprehensive response or an example where this is used?
Thank you

MicroController
Posts: 1729
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Get the value of the addresses dynamically

Postby MicroController » Sun Jun 11, 2023 7:07 pm

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.

Who is online

Users browsing this forum: No registered users and 111 guests