apollo-lhc / cm_mcu

Microcontroller source code for the APOLLO blade for the CMS tracker HL-LHC upgrade.
MIT License
3 stars 2 forks source link

fix version string is wrong on tagged version (issue #194) #195

Closed pkotamnives closed 1 year ago

pkotamnives commented 1 year ago

fix issue #194 by changing the v string to be a temporary one (i.e v_temp) and search for a pointer starting with 'v' from the back by a function strrchr().

Tested by git checkout v.99.4 and modified this code in ZynqMonTask.c. Then, tried the binary file on Apollo205. Instead of seeing :

readstring PL_MEM_CM.MCU_FW_VER 
PL_MEM_CM.MCU_FW_VER: v0.99.4) v0.99.4

now it's changed to:

readstring PL_MEM_CM.MCU_FW_VER
PL_MEM_CM.MCU_FW_VER: v0.99.4-dirty

note that the version output in CLI is also changed from

% version
regular build
commit date 2023-06-28 11:09:36 -0500   (grafted, HEAD, tag: v0.99.4) v0.99.4 built at 17:25:42, Aug 10 2023.

to

% version
DEBUG build
commit date 2023-06-28 11:09:36 -0500   (HEAD, tag: v0.99.4) v0.99.4-dirty built at 11:16:44, Sep 13 2023.
pwittich commented 1 year ago

@pkotamnives please rebase

pkotamnives commented 1 year ago

@pkotamnives please rebase

Done. Can I squash and merge now? Next I will do the same for the fpga_flash PR