Skip to content

[BEETLE] Add support for IAR compiler #2427

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 2 commits into from
Aug 15, 2016
Merged

Conversation

fvincenzo
Copy link
Contributor

IAR compiler support is a mandatory requirement for mbed-os 5.1.

This patch adds support to IAR on Beetle mbed-os platform.
It contains:

  • Linker script
  • Startup code
  • Target enablement
  • Cordio libraries for BLE

Signed-off-by: Douglas Raillard douglas.raillard@arm.com
Signed-off-by: Vincenzo Frascino vincenzo.frascino@arm.com

@fvincenzo
Copy link
Contributor Author

fvincenzo commented Aug 11, 2016

The new code has been tested against the mbed test suite.

mbedgt: test suite report:
+--------------------+----------------+--------------------------------------------------------------------------------------+---------+--------------------+-------------+
| target             | platform_name  | test suite                                                                           | result  | elapsed_time (sec) | copy_method |
+--------------------+----------------+--------------------------------------------------------------------------------------+---------+--------------------+-------------+
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-basic_test                        | OK      | 18.69              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-basic_test_default                | OK      | 18.78              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-case_async_validate               | OK      | 20.55              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-case_control_async                | OK      | 26.74              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-case_control_repeat               | OK      | 20.79              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-case_selection                    | OK      | 18.73              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-case_setup_failure                | OK      | 19.24              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-case_teardown_failure             | OK      | 19.31              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-control_type                      | OK      | 19.79              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-minimal_async_scheduler           | OK      | 19.5               | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-minimal_scheduler                 | OK      | 20.36              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-test_assertion_failure_test_setup | OK      | 18.49              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-test_setup_case_selection_failure | OK      | 18.67              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-test_setup_failure                | OK      | 18.62              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-integration-basic                                                      | OK      | 17.83              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-integration-threaded_blinky                                            | OK      | 37.78              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-c_strings                                                 | OK      | 20.56              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-callback                                                  | OK      | 25.6               | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-dev_null                                                  | OK      | 20.67              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-echo                                                      | OK      | 29.62              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-generic_tests                                             | OK      | 19.11              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-rtc                                                       | OK      | 29.04              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-stl_features                                              | OK      | 19.49              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-ticker                                                    | OK      | 49.75              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-timeout                                                   | OK      | 29.97              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-wait_us                                                   | OK      | 28.46              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-mbed-attributes                                              | OK      | 20.59              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-mbed-call_before_main                                        | OK      | 17.98              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-mbed-cpp                                                     | OK      | 18.17              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-mbed-div                                                     | OK      | 18.28              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-basic                                              | OK      | 33.05              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-isr                                                | OK      | 23.13              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-mail                                               | OK      | 19.71              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-mutex                                              | TIMEOUT | 38.09              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-queue                                              | OK      | 19.72              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-semaphore                                          | TIMEOUT | 38.0               | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-signals                                            | OK      | 23.17              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-threads                                            | TIMEOUT | 58.3               | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-timer                                              | OK      | 32.82              | shell       |
+--------------------+----------------+--------------------------------------------------------------------------------------+---------+--------------------+-------------+
mbedgt: test suite results: 36 OK / 3 TIMEOUT

The three tests that are going on timeout are passing on other compilers (i.e. GCC_ARM):

| ARM_BEETLE_SOC-GCC_ARM | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-mutex                                     | OK      | 22.5               | shell       |
| ARM_BEETLE_SOC-GCC_ARM | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-semaphore                                 | OK      | 19.47              | shell       |
| ARM_BEETLE_SOC-GCC_ARM | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-threads                                   | OK      | 19.25              | shell       |

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 11, 2016

/morph test

@bridadan
Copy link
Contributor

@fvincenzo Can you add the following key to the targets.json? Otherwise it won't be ran in CI:

"release_version": ["5"]

@mbed-bot
Copy link

Result: FAILURE

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

/morph test

Output

mbed Build Number: 633

Test failed!

@fvincenzo
Copy link
Contributor Author

@bridadan @0xc0170 I added the support for release_version 5. Please go ahead with the CI tests. 😄

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 12, 2016

/morph test

@mbed-bot
Copy link

Result: FAILURE

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

/morph test

Output

mbed Build Number: 637

Test failed!

@bridadan
Copy link
Contributor

bridadan commented Aug 12, 2016

The test failure was unrelated, but the build looks good!

@fvincenzo any idea about the RTOS test failures you posted above? I believe in the past those tests tend to fail when the device doesn't have enough heap space. If you rebase/merge your PR with the latest master, there should now be some code that checks and prints an error message if you run out of space (introduced with this PR: #2402). You'll need to run mbed test with -v to get the verbose output.

