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

Flash API: Enable Flash api on CM3DS #7042

Merged
merged 1 commit into from
Jul 11, 2018
Merged

Conversation

shuoo
Copy link
Contributor

@shuoo 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
Copy link
Contributor

0xc0170 commented Jun 4, 2018

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

@cmonr
Copy link
Contributor

cmonr commented Jun 13, 2018

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

@hug-dev
Copy link
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
Copy link
Contributor

cmonr commented Jun 13, 2018

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

@cmonr
Copy link
Contributor

cmonr commented Jun 29, 2018

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

@shuoo
Copy link
Contributor Author

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
Copy link
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
Copy link
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
Copy link
Contributor Author

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 a team July 4, 2018 12:03
hug-dev
hug-dev previously approved these changes Jul 5, 2018
@cmonr
Copy link
Contributor

cmonr commented Jul 5, 2018

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

@mbed-ci
Copy link

mbed-ci commented Jul 5, 2018

Build : ABORTED

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

@cmonr
Copy link
Contributor

cmonr commented Jul 5, 2018

/morph build

@mbed-ci
Copy link

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
Copy link

mbed-ci commented Jul 6, 2018

@mbed-ci
Copy link

mbed-ci commented Jul 6, 2018

@cmonr
Copy link
Contributor

cmonr commented Jul 6, 2018

/morph mbed2-build

@cmonr
Copy link
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;
Copy link
Member

Choose a reason for hiding this comment

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

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 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use uint8_t for consistent.

@0xc0170
Copy link
Contributor

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

Implement flash_api.c for CM3DS on MPS2+.
Because MPS2+ board has no physical flash chip, the implementation emulates
flash over SRAM.
@cmonr
Copy link
Contributor

cmonr commented Jul 11, 2018

/morph build

@mbed-ci
Copy link

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
Copy link

mbed-ci commented Jul 11, 2018

@mbed-ci
Copy link

mbed-ci commented Jul 11, 2018

@cmonr
Copy link
Contributor

cmonr commented Jul 11, 2018

/morph mbed2-build

@cmonr cmonr merged commit c669655 into ARMmbed:master Jul 11, 2018
pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018
Flash API: Enable Flash api on CM3DS
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.

7 participants