-
Notifications
You must be signed in to change notification settings - Fork 17.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bootloader: Add Reading of Git SHA to bootloader #28492
base: master
Are you sure you want to change the base?
Conversation
Tools/AP_Bootloader/bl_protocol.cpp
Outdated
@@ -128,6 +128,7 @@ | |||
#define PROTO_DEVICE_FW_SIZE 4 // size of flashable area | |||
#define PROTO_DEVICE_VEC_AREA 5 // contents of reserved vectors 7-10 | |||
#define PROTO_DEVICE_EXTF_SIZE 6 // size of available external flash | |||
#define PROTO_DEVICE_BL_GIT_HASH 7 // git hash of bootloader build | |||
// all except PROTO_DEVICE_VEC_AREA and PROTO_DEVICE_BOARD_REV should be done | |||
#define CHECK_GET_DEVICE_FINISHED(x) ((x & (0xB)) == 0xB) |
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.
I'm unsure if this line would need to be updated to 0x4B
?
This is helpful for users building their own bootloaders, and allowing the user to identify what commit the build was built at. Feedback welcome. |
da23530
to
29788c9
Compare
Tools/AP_Bootloader/bl_protocol.cpp
Outdated
@@ -128,6 +128,7 @@ | |||
#define PROTO_DEVICE_FW_SIZE 4 // size of flashable area | |||
#define PROTO_DEVICE_VEC_AREA 5 // contents of reserved vectors 7-10 | |||
#define PROTO_DEVICE_EXTF_SIZE 6 // size of available external flash | |||
#define PROTO_DEVICE_BL_GIT_HASH 7 // git hash of bootloader build |
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.
I've also got changes that add reading off the Application Git SHA if AP_CHECK_FIRMWARE_ENABLED
is enabled in the bootloader (and application).
We certainly would find these handy, just a question of if this is desirable in the bootloader.
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.
great idea, that would prevent to always have to update the bootloader when you do custom one's !
29788c9
to
ddfcf85
Compare
Allows for reading of the git sha from the bootloader to ascertain the sha the bootloader is built at
ddfcf85
to
8b6bb5c
Compare
Allows the bootloader build to be identified with
uploader.py