*.o binary
*.lib binary
*.a binary
*.ar binary
Copy link
Contributor

Choose a reason for hiding this comment

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

How come this file is here? Can this be removed?

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 am adding binary libraries for the Cordio stack and platforms and I need git to know that are binaries. Any specific reason why I should remove it?

@fvincenzo
Copy link
Contributor Author

I am running on the latest version of the master. The PR is contained in my code. I am going to provide to you the test results via email.

IAR compiler support is a mandatory requirement for mbed-os 5.1.

This patch adds support to IAR on Beetle mbed-os platform.
It contains:
* Linker script
* Startup code
* Target enablement
* Cordio libraries for BLE

Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
mbedci-test CI server is complian only with mbed-os release version 5.x.
This patch updates the Beetle section of the target.json file in order
to comply with the requirement.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
@fvincenzo
Copy link
Contributor Author

fvincenzo commented Aug 12, 2016

With the latest changes all the tests are passing. @0xc0170 @bridadan Could you please merge the PR?

mbedgt: test suite report:
+--------------------+----------------+--------------------------------------------------------------------------------------+--------+--------------------+-------------+
| target             | platform_name  | test suite                                                                           | result | elapsed_time (sec) | copy_method |
+--------------------+----------------+--------------------------------------------------------------------------------------+--------+--------------------+-------------+
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-basic_test                        | OK     | 18.72              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-basic_test_default                | OK     | 18.67              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-case_async_validate               | OK     | 20.54              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-case_control_async                | OK     | 26.7               | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-case_control_repeat               | OK     | 20.72              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-case_selection                    | OK     | 18.7               | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-case_setup_failure                | OK     | 19.19              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-case_teardown_failure             | OK     | 19.33              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-control_type                      | OK     | 19.77              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-minimal_async_scheduler           | OK     | 19.54              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-minimal_scheduler                 | OK     | 20.15              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-test_assertion_failure_test_setup | OK     | 18.41              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-test_setup_case_selection_failure | OK     | 18.56              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-features-frameworks-utest-tests-unit_tests-test_setup_failure                | OK     | 18.57              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-rtos-rtx-target_cortex_m-tests-memory-heap_and_stack                         | OK     | 18.04              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-integration-basic                                                      | OK     | 17.82              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-integration-threaded_blinky                                            | OK     | 37.76              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-c_strings                                                 | OK     | 20.55              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-callback                                                  | OK     | 25.59              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-dev_null                                                  | OK     | 20.53              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-echo                                                      | OK     | 29.59              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-generic_tests                                             | OK     | 19.14              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-rtc                                                       | OK     | 29.01              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-stl_features                                              | OK     | 19.52              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-ticker                                                    | OK     | 49.76              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-timeout                                                   | OK     | 29.9               | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbed_drivers-wait_us                                                   | OK     | 28.31              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-mbed-attributes                                              | OK     | 20.45              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-mbed-call_before_main                                        | OK     | 17.95              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-mbed-cpp                                                     | OK     | 18.06              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-mbed-div                                                     | OK     | 18.02              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-basic                                              | OK     | 32.82              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-isr                                                | OK     | 23.07              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-mail                                               | OK     | 19.75              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-malloc                                             | OK     | 32.82              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-mutex                                              | OK     | 28.29              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-queue                                              | OK     | 19.68              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-semaphore                                          | OK     | 25.41              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-signals                                            | OK     | 23.2               | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-threads                                            | OK     | 24.11              | shell       |
| ARM_BEETLE_SOC-IAR | ARM_BEETLE_SOC | mbed-os-tests-mbedmicro-rtos-mbed-timer                                              | OK     | 32.75              | shell       |
+--------------------+----------------+--------------------------------------------------------------------------------------+--------+--------------------+-------------+
mbedgt: test suite results: 41 OK

@bridadan
Copy link
Contributor

Great work @fvincenzo!

/morph test

@mbed-bot
Copy link

Result: FAILURE

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

/morph test

Output

mbed Build Number: 638

Test failed!

@bridadan
Copy link
Contributor

/morph test

@mbed-bot
Copy link

Result: FAILURE

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

/morph test

Output

mbed Build Number: 639

Test failed!

@bridadan
Copy link
Contributor

/morph test

@mbed-bot
Copy link

Result: FAILURE

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

/morph test

Output

mbed Build Number: 640

Test failed!

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 15, 2016

Tests are OK. The failure is for KL46Z, not relevant to this changeset.

@0xc0170 0xc0170 merged commit 6c2ef92 into ARMmbed:master Aug 15, 2016
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.

None yet

4 participants