Build timstamp issue with MCUXpresso 11.5.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Build timstamp issue with MCUXpresso 11.5.0

Jump to solution
1,347 Views
jeffthompson
Contributor V

My firmwareRev.c file contains

 

#pragma message "FWID " XSTR(FW_MSB) " " XSTR(FW_LSB) " built " XSTR(__DATE__) " " XSTR(__TIME__) " type " XSTR(FW_USER_DEFINED)

 

in which macros FS_MSB, FW_LSB, and FW_USER_DEFINED evaluate to numeric values that get printed as expected.

I have a pre-build step that does

touch -m ../source/FirmwareRev.c

This worked just fine in MCUXpresso 11.4.and prior. But now that I've upgraded to 11.5, the output never changes, even though the file is getting touched:

09:47:28 **** Build of configuration pogo for project F1721_KAS_Downloadable ****
make -r -j16 all
make --no-print-directory pre-build
ls -l ../../F1721_KAS/source/firmwareRev.c ; touch -m ../../F1721_KAS/source/firmwareRev.c
-rw-rw-r-- 1 jthompso jthompso 5593 Feb 25 16:15 ../../F1721_KAS/source/firmwareRev.c

make --no-print-directory main-build
Building file: C:/Users/jthompson/Documents/GitHubProjects/F1721_IR4_KAS/F1721_KAS/source/firmwareRev.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -std=gnu99 -D__REDLIB__ -DCPU_MIMXRT1062DVL6A -DCPU_MIMXRT1062DVL6A_cm7 -D_POSIX_SOURCE -DXIP_BOOT_HEADER_DCD_ENABLE=1 -DSKIP_SYSCLK_INIT -D_DEBUG=1 -DXIP_EXTERNAL_FLASH=1 -DXIP_BOOT_HEADER_ENABLE=1 -DUSB_STACK_BM -DFSL_FEATURE_PHYKSZ8081_USE_RMII50M_MODE -DFSL_SDK_ENABLE_DRIVER_CACHE_CONTROL=1 -DPRINTF_ADVANCED_ENABLE=1 -DUSE_RTOS=1 -DLWIP_DNS=1 -DLWIP_DHCP=1 -DMBEDTLS_CONFIG_FILE=\"ksdk_mbedtls_config.h\" -DFSL_RTOS_FREE_RTOS -DCR_INTEGER_PRINTF -DPRINTF_FLOAT_ENABLE=0 -D__MCUXPRESSO -D__USE_CMSIS -DDEBUG -DSDK_DEBUGCONSOLE=1 -DDOWNLOAD_BUILD -DTARGET_BUILD=TARGET__STANDARD_KAS -D__SEMIHOST_HARDFAULT_DISABLE -DDEVELOPMENT_BUILD=0 -DCNAME_HACK=1 -DWATCHDOG_ENABLED -UUSE_USB_TYPE_A_PORT -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\board" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\source" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\usb\host" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\usb\host\class" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\usb\include" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\osa" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\usb\phy" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\drivers" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\drivers\freertos" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\device" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\CMSIS" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\lwip\port\arch" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\lwip\src\include\compat\posix\arpa" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\lwip\src\include\compat\posix\net" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\lwip\src\include\compat\posix" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\lwip\src\include\compat\posix\sys" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\lwip\src\include\compat\stdc" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\lwip\src\include\lwip" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\lwip\src\include\lwip\priv" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\lwip\src\include\lwip\prot" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\lwip\src\include\netif" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\lwip\src\include\netif\ppp" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\lwip\src\include\netif\ppp\polarssl" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\lwip\port" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\mbedtls\port\ksdk" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\amazon-freertos\freertos\portable" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\amazon-freertos\include" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\utilities" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\component\lists" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\component\serial_manager" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\component\uart" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\xip" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\utility" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\lwip_httpscli_mbedTLS" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\lwip\src" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\lwip\src\include" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\mbedtls\include" -I"C:\Users\jthompson\Documents\GitHubProjects\F1721_IR4_KAS\F1721_KAS\source\root_certificates" -O0 -fno-common -g1 -Wall -Werror -fomit-frame-pointer -c -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Wno-unused-variable -Wno-unused-function -fmerge-constants -fmacro-prefix-map="../source/"=. -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -D__REDLIB__ -fstack-usage -specs=redlib.specs -MMD -MP -MF"source/firmwareRev.d" -MT"source/firmwareRev.o" -MT"source/firmwareRev.d" -o "source/firmwareRev.o" "C:/Users/jthompson/Documents/GitHubProjects/F1721_IR4_KAS/F1721_KAS/source/firmwareRev.c"
C:/Users/jthompson/Documents/GitHubProjects/F1721_IR4_KAS/F1721_KAS/source/firmwareRev.c:164:9: note: '#pragma message: FWID (0x00) (0xc1) built "Feb 26 2022" "09:47:30" type (0)'
164 | #pragma message "FWID " XSTR(FW_MSB) " " XSTR(FW_LSB) " built " XSTR(__DATE__) " " XSTR(__TIME__) " type " XSTR(FW_USER_DEFINED)
| ^~~~~~~
Finished building: C:/Users/jthompson/Documents/GitHubProjects/F1721_IR4_KAS/F1721_KAS/source/firmwareRev.c

How can I make this work again?

Tags (1)
0 Kudos
1 Solution
1,306 Views
jeffthompson
Contributor V

That macro is new to me, so I reinstalled 11.5.0 and found that it works as advertised, so I'll switch to using __TIMESTAMP__.

View solution in original post

0 Kudos
2 Replies
1,307 Views
jeffthompson
Contributor V

That macro is new to me, so I reinstalled 11.5.0 and found that it works as advertised, so I'll switch to using __TIMESTAMP__.

0 Kudos
1,310 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @jeffthompson ,

I tested on a RT1060 hello_world demo with MCUxpresso 10.5.0. I use following code.

 

#pragma message "Last modified on " __TIMESTAMP__

 

And add pre-build step

jingpan_0-1646305560379.png

When compile, it shows

jingpan_1-1646306310728.png

 

Regards,

Jing

https://mcuoneclipse.com/2021/03/24/touch-build-auto-update-of-firmware-date-and-time/

 

0 Kudos