Jump to content
Sign in to follow this  
Picxie

Linker To Insert Build Number And/ Or Date.

Recommended Posts

How about a few system strings eg called SYS_DATE, SYS_TIME, SYS_DATE_AND_TIME and SYS_BUILD which get added when used pragmas such as USE_SYS_DATE, USE_SYS_TIME, USE_SYS_DATE_AND_TIME and USE_SYS_BUILD.

 

The linker could then insert the correct time and date and increment and insert an incremented build number (which could be kept in the project file)

 

These would be quite handy.

Share this post


Link to post
Share on other sites
How about a few system strings eg called SYS_DATE, SYS_TIME, SYS_DATE_AND_TIME and SYS_BUILD which get added when used pragmas such as USE_SYS_DATE, USE_SYS_TIME, USE_SYS_DATE_AND_TIME and USE_SYS_BUILD.

 

The linker could then insert the correct time and date and increment and insert an incremented build number (which could be kept in the project file)

 

These would be quite handy.

 

Just to clarify your request. Do you want to use these constants in the code? If yes than they need to be expanded not by linker but by the compiler before they are written into obj file.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Yes Constants in the code (as rom char*)so I can refer to them

 

eg println(SYS_DATE);

 

As I imagine it, each would have a known fixed length, the compilor would reserve space for them but I would expect the linker to hunt them down and populate them with the build time values.

 

I dont think it will require any compilor changes. All that is required is for the preprocessor to insert the appropriate var

eg

rom char * SYS_DATE = {"dd:mm:yyyy",0};

 

Just to clarify your request. Do you want to use these constants in the code? If yes than they need to be expanded not by linker but by the compiler before they are written into obj file.

 

Regards,

Pavel

Edited by Picxie

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×