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

Flash API: Enable Flash api on CM3DS #7042

Merged
merged 1 commit into from Jul 11, 2018

Conversation

Projects
None yet
7 participants
@shuoo
Contributor

shuoo commented May 29, 2018

Description

Implement flash APIs for CM3DS on MPS2+. This function is necessary for IAP and other flash related operations.

Pull request type

[ ] Fix
[ ] Refactor
[ ] New target
[x] Feature
[ ] Breaking change
@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jun 4, 2018

This needs rebase to contain only one commit that is now relevant (dependency was merged)

@0xc0170 0xc0170 added needs: work and removed needs: review labels Jun 4, 2018

@shuoo shuoo force-pushed the shuoo:feature-cm3ds-flash branch from b3b51be to 2d50b26 Jun 6, 2018

@cmonr cmonr requested a review from hug-dev Jun 7, 2018

@cmonr cmonr added needs: review and removed needs: work labels Jun 7, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jun 13, 2018

@hug-dev Could you take a look at this PR?

@hug-dev

This comment has been minimized.

Contributor

hug-dev commented Jun 13, 2018

@cmonr Yes sure, we were discussing privately with @shuoo

We will try to execute the Greentea tests on CM3DS with this pull request to ensure everything is ok and then I will approve 👌

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jun 13, 2018

Oh, thanks for the update. Just making sure this PR hadn't gone idle :)

@shuoo shuoo force-pushed the shuoo:feature-cm3ds-flash branch from 2d50b26 to 9b46fc7 Jun 28, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jun 29, 2018

@hug-dev Another idle check. Any luck with greentea tests?

@shuoo

This comment has been minimized.

Contributor

shuoo commented Jun 29, 2018

Greetea test environment on my PC has some problems, I will check with @hug-dev if he has the proper environment to verify this patch.

@cmonr , Do you know the details of the error for cannot be built? I got 404 when click on Details of this error.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jul 3, 2018

@shuoo The reason it's 404'd is because the log was rotated out within Jenkins. I've restarted the job for the time being. I would focus on fixing the idle bug, for now.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jul 3, 2018

@shuoo This has just passed pr-head tests. Are y'all still having dificulties getting this patch to pass greentea tests?

@shuoo shuoo force-pushed the shuoo:feature-cm3ds-flash branch from 9b46fc7 to 0dca412 Jul 4, 2018

@shuoo

This comment has been minimized.

Contributor

shuoo commented Jul 4, 2018

With the help of @hug-dev and @tkaman , I'v run flash related test on CM3DS with MPS2 board. This commit may still can not built by CI because of blocked by other platform's flash test. @cmonr If it fails, can you please help to send the details of failure to us?

Here are the logs from terminal:
Flash Test:
{{__version;1.3.0}}
{{__timeout;20}}
{{__host_test_name;default_auto}}
{{__testcase_count;5}}

Running 5 test cases...
{{__testcase_name;Flash - init}}
{{__testcase_name;Flash - mapping alignment}}
{{__testcase_name;Flash - erase sector}}
{{__testcase_name;Flash - program page}}
{{__testcase_name;Flash - clock and cache test}}

Running case #1: 'Flash - init'...
{{__testcase_start;Flash - init}}
{{__testcase_finish;Flash - init;1;0}}
'Flash - init': 1 passed, 0 failed

Running case #2: 'Flash - mapping alignment'...
{{__testcase_start;Flash - mapping alignment}}
{{__testcase_finish;Flash - mapping alignment;1;0}}
'Flash - mapping alignment': 1 passed, 0 failed

Running case #3: 'Flash - erase sector'...
{{__testcase_start;Flash - erase sector}}
{{__testcase_finish;Flash - erase sector;1;0}}
'Flash - erase sector': 1 passed, 0 failed

Running case #4: 'Flash - program page'...
{{__testcase_start;Flash - program page}}
{{__testcase_finish;Flash - program page;1;0}}
'Flash - program page': 1 passed, 0 failed

Running case #5: 'Flash - clock and cache test'...
{{__testcase_start;Flash - clock and cache test}}
{{__testcase_finish;Flash - clock and cache test;1;0}}
'Flash - clock and cache test': 1 passed, 0 failed

Test cases: 5 passed, 0 failed
{{__testcase_summary;5;0}}
{{max_heap_usage;0}}
{{reserved_heap;0}}
{{end;success}}
{{__exit;0}}

FlashIAP Test:
{{__version;1.3.0}}
{{__timeout;20}}
{{__host_test_name;default_auto}}
{{__testcase_count;4}}

Running 4 test cases...
{{__testcase_name;FlashIAP - init}}
{{__testcase_name;FlashIAP - program}}
{{__testcase_name;FlashIAP - program across sectors}}
{{__testcase_name;FlashIAP - program errors}}

Running case #1: 'FlashIAP - init'...
{{__testcase_start;FlashIAP - init}}
{{__testcase_finish;FlashIAP - init;1;0}}
'FlashIAP - init': 1 passed, 0 failed

Running case #2: 'FlashIAP - program'...
{{__testcase_start;FlashIAP - program}}
{{__testcase_finish;FlashIAP - program;1;0}}
'FlashIAP - program': 1 passed, 0 failed

Running case #3: 'FlashIAP - program across sectors'...
{{__testcase_start;FlashIAP - program across sectors}}
{{__testcase_finish;FlashIAP - program across sectors;1;0}}
'FlashIAP - program across sectors': 1 passed, 0 failed

Running case #4: 'FlashIAP - program errors'...
{{__testcase_start;FlashIAP - program errors}}
{{__testcase_finish;FlashIAP - program errors;1;0}}
'FlashIAP - program errors': 1 passed, 0 failed

Test cases: 4 passed, 0 failed
{{__testcase_summary;4;0}}
{{max_heap_usage;0}}
{{reserved_heap;0}}
{{end;success}}
{{__exit;0}}

@0xc0170 0xc0170 requested a review from ARMmbed/mbed-os-hal Jul 4, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jul 5, 2018

Going to see what CI tests output since CI usage is low atm.
/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Jul 5, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jul 5, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Jul 6, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jul 6, 2018

/morph mbed2-build

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jul 6, 2018

@mbed-os-hal Last chance to take a look at this before it goes in!

@@ -70,6 +70,11 @@ struct analogin_s {
uint16_t ctrl_register; /* Control bits with the channel identifier */
};
/* This structure is not used by the HAL implementation. */
struct flash_s {
uint32_t not_used;

This comment has been minimized.

@ithinuel

ithinuel Jul 9, 2018

Member

I guess this field is defined for compatibility with IAR and ARMC5 but for consistency shouldn't it be a uint8_t like in struct trng_s ?

This comment has been minimized.

@shuoo

shuoo Jul 9, 2018

Contributor

Use uint8_t for consistent.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jul 9, 2018

@mbed-os-hal Last chance to take a look at this before it goes in!

@c1728p9 Please review this use case

Flash API: Enable Flash api on CM3DS
Implement flash_api.c for CM3DS on MPS2+.
Because MPS2+ board has no physical flash chip, the implementation emulates
flash over SRAM.

@shuoo shuoo force-pushed the shuoo:feature-cm3ds-flash branch from 0dca412 to bbb97c8 Jul 9, 2018

@c1728p9

c1728p9 approved these changes Jul 9, 2018

@hug-dev

hug-dev approved these changes Jul 9, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jul 11, 2018

/morph build

@cmonr cmonr added needs: CI and removed needs: review labels Jul 11, 2018

@mbed-ci

This comment has been minimized.

mbed-ci commented Jul 11, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jul 11, 2018

/morph mbed2-build

@cmonr cmonr merged commit c669655 into ARMmbed:master Jul 11, 2018

14 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/astyle Passed, 791 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 10283 cycles (+98 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 9960B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018

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