Skip to content

Add bootloader support for the UBLOX_C030 platforms. #4590

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

Closed
wants to merge 1 commit into from

Conversation

RobMeades
Copy link
Contributor

@RobMeades RobMeades commented Jun 20, 2017

Description

Add bootloader support for the UBLOX_C030 platforms. Tested with GCC, ARM and IAR toolchains.

@adbridge
Copy link
Contributor

@RobMeades is this required alongside #4337 ? They won't both make it into 5.5.1... but #4337 may do ?

@RobMeades
Copy link
Contributor Author

RobMeades commented Jun 20, 2017

No, not alongside, just wanted to point out that it assumed the #4337 was going in. I can rebase once #4337 goes in [now done].

@RobMeades
Copy link
Contributor Author

RobMeades commented Jun 20, 2017

Seen the build errors for other ST platforms, seems to be a collision of changes, fixing...

@RobMeades RobMeades force-pushed the c030_bootloader branch 2 times, most recently from 306ff6f to 91be7f0 Compare June 20, 2017 13:17

ER_IROM1 0x08000000 0x100000 { ; load address = execution address
#if !defined(MBED_APP_START)
Copy link
Contributor

Choose a reason for hiding this comment

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

hi - just be aware that those lines seem to have side effects - see here #3958

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ooo, well spotted, the EmBitz exporter is not something I know anything about and I guess it is not tested by the automation system here. @0xc0170 : is this something I need to be concerned about?

Copy link
Contributor

Choose a reason for hiding this comment

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

probably not blocking, but when a solution is found to #3958, let's make sure to report it here as well - either you or us ...

Copy link
Contributor

Choose a reason for hiding this comment

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

@LMESTM If/when I find a solution to #3958, it should not affect this patch.

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

Please share test results (flashIAPI and flash HAL)

/*Heap 1/2 of ram and ISR stack 4 kbytes*/
define symbol __ICFEDIT_size_cstack__ = 0x1000;
/*Heap 1/2 of ram and stack 1/8*/
define symbol __ICFEDIT_size_cstack__ = 0x6000;
Copy link
Contributor

Choose a reason for hiding this comment

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

why are you increasing cstack to 0x6000?

Copy link
Contributor Author

@RobMeades RobMeades Jun 21, 2017

Choose a reason for hiding this comment

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

Oops, well spotted, that was a hangover from a previous version of this PR; we had reduced the IAR stack size afterwards, now corrected/re-based/re-pushed.

@RobMeades
Copy link
Contributor Author

Test results (with this latest rebase):

+-------------------------+-----------------+-------------------------------------+----------------------------------+--------+--------+--------+--------------------+
| target                  | platform_name   | test suite                          | test case                        | passed | failed | result | elapsed_time (sec) |
+-------------------------+-----------------+-------------------------------------+----------------------------------+--------+--------+--------+--------------------+
| UBLOX_C030_U201-GCC_ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - init                  | 1      | 0      | OK     | 0.04               |
| UBLOX_C030_U201-GCC_ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - program               | 1      | 0      | OK     | 3.06               |
| UBLOX_C030_U201-GCC_ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - program errors        | 1      | 0      | OK     | 0.05               |
+-------------------------+-----------------+-------------------------------------+----------------------------------+--------+--------+--------+--------------------+
| UBLOX_C030_U201-GCC_ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - buffer alignment test    | 1      | 0      | OK     | 2.02               |
| UBLOX_C030_U201-GCC_ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - clock and cache test     | 1      | 0      | OK     | 0.1                |
| UBLOX_C030_U201-GCC_ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - erase sector             | 1      | 0      | OK     | 1.05               |
| UBLOX_C030_U201-GCC_ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - init                     | 1      | 0      | OK     | 0.08               |
| UBLOX_C030_U201-GCC_ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - mapping alignment        | 1      | 0      | OK     | 0.05               |
| UBLOX_C030_U201-GCC_ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - program page             | 1      | 0      | OK     | 2.53               |
+-------------------------+-----------------+-------------------------------------+----------------------------------+--------+--------+--------+--------------------+
| UBLOX_C030_U201-IAR     | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - init                  | 1      | 0      | OK     | 0.04               |
| UBLOX_C030_U201-IAR     | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - program               | 1      | 0      | OK     | 3.04               |
| UBLOX_C030_U201-IAR     | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - program errors        | 1      | 0      | OK     | 0.05               |
+-------------------------+-----------------+-------------------------------------+----------------------------------+--------+--------+--------+--------------------+
| UBLOX_C030_U201-IAR     | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - buffer alignment test    | 1      | 0      | OK     | 2.09               |
| UBLOX_C030_U201-IAR     | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - clock and cache test     | 1      | 0      | OK     | 0.1                |
| UBLOX_C030_U201-IAR     | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - erase sector             | 1      | 0      | OK     | 1.14               |
| UBLOX_C030_U201-IAR     | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - init                     | 1      | 0      | OK     | 0.09               |
| UBLOX_C030_U201-IAR     | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - mapping alignment        | 1      | 0      | OK     | 0.06               |
| UBLOX_C030_U201-IAR     | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - program page             | 1      | 0      | OK     | 2.7                |
+-------------------------+-----------------+-------------------------------------+----------------------------------+--------+--------+--------+--------------------+
| UBLOX_C030_U201-ARM     | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - init                  | 1      | 0      | OK     | 0.04               |
| UBLOX_C030_U201-ARM     | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - program               | 1      | 0      | OK     | 2.98               |
| UBLOX_C030_U201-ARM     | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - program errors        | 1      | 0      | OK     | 0.05               |
+-------------------------+-----------------+-------------------------------------+----------------------------------+--------+--------+--------+--------------------+
| UBLOX_C030_U201-ARM     | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - buffer alignment test    | 1      | 0      | OK     | 2.03               |
| UBLOX_C030_U201-ARM     | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - clock and cache test     | 1      | 0      | OK     | 0.07               |
| UBLOX_C030_U201-ARM     | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - erase sector             | 1      | 0      | OK     | 1.05               |
| UBLOX_C030_U201-ARM     | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - init                     | 1      | 0      | OK     | 0.06               |
| UBLOX_C030_U201-ARM     | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - mapping alignment        | 1      | 0      | OK     | 0.05               |
| UBLOX_C030_U201-ARM     | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - program page             | 1      | 0      | OK     | 2.53               |
+-------------------------+-----------------+-------------------------------------+----------------------------------+--------+--------+--------+--------------------+

@theotherjimmy
Copy link
Contributor

/morph test

@mbed-bot
Copy link

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 653

All builds and test passed!

@RobMeades
Copy link
Contributor Author

Merged with Jerome's changes to targets.json and re-pushed/tested:

+---------------------+-----------------+-------------------------------------+-------------------------------+--------+--------+--------+--------------------+
| target              | platform_name   | test suite                          | test case                     | passed | failed | result | elapsed_time (sec) |
+---------------------+-----------------+-------------------------------------+-------------------------------+--------+--------+--------+--------------------+
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - buffer alignment test | 1      | 0      | OK     | 2.11               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - clock and cache test  | 1      | 0      | OK     | 0.07               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - erase sector          | 1      | 0      | OK     | 1.05               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - init                  | 1      | 0      | OK     | 0.06               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - mapping alignment     | 1      | 0      | OK     | 0.05               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - program page          | 1      | 0      | OK     | 2.54               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - init               | 1      | 0      | OK     | 0.04               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - program            | 1      | 0      | OK     | 2.98               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - program errors     | 1      | 0      | OK     | 0.06               |
+---------------------+-----------------+-------------------------------------+-------------------------------+--------+--------+--------+--------------------+

@theotherjimmy
Copy link
Contributor

/morph test-nightly

@mbed-bot
Copy link

Result: FAILURE

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

/morph test-nightly

@RobMeades
Copy link
Contributor Author

...and again:

+---------------------+-----------------+-------------------------------------+-------------------------------+--------+--------+--------+--------------------+
| target              | platform_name   | test suite                          | test case                     | passed | failed | result | elapsed_time (sec) |
+---------------------+-----------------+-------------------------------------+-------------------------------+--------+--------+--------+--------------------+
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - buffer alignment test | 1      | 0      | OK     | 2.05               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - clock and cache test  | 1      | 0      | OK     | 0.07               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - erase sector          | 1      | 0      | OK     | 1.08               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - init                  | 1      | 0      | OK     | 0.06               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - mapping alignment     | 1      | 0      | OK     | 0.05               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - program page          | 1      | 0      | OK     | 2.74               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - init               | 1      | 0      | OK     | 0.04               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - program            | 1      | 0      | OK     | 3.0                |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - program errors     | 1      | 0      | OK     | 0.06               |
+---------------------+-----------------+-------------------------------------+-------------------------------+--------+--------+--------+--------------------+

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 2, 2017

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F437xG/objects.h

Another confict, very last rebase? we will retrigger CI

@RobMeades
Copy link
Contributor Author

Done.

+---------------------+-----------------+-------------------------------------+-------------------------------+--------+--------+--------+--------------------+
| target              | platform_name   | test suite                          | test case                     | passed | failed | result | elapsed_time (sec) |
+---------------------+-----------------+-------------------------------------+-------------------------------+--------+--------+--------+--------------------+
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - buffer alignment test | 1      | 0      | OK     | 2.0                |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - clock and cache test  | 1      | 0      | OK     | 0.08               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - erase sector          | 1      | 0      | OK     | 1.12               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - init                  | 1      | 0      | OK     | 0.05               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - mapping alignment     | 1      | 0      | OK     | 0.05               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - program page          | 1      | 0      | OK     | 2.59               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - init               | 1      | 0      | OK     | 0.05               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - program            | 1      | 0      | OK     | 3.06               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - program errors     | 1      | 0      | OK     | 0.05               |
+---------------------+-----------------+-------------------------------------+-------------------------------+--------+--------+--------+--------------------+

@@ -1465,10 +1465,11 @@
}
},
"macros_add": ["RTC_LSI=1", "HSE_VALUE=12000000", "GNSSBAUD=9600"],
"device_has_add": ["ANALOGOUT", "TRNG"],
"device_has_add": ["ANALOGOUT", "SERIAL_FC", "TRNG", "FLASH"],
Copy link
Contributor

