When creating many different projects and products, building them and programming to micros, it is invariably useful to know exactly which software version is programmed to the micro by report (UART/USB/display, etc).
This can be achieved manually by creating a string constant, copying-in the source project filename and date/time-stamp, and reporting it to host where appropriate at runtime... until such time that the source project is changed and where updating the string constant before build and programming easily gets overlooked.
It would be great to have a Flowcode component that presents the source project filename and creation date/timestamp as string(s) - perhaps as embedded constants updated when the file is saved before build, allowing the correct source project version to always be reported to host.
Thanks and best regards,
Brendan
Get Source Project Filename/Date/Time as String
-
- Posts: 64
- http://meble-kuchenne.info.pl
- Joined: Tue Dec 08, 2020 2:12 pm
- Has thanked: 49 times
- Been thanked: 15 times
-
- Matrix Staff
- Posts: 2076
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 638 times
- Been thanked: 697 times
Re: Get Source Project Filename/Date/Time as String
Hello.
Excluding File name, there is already an Auto Version Identifier component found in Runtime > Matrix Tools.
The Description is:
Basic component designed to provide the program with the date and time of the build. Embedded assigns the time and date of compilation. Simulation assigns the time and date of the start of simulation.
If you select that component and select help, it will open a wiki page and you will see an example project.
Excluding File name, there is already an Auto Version Identifier component found in Runtime > Matrix Tools.
The Description is:
Basic component designed to provide the program with the date and time of the build. Embedded assigns the time and date of compilation. Simulation assigns the time and date of the start of simulation.
If you select that component and select help, it will open a wiki page and you will see an example project.
Martin
Re: Get Source Project Filename/Date/Time as String
Hi Martin.
I'm sure that will help - thank you, though I found the 'Auto Version Identifier' component under Storage >> Utility.
File versions are usually embedded in file names (so that we can recover them in a name search), so ability to reference and report the source project filename (also reflected in the built image) as an embedded constant would be most useful.
Thanks and best regards,
Brendan
I'm sure that will help - thank you, though I found the 'Auto Version Identifier' component under Storage >> Utility.
File versions are usually embedded in file names (so that we can recover them in a name search), so ability to reference and report the source project filename (also reflected in the built image) as an embedded constant would be most useful.
Thanks and best regards,
Brendan
- Attachments
-
- Runtime_Matrix_Tools_B.png (165.55 KiB) Viewed 91 times
-
- Valued Contributor
- Posts: 1065
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 201 times
- Been thanked: 224 times
Re: Get Source Project Filename/Date/Time as String
Hi Martin, Hi Bredan
I've already thought about something like that.
Get a name string...
Perhaps also a string for build number and date/time. Would be easy to send or display two strings.
Demo:
I've already thought about something like that.
Get a name string...
Perhaps also a string for build number and date/time. Would be easy to send or display two strings.
Demo:
-
- Matrix Staff
- Posts: 2076
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 638 times
- Been thanked: 697 times
Re: Get Source Project Filename/Date/Time as String
Ah Yes.
I have noticed I have two different version in two different locations.
The first location I could see was not the version you have.
My apologies, yes it is in Components > Storage > Utility
I will look into adding the additional function, but that won't be until next week.
There are no promises it can be done, I will let you know after investigated.
In the meantime what I do now is start at v1.0.0 and make sure the file has the same revision and the revision is sent via UART.
Then any non releases the last number is increment by 1 e.g. v1.0.1
Any minor releases then the middle number is increment e.g v1.1.1
Any Major releases the first number is incremented by 1 e.g 2.1.1
So long as the file matches revision e.g Remote control v2.1.1 fcfx
By looking at the numbers you instantly know that there have been 2 major releases,1 mior release and 1 beta additional beta release.
Martin