-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00ab015
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .elf binary is not renamed. it stays firmware.elf.
00ab015
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elf is not just binary, binary is extracted from elf file and renamed.
elf file is not renamed.
https://en.wikipedia.org/wiki/Executable_and_Linkable_Format
00ab015
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for saying "binary".
the problem stays the same. the .elf file is not renamed.
00ab015
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The elf file is not renamed. never has been, is not meant to be renamed. You should not be looking at or touching the elf file in any way
00ab015
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You Compile and it spits out this at the end
resulting in many directories and files in .pio/build including
firmware-20230612-011742.bin
firmware.elf
you use the firmware-20230612-011742.bin file
00ab015
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a good catch. i used till now this:
so this did it.. so i not knew that "default" it is not renamed.
but that would be great.
i naturally know that the elf file is not needed and that i install the .bin.
but if there is a .elf file. i would prefer it should match the .bin file that is build as it belongs to this particular build.
if not possible i dont mind.
00ab015
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ThomasToka: That's outside the scope of these fixes/repo. Feel free to hop on our Discord for help with scripting or one of the other support options below:
00ab015
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ThomasToka I know what you're saying. personally I feel the same way, leaving the files to be named the same before the commit. also in the terminal it doesn't print out the name change, so like if you wanted to see what you just compiled, you don't know. I have a sort of "fix" I'll share.
and I see you want the firmware. bin file named a certain way, may I suggest making a Workflows with GitHub actions?
it took me some time to figure out but there's a way to make it so you can compile your own firmware automatically and have it do multiple files and options.
check it out here it's how I can make all my versions at once.
basically when i create a release it does it automatically.
00ab015
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @classicrocker883 . thank you @thisiskeithb .
just for the records and if someone struggles on this:
the change breaks also building/renaming with a script in a variant.
something like this does not work anymore if the filename is forced in the "parent"..
00ab015
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ThomasToka found your fix
in File: \buildroot\share\PlatformIO\scripts\offset_and_rename.py
just added a second call to rename the "source" which is "firnware.elf" and changed to like the .bin
also adding the
print
function shows the name00ab015
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course that was the whole point. To eliminate the need to specify so many renaming scripts and provide a general approach using the existing rename facility. Instead of using an
extra_scripts
field you will useboard_build.rename
with the desired name pattern. The one you provide overrides any that exists in the parent env.00ab015
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. maybe @thisiskeithb can add this also? then the circle closes.
00ab015
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes i did it like i was able to with my humble knowledge compared to you all here. ;) naturally the way like it is now is way better.
thanks for the patience. we have all the same goal.
00ab015
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so i had a look at this. and implemented it for me like this to have the name consistent for my fork.
this does the job dynamically as your suggestion lead to:
so the elf name was not the same as the .bin
now it is consistent:
thank your for pointing out where to look.
00ab015
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ThomasToka well the point was so you can edit the name in the .ini file.
add
-E3S1Pro-abl5x5-LA-personal-F4
before .bin (remove ".bin" following the edit below) where it says firmware-{date}-{time}edit: oh I see what you want to do, so you can remove .bin from the .ini file and add to the end of
BIN_NAME = Path(target[0]... ', '%H%M%S.bin'))))
followup edit:
or replace that line with
this is probably the best solution, so you just change whatever
board_build.rename = firmware....
to whatever you like.00ab015
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats what i did if you look at my solution.. all good. thank you.