Choose a reason for hiding this comment

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

@RobMeades Why did "SERIAL_FC" get added here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jeromecoutant's change to all the STM32F4 platforms, which I had to rebase against, dropped it, so I added it back in again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can put that change in another PR if you prefer but I really don't want to wait as we definitely need flow control on the serial ports.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool. Thanks for responding.

@RobMeades
Copy link
Contributor Author

RobMeades commented Jul 13, 2017

Darn, missed out on the last re-base, now fixed, rebased and retested:

+---------------------+-----------------+-------------------------------------+-------------------------------+--------+--------+--------+--------------------+
| target              | platform_name   | test suite                          | test case                     | passed | failed | result | elapsed_time (sec) |
+---------------------+-----------------+-------------------------------------+-------------------------------+--------+--------+--------+--------------------+
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - buffer alignment test | 1      | 0      | OK     | 2.03               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - clock and cache test  | 1      | 0      | OK     | 0.08               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - erase sector          | 1      | 0      | OK     | 1.13               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - init                  | 1      | 0      | OK     | 0.06               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - mapping alignment     | 1      | 0      | OK     | 0.05               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_hal-flash        | Flash - program page          | 1      | 0      | OK     | 2.61               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - init               | 1      | 0      | OK     | 0.04               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - program            | 1      | 0      | OK     | 2.98               |
| UBLOX_C030_U201-ARM | UBLOX_C030_U201 | mbed-os-tests-mbed_drivers-flashiap | FlashIAP - program errors     | 1      | 0      | OK     | 0.05               |
+---------------------+-----------------+-------------------------------------+-------------------------------+--------+--------+--------+--------------------+

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 24, 2017

