Skip to content

Flash API support using the MCUXpresso drivers #4064

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
Apr 7, 2017

Conversation

mmahadevan108
Copy link
Contributor

@mmahadevan108 mmahadevan108 commented Mar 28, 2017

Flash API support using the MCUXpresso Flash driver

Status

**READY

  • Tests
    mbedgt: test suite report:
+----------+---------------+------------------------------+--------+--------------------+-------------+
| target   | platform_name | test suite                   | result | elapsed_time (sec) | copy_method |
+----------+---------------+------------------------------+--------+--------------------+-------------+
| K64F-IAR | K64F          | mbed-os-tests-mbed_hal-flash | OK     | 13.31              | shell       |
+----------+---------------+------------------------------+--------+--------------------+-------------+
mbedgt: test suite results: 1 OK
mbedgt: test case report:
+----------+---------------+------------------------------+-------------------------------+--------+--------+--------+--------------------+
| target   | platform_name | test suite                   | test case                     | passed | failed | result | elapsed_time (sec) |
+----------+---------------+------------------------------+-------------------------------+--------+--------+--------+--------------------+
| K64F-IAR | K64F          | mbed-os-tests-mbed_hal-flash | Flash - buffer alignment test | 1      | 0      | OK     | 0.2                |
| K64F-IAR | K64F          | mbed-os-tests-mbed_hal-flash | Flash - clock and cache test  | 1      | 0      | OK     | 0.1                |
| K64F-IAR | K64F          | mbed-os-tests-mbed_hal-flash | Flash - erase sector          | 1      | 0      | OK     | 0.04               |
| K64F-IAR | K64F          | mbed-os-tests-mbed_hal-flash | Flash - init                  | 1      | 0      | OK     | 0.1                |
| K64F-IAR | K64F          | mbed-os-tests-mbed_hal-flash | Flash - mapping alignment     | 1      | 0      | OK     | 0.05               |
| K64F-IAR | K64F          | mbed-os-tests-mbed_hal-flash | Flash - program page          | 1      | 0      | OK     | 0.14               |
+----------+---------------+------------------------------+-------------------------------+--------+--------+--------+--------------------+
mbedgt: test case results: 6 OK
mbedgt: completed in 18.08 sec

@mmahadevan108
Copy link
Contributor Author

@0xc0170 @sg- @maclobdell


uint32_t flash_get_page_size(const flash_t *obj)
{
return 1024;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the minimum write unit (page) 1024 bytes or 8 bytes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Minimum write unit is 8 bytes. Is this what is expected for Page size. This would slow down the program. 1024 should work.

@bridadan
Copy link
Contributor

/morph test-nightly

#include "fsl_flash.h"

// Storage for flash driver.
flash_config_t g_flash;
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this not part of flash_t ?


int32_t flash_free(flash_t *obj)
{
return 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

No deinit in Flash_ API? Is flash peripheral always on?

{
int status;

core_util_critical_section_enter();
Copy link
Contributor

Choose a reason for hiding this comment

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

it might be worth documenting at least in the commit why critical section is used here for a user to be aware?

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 1775

Test failed!

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 29, 2017

The failures are known (ecb mbedtls on this branch)

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 29, 2017

Any update @mmahadevan108 ?

@mmahadevan108
Copy link
Contributor Author

I have pushed in an updated patch with fixes based on comments provided.

@mmahadevan108
Copy link
Contributor Author

@flit

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 3, 2017

retest uvisor

@sg-
Copy link
Contributor

sg- commented Apr 6, 2017

/morph test-nightly

@bridadan
Copy link
Contributor

bridadan commented Apr 6, 2017

/morph test-nightly

@mbed-bot
Copy link

mbed-bot commented Apr 6, 2017

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 1848

Test failed!

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 7, 2017

Merging to the workshop branch (failues above are not related and wont be there once we integrate this against master).

@0xc0170 0xc0170 merged commit dbede90 into ARMmbed:mbed-os-workshop-17q2 Apr 7, 2017
@mmahadevan108 mmahadevan108 deleted the K64_Flash_API branch April 14, 2017 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants