Skip to content

Adding file data to the firmware file #1993

Answered by Redstonetill
Redstonetill asked this question in Q&A
Discussion options

You must be logged in to vote

So testing everything, it seems to work. So I want to explain how I did it for the prime hub.
First of all you will need to bring your file to the correct file name (this can be changed, but then the code I am going to publish here also needs to be changed). So the filename would be img.bin

Then you are going to create an empty folder inside of bricks/primehub called build. You can copy your file into this folder.
After that you will open the file bricks/_common/arm_none_ebai.mk. Scroll down till you see the line

# firmware blob without main.mpy or checksum - use as base for appending other .mpy
$(BUILD)/firmware-base.bin: [...]

You replace the whole "block" with this:

# firmware blob wi…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Redstonetill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant