Page 1 of 1

How to update compile date/time for each build?

Posted: Tue May 03, 2022 2:18 pm
by redpanda
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?

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

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


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

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

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

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

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

Posted: Wed May 04, 2022 8:28 am
by redpanda
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 :>

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

Posted: Wed May 04, 2022 8:29 am
by redpanda
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!