Skip to content

Fix GCC_ARM non-contiguous FW for K64F and K66F #13832

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 3 commits into from
Nov 17, 2020

Conversation

moshe-shahar
Copy link
Contributor

@moshe-shahar moshe-shahar commented Oct 29, 2020

K64F and K66F fix for Issue: #13831

Summary of changes

Removing m_flash_config on relocated applications. It has a fixed address in the HW and is not required in the app.
Combine m_interrupts and m_text into one area on relocated applications to prevent a non-contiguous FW app.

Impact of changes

K64F and K64F targets

Migration actions required

Documentation


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Oct 29, 2020
@ciarmcom ciarmcom requested review from maclobdell and a team October 29, 2020 10:00
@ciarmcom
Copy link
Member

@moshe-shahar, thank you for your changes.
@maclobdell @ARMmbed/mbed-os-maintainers please review.

@yogpan01
Copy link
Contributor

yogpan01 commented Oct 29, 2020

@0xc0170 Can you please get this one reviewed, it solves pyocd flashing issue for PDMC which is used in CI flow.

@0xc0170 0xc0170 requested a review from a team October 29, 2020 12:08
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.

I checked, same should be applied to also .sct file (I understand this is for GCC_ARM, but can we fix quickly also ARMCLang?

#define m_interrupts_start             MBED_APP_START
#define m_interrupts_size              0x00000400

#define m_flash_config_start           MBED_APP_START + 0x400
#define m_flash_config_size            0x00000010

#define m_text_start                   MBED_APP_START + 0x410
#define m_text_size                    MBED_APP_SIZE - 0x410

Can you add it here so then K64F MCU is fixed completely?

Or is this only GCC ARM issue?

@moshe-shahar
Copy link
Contributor Author

@0xc0170 , done. please review.
There is a script for IAR too but I don't have any option to test it and I'm not familiar enough with its syntax.

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 29, 2020

+1, IAR is not supported anyway.

@moshe-shahar moshe-shahar force-pushed the fix-gcc-non-contiguous branch from 3894494 to 49a6db2 Compare October 29, 2020 12:55
@moshe-shahar
Copy link
Contributor Author

@0xc0170,
Added K66F too. It is very similar and in our use.

@moshe-shahar moshe-shahar changed the title K64F - Fix GCC_ARM non-contiguous FW Fix GCC_ARM non-contiguous FW for K64F and K66F Oct 29, 2020
@@ -63,12 +65,21 @@
#define m_interrupts_start MBED_APP_START
#define m_interrupts_size 0x00000400

#if MBED_APP_SIZE == 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Surely you mean MBED_APP_START == 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. The flash config is needed only if MBED_APP_START is 0 since that config has fix address in the HW.

#define m_flash_config_start MBED_APP_START + 0x400
#define m_flash_config_size 0x00000010

#define m_text_start MBED_APP_START + 0x410
#define m_text_size MBED_APP_SIZE - 0x410

#else

#define m_text_start MBED_APP_START + 0x400
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this 0x400 padding left (due to vectors, that are used below in ROM) ? Its not present in GCC ARM if MBED_APP_SIZE is 0

Copy link
Contributor Author

@moshe-shahar moshe-shahar Oct 29, 2020

Choose a reason for hiding this comment

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

for the interrupts area. In GCC_ARM I moved the interrupts to the .text area.
In ARM, everything was in LR_IROM1 from the beginning.

0xc0170
0xc0170 previously approved these changes Oct 29, 2020
@mergify mergify bot added needs: CI and removed needs: review labels Nov 11, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 11, 2020

CI started

@mergify mergify bot added needs: work and removed needs: CI labels Nov 11, 2020
@mbed-ci
Copy link

mbed-ci commented Nov 11, 2020

Jenkins CI Test : ❌ FAILED

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_dynamic-memory-usage ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest ✔️
jenkins-ci/mbed-os-ci_cmake-example-test
jenkins-ci/mbed-os-ci_greentea-test

@mbed-ci
Copy link

mbed-ci commented Nov 12, 2020

Jenkins CI Test : ❌ FAILED

Build Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_dynamic-memory-usage ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest
jenkins-ci/mbed-os-ci_cmake-example-test
jenkins-ci/mbed-os-ci_greentea-test

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 12, 2020

we are checking currently cloud client issue (other PRs are affected). However greentea test are related to K64F changes - they are timeouts. Can you reproduce one of the failures (one of the tests) ?

@moshe-shahar moshe-shahar force-pushed the fix-gcc-non-contiguous branch from 7e2de1d to ca39f95 Compare November 12, 2020 15:21
@mergify mergify bot dismissed 0xc0170’s stale review November 12, 2020 15:22

Pull request has been modified.

@moshe-shahar
Copy link
Contributor Author

Found incorrect condition. rebase and fix it.
@0xc0170 , please review the last commit and re-run the tests.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 12, 2020

CI restarted

@mergify mergify bot added needs: work and removed needs: CI labels Nov 12, 2020
@mbed-ci
Copy link

mbed-ci commented Nov 13, 2020

Jenkins CI Test : ❌ FAILED

Build Number: 3 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_dynamic-memory-usage ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest
jenkins-ci/mbed-os-ci_cmake-example-test
jenkins-ci/mbed-os-ci_greentea-test ✔️

@moshe-shahar
Copy link
Contributor Author

I run could client test locally and it passed.
Note that on the CI, ARM toolchain passed and GCC_ARM failed.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 17, 2020

CI restarted

@mbed-ci
Copy link

mbed-ci commented Nov 17, 2020

Jenkins CI Test : ❌ FAILED

Build Number: 4 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️
jenkins-ci/mbed-os-ci_greentea-test
jenkins-ci/mbed-os-ci_dynamic-memory-usage ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest ✔️

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 17, 2020

Ci restarted

@mergify mergify bot added needs: work and removed needs: CI labels Nov 17, 2020
@mbed-ci
Copy link

mbed-ci commented Nov 17, 2020

Jenkins CI Test : ❌ FAILED

Build Number: 5 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_dynamic-memory-usage ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest
jenkins-ci/mbed-os-ci_greentea-test

@mbed-ci
Copy link

mbed-ci commented Nov 17, 2020

Jenkins CI Test : ✔️ SUCCESS

Build Number: 6 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️
jenkins-ci/mbed-os-ci_dynamic-memory-usage ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest ✔️

@0xc0170 0xc0170 merged commit ac45aac into ARMmbed:master Nov 17, 2020
@mergify mergify bot removed the ready for merge label Nov 17, 2020
@moshe-shahar moshe-shahar deleted the fix-gcc-non-contiguous branch November 18, 2020 06:56
@moshe-shahar
Copy link
Contributor Author

Hooray 👏
Thank you!

@mbedmain mbedmain added release-version: 6.5.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Nov 18, 2020
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