Skip to content

Replace CMSIS flash driver by SDK flash driver #4066

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 7 commits into from
Apr 6, 2017

Conversation

adustm
Copy link
Member

@adustm adustm commented Mar 28, 2017

Description

Replace CMSIS flash driver by SDK flash drive

Status

+-------------------+---------------+----------------------+--------+--------------------+-------------+
| target            | platform_name | test suite           | result | elapsed_time (sec) | copy_method |
+-------------------+---------------+----------------------+--------+--------------------+-------------+
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-mbed_hal-flash | OK     | 21.13              | shell       |
+-------------------+---------------+----------------------+--------+--------------------+-------------+
mbedgt: test suite results: 1 OK
mbedgt: test case report:
+-------------------+---------------+----------------------+-------------------------------+--------+--------+--------+--------------------+
| target            | platform_name | test suite           | test case                     | passed | failed | result | elapsed_time (sec) |
+-------------------+---------------+----------------------+-------------------------------+--------+--------+--------+--------------------+
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-mbed_hal-flash | Flash - buffer alignment test | 1      | 0      | OK     | 2.13               |
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-mbed_hal-flash | Flash - clock and cache test  | 1      | 0      | OK     | 0.07               |
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-mbed_hal-flash | Flash - erase sector          | 1      | 0      | OK     | 1.15               |
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-mbed_hal-flash | Flash - init                  | 1      | 0      | OK     | 0.06               |
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-mbed_hal-flash | Flash - mapping alignment     | 1      | 0      | OK     | 0.06               |
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-mbed_hal-flash | Flash - program page          | 1      | 0      | OK     | 2.74               |
+-------------------+---------------+----------------------+-------------------------------+--------+--------+--------+--------------------+
+-------------------+---------------+-----------------------------+---------------------------+--------+--------+--------+--------------------+
| target            | platform_name | test suite                  | test case                 | passed | failed | result | elapsed_time (sec) |
+-------------------+---------------+-----------------------------+---------------------------+--------+--------+--------+--------------------+
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-mbed_drivers-flashiap | FlashIAP - init           | 1      | 0      | OK     | 0.05               |
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-mbed_drivers-flashiap | FlashIAP - program        | 1      | 0      | OK     | 3.09               |
| NUCLEO_F429ZI-ARM | NUCLEO_F429ZI | tests-mbed_drivers-flashiap | FlashIAP - program errors | 1      | 0      | OK     | 0.06               |
+-------------------+---------------+-----------------------------+---------------------------+--------+--------+--------+--------------------+

if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_BYTE, address, (uint64_t)*data) != HAL_OK) {
return -1;
} else {
size--; address++;data++;
Copy link
Contributor

Choose a reason for hiding this comment

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

please one line at the time, split these to separate lines

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, will do

{
uint32_t sector = 0;

if((address < ADDR_FLASH_SECTOR_1) && (address >= ADDR_FLASH_SECTOR_0))
Copy link
Contributor

Choose a reason for hiding this comment

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

formatting:

if (cond) {

} else {

}

This functionality is not in the SDK driver ?

Copy link
Member Author

Choose a reason for hiding this comment

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

unfortunately not. I will rewrite this function

tmp = address - ADDR_FLASH_SECTOR_12;
}
if (address < ADDR_FLASH_SECTOR_4) { // 16k sectorsize
//printf("tmp for sectors less than 4: 0X%4x")
Copy link
Contributor

Choose a reason for hiding this comment

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

shall this printf line be removed (dead code) ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I removed it in the 2nd commit. I guess we've worked in //
:)

} else {
sector += 4 + (tmp >>17);
}
printf("address:0X%04x%04x, secteur: %d\n", (address>>16)&0XFFFF, (address&0XFFFF), sector);
Copy link
Contributor

Choose a reason for hiding this comment

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

Also this should not print always?

Copy link
Member Author

Choose a reason for hiding this comment

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

same comment. It's been removed in commitid= 09229

} else {
sector += 4 + (tmp >>17);
}
printf("address:0X%04x%04x, secteur: %d\n", (address>>16)&0XFFFF, (address&0XFFFF), sector);
Copy link
Contributor

Choose a reason for hiding this comment

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

here are still some printf , line 162 also?

Copy link
Member Author

Choose a reason for hiding this comment

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

sorry for that ! my eyes are not working properly today :)

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 29, 2017

/morph test

@mbed-bot
Copy link

Result: FAILURE

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

/morph test

Output

mbed Build Number: 1786

Build failed!

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 30, 2017

@adustm
Copy link
Member Author

adustm commented Mar 30, 2017

Hi,
UBLOX_EVK_ODIN_W2 is now compiling OK with GCC_ARM + IAR + ARM on commit 8B80b7a3

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 30, 2017

/morph test

@mbed-bot
Copy link

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 1800

All builds and test passed!

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 3, 2017

retest uvisor

@sg- sg- merged commit a52e1eb into ARMmbed:mbed-os-workshop-17q2 Apr 6, 2017
@adustm
Copy link
Member Author

adustm commented Apr 7, 2017

Hello @sg-, @0xc0170
Have you paid attention that this PR is merged to the workshop branch and not to the master ?
Kind regards
Armelle

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 7, 2017

Have you paid attention that this PR is merged to the workshop branch and not to the master ?

Yes, we will integrate it to master

@c1728p9 c1728p9 mentioned this pull request Jun 6, 2017
@adustm adustm deleted the f429_sdk_flash_driver branch October 11, 2018 09:18
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.

4 participants