-
Notifications
You must be signed in to change notification settings - Fork 6.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
Common DFU partition enumeration API #32257
Labels
RFC
Request For Comments: want input from the community
Comments
Closed
5 tasks
It does not seem that resolving the issue makes any sense: the mcuboot and mcumgr are very much hardcoded to use two images anyway. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem description
Zephyr supports several DFU methods (mcumgr, USB) and the support will increase probably.
The problem is that all of these methods use direct access to flash_map.h macros to decide what should be target partition/flash area for DFU and for that purpose define own macros or functions and naming conventions, for example:
mcumgr uses
img_mgmt_find_best_area_id
to select best partition and directly usesFLASH_AREA_ID
to access it;code relaying on
mcuboot_priv.h
uses definitions ofFLASH_AREA_IMAGE_PRIMARY/SECONDARY
to address partition the app is running from and update candidate; code that is defined inflash_img.c
provided another set of macros and naming for the same task.Above may lead to situations where code from different units would give different identifiers, problem which I have already faced while working on Direct-XIP within mcumgr (apache/mynewt-mcumgr#110)
There is also problem that application, due to configuration, may be more restrictive regarding the DFU target flash area, which modules like mcumgr may not be aware of in their own selection process.
Related or influenced by:
Proposed change
My proposal is that Zephyr should provide DFU API that would allow to get information on currently active partition, the one the application is running from, and enumerate all allowed DFU partitions. Such single point of information would ease development and limit problems where different DFU services
Fr example following functions could be added, the naming is just proposal:
The text was updated successfully, but these errors were encountered: