How to update compile date/time for each build?

redpanda
Posts: 13
Joined: Thu Feb 04, 2021 8:42 am

How to update compile date/time for each build?

Postby redpanda » Tue May 03, 2022 2:18 pm

esp_ota_get_partition_description() provides info of struct esp_app_desc_t where compile date and time can be retrieved.

I noticed that when a full build is made, the compile date/time is updated as expected. However, when a few sources are changed, and a new incremental build is done, the esp_app_desc_t's compile date/time remains unchanged.

How can compile date/time be reflected for each build regardless of a full or incremental one? Can it be done by touching some specific source files?

mikemoy
Posts: 627
Joined: Fri Jan 12, 2018 9:10 pm

Re: How to update compile date/time for each build?

Postby mikemoy » Tue May 03, 2022 7:07 pm

This does not work for you?


printf("Compiled at:");
printf(__TIME__);
printf(" ");
printf(__DATE__);
printf("\r\n");

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: How to update compile date/time for each build?

Postby ESP_igrr » Tue May 03, 2022 11:08 pm

Hi redpanda,

You can force the app metadata to be updated by touching components/app_update/esp_app_desc.c.

redpanda
Posts: 13
Joined: Thu Feb 04, 2021 8:42 am

Re: How to update compile date/time for each build?

Postby redpanda » Wed May 04, 2022 8:28 am

mikemoy wrote:
Tue May 03, 2022 7:07 pm
This does not work for you?


printf("Compiled at:");
printf(__TIME__);
printf(" ");
printf(__DATE__);
printf("\r\n");
It works! Thank you Mike :>

redpanda
Posts: 13
Joined: Thu Feb 04, 2021 8:42 am

Re: How to update compile date/time for each build?

Postby redpanda » Wed May 04, 2022 8:29 am

ESP_igrr wrote:
Tue May 03, 2022 11:08 pm
Hi redpanda,

You can force the app metadata to be updated by touching components/app_update/esp_app_desc.c.
This works. Thank you, ESP_igrr!

Who is online

Users browsing this forum: No registered users and 233 guests