Skip to content

Support erase value in Flash HAL drivers, FlashIAP and block devices #8589

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 1 commit into from
Nov 8, 2018

Conversation

davidsaada
Copy link
Contributor

@davidsaada davidsaada commented Oct 30, 2018

Description

This change adds support for getting the flash erase value in HAL drivers (all), FlashIAP driver and FlashIAP block device. It is required for the case upper layers need to check whether a flash area is erased or not. The vast majority of flash components produce the all ones (0xFF) value following an erase, and this includes all components currently supported by mbed-os. However, this change allows the addition of other components with different erase values (such as 0).
Resolves #6405.

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[x] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

@0xc0170 0xc0170 requested a review from a team October 30, 2018 14:41
@0xc0170
Copy link
Contributor

0xc0170 commented Oct 30, 2018

cc @ARMmbed/team-st-mcd @ARMmbed/team-silabs @ARMmbed/team-nxp @ARMmbed/team-realtek @ARMmbed/team-renesas @ARMmbed/team-toshiba

@0xc0170 0xc0170 requested a review from a team November 5, 2018 12:40
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 6, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Nov 6, 2018

Build : FAILURE

Build number : 3551
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/8589/

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 6, 2018

@davidsaada Some build failures indicate missing flash HAL implementations, please review

@davidsaada davidsaada force-pushed the david_flash_erase_value branch from 42296e2 to 5b2f21d Compare November 6, 2018 14:01
@davidsaada
Copy link
Contributor Author

Some build failures indicate missing flash HAL implementations, please review

Thanks @0xc0170. Should be OK now.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 6, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Nov 6, 2018

Build : FAILURE

Build number : 3559
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/8589/

@davidsaada davidsaada force-pushed the david_flash_erase_value branch from 5b2f21d to 542744d Compare November 7, 2018 12:23
@davidsaada
Copy link
Contributor Author

Should really be OK now.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 7, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Nov 7, 2018

Build : SUCCESS

Build number : 3570
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/8589/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Nov 7, 2018

@mbed-ci
Copy link

mbed-ci commented Nov 7, 2018

@cmonr
Copy link
Contributor

cmonr commented Nov 8, 2018

Note: This PR is now a part of a rollup PR (#8675).

Jenkins CI export nodes experienced many drops throughout the day causing false failures. In an attempt to get those PRs through CI, while keeping CI load low, several PRs have been bundled into a single rollup PR.

If any more commits are made in this PR, this PR will remain open and have to go through CI on its own.

@0xc0170 0xc0170 mentioned this pull request Nov 8, 2018
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 8, 2018

/morph export-build

@mbed-ci
Copy link

mbed-ci commented Nov 8, 2018

@cmonr cmonr merged commit 3046e31 into ARMmbed:master Nov 8, 2018
@@ -134,4 +134,12 @@ void flash_set_target_config(flash_t *obj)
}

#endif // #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)

MBED_NONSECURE_ENTRY uint8_t flash_get_erase_value(const flash_t *obj)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flash_get_erase_value is added her as non-secure entry function. May I know why this API is different than rest of the API's in file?

It is causing build failures in generating secure side library :-(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC @ARMmbed/mbed-os-maintainers @ARMmbed/team-nuvoton

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

Successfully merging this pull request may close these issues.

8 participants