retest uvisor

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 24, 2017

/morph test

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 24, 2017

@mazimkhan can you check the uvisor CI status here? I restarted it 15mins ago, still waiting.

@mazimkhan
Copy link

Don't know what happened. I have restarted the CI. Lets see if it fails now.

@mbed-bot
Copy link

Result: FAILURE

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

/morph test

Output

mbed Build Number: 873

Build failed!

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 26, 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: 892

All builds and test passed!

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 26, 2017

Don't know what happened. I have restarted the CI. Lets see if it fails now.

@mazimkhan Still not going through, what can we do?

@mazimkhan
Copy link

mazimkhan commented Jul 26, 2017

This PR has passed in CI http://e108747.cambridge.arm.com:8080/job/mbed-os/job/mbed-os-pr-uvisor-test-pipeline/3805/
Don't know why CI is not able to to update this PR. There is no error in the CI to indicate failure.
Something is wrong with GitHub. I don't see CI link above. Though last commit has a green tick. Perhaps we have to go without it updating.

@theotherjimmy
Copy link
Contributor

theotherjimmy commented Jul 27, 2017

@mazimkhan We have access control setup so that we cannot merge without your CI passing. Is there a way we can get it reporting for this PR?

@mazimkhan
Copy link

We have tried by rerunning the CI but that didn't help. I will try contacting GitHub support.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 31, 2017

@RobMeades It might be faster to send a new PR that will reference this. To restart that failing report test. What do you think?

@RobMeades
Copy link
Contributor Author

Yup, happy to do that. So that I don't just hit the same issue, do I simply need to submit a new PR from my same branch or should I re-create my branch also and then do a PR from there?

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 31, 2017

do I simply need to submit a new PR from my same branch

Yes, this one should do, just a new PR

@RobMeades
Copy link
Contributor Author

Closing this PR and opening a new one that references it in order to work around a CI infrastructure issue.

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.

8 participants