-
Notifications
You must be signed in to change notification settings - Fork 3k
flash: add docs for user defined data #6373
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,35 +18,44 @@ | |
|
||
#include <stdint.h> | ||
|
||
// Target flash algorithm structure | ||
/** Target flash algorithm structure | ||
*/ | ||
typedef struct { | ||
const uint32_t init; | ||
const uint32_t uninit; | ||
const uint32_t erase_sector; | ||
const uint32_t program_page; | ||
const uint32_t static_base; | ||
uint32_t *algo_blob; | ||
const uint32_t init; /**< Init function address */ | ||
const uint32_t uninit; /**< Uninit function address */ | ||
const uint32_t erase_sector; /**< Erase sector function address */ | ||
const uint32_t program_page; /**< Program page function address */ | ||
const uint32_t static_base; /**< Static base address */ | ||
uint32_t *algo_blob; /**< Pointer to flash algo binary blob */ | ||
} flash_algo_t; | ||
|
||
/** Sector information structure | ||
*/ | ||
typedef struct { | ||
const uint32_t start; | ||
const uint32_t size; | ||
const uint32_t start; /**< Sector start address */ | ||
const uint32_t size; /**< Sector size */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The typical range of |
||
} sector_info_t; | ||
|
||
/** Flash configuration structure | ||
*/ | ||
typedef struct { | ||
const uint32_t page_size; | ||
const uint32_t flash_start; | ||
const uint32_t flash_size; | ||
const sector_info_t *sectors; | ||
const uint32_t sector_info_count; | ||
const uint32_t page_size; /**< The minimum program page size that can be written */ | ||
const uint32_t flash_start; /**< Start address of the flash <0, flash_size) */ | ||
const uint32_t flash_size; /**< Flash size. The size is accumulative sum of all sector sizes */ | ||
const sector_info_t *sectors; /**< List of sectors - sector can vary in sizes */ | ||
const uint32_t sector_info_count; /**< Number of sectors */ | ||
} flash_target_config_t; | ||
|
||
// Target flash configuration | ||
/** Target flash configuration | ||
*/ | ||
struct flash_s { | ||
const flash_target_config_t *target_config; | ||
const flash_algo_t *flash_algo; | ||
}; | ||
|
||
/** Flash algo argument structure | ||
* Contains all registers that should be preserved | ||
*/ | ||
typedef struct { | ||
uint32_t r0; | ||
uint32_t r1; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Is
start
the start address of a flash memory block like0x02000000
? is it 32 bit address?