Skip to content
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

Sample program mcuboot/samples/zephyr/hello-world/src/main.c is incomplete. #2118

Open
Rob-Grady opened this issue Nov 12, 2024 · 3 comments

Comments

@Rob-Grady
Copy link

Rob-Grady commented Nov 12, 2024

This sample needs to be upgraded to include usage of the boot image control library. It would be so much more helpful if it would demonstrate how to use the functions:
` int boot_read_bank_header(uint8_t area_id, struct mcuboot_img_header *header, size_t header_size);

bool    boot_is_img_confirmed(void);                                   
int     boot_write_img_confirmed(void);                               
int     boot_write_img_confirmed_multi(int image_index);
int     mcuboot_swap_type(void);                                      
int     mcuboot_swap_type_multi(int image_index);
int     boot_request_upgrade(int permanent);                            
int     boot_request_upgrade_multi(int image_index, int permanent);
int     boot_erase_img_bank(uint8_t area_id);
ssize_t boot_get_area_trailer_status_offset(uint8_t area_id);
ssize_t boot_get_trailer_status_offset(size_t area_size);`

Exactly what is expected and how to do it is very confusing and an expanded sample program would be VERY helpful.

@nordicjm
Copy link
Collaborator

Note that that project is not actually a sample, it's a build test for CI

@Rob-Grady
Copy link
Author

Note that that project is not actually a sample, it's a build test for CI

It is called 'sample/hello-world/...' so people assume it is sample. If it is not a sample, can sample be created?

If it is a build test, can it be expanded to include those function calls?

@nordicjm
Copy link
Collaborator

The samples are in zephyr, there are tests here for booting: https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/boot tests here for DFU: https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/subsys/dfu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants