Skip to content
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

Add bare metal support to NXP targets #14359

Merged
merged 5 commits into from
Apr 13, 2021
Merged

Conversation

harmut01
Copy link
Contributor

@harmut01 harmut01 commented Mar 1, 2021

Summary of changes

Fixes ARMmbed/mbed-os-example-blinky-baremetal#55

Modifiestargets.json to provide bare metal support to the following targets: LPC1768, LPC54114, and LPC546XX. The corresponding scatter files have also been changed to ensure that a heap load region exists. This pull request also removes LPC1114 µARM dependencies as this tool-chain has been deprecated.

Issue raised in #13099.

Impact of changes

None

Migration actions required

None

Documentation

None


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)
[x] 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 Mar 1, 2021
@ciarmcom ciarmcom requested a review from a team March 1, 2021 15:30
@ciarmcom
Copy link
Member

ciarmcom commented Mar 1, 2021

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

@@ -121,6 +121,8 @@ LR_IROM1 m_interrupts_start m_text_start+m_text_size-m_interrupts_start { ; load
}
RW_IRAM1 ((ImageLimit(RW_m_data) == m_data_start) ? ImageLimit(RW_m_data) : +0) EMPTY Heap_Size { ; Heap region growing up
}
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY Heap_Size{ ; Heap region growing up
Copy link
Collaborator

Choose a reason for hiding this comment

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

Heap_Size should probably be calculated as done for other platforms (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM1_START)) instead of setting it to 0x0400.
@ARMmbed/team-nxp can you confirm?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hugueskamba I've had to remove the dynamic calculation of the heap size since it was causing CI to fail. The change I made resulted in a circular definition between Heap_Size and RW_IRAM1.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you show me what you had that caused the circular definition?

Copy link
Contributor Author

@harmut01 harmut01 Mar 15, 2021

Choose a reason for hiding this comment

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

This was the original change:

+ #define Heap_Size                    (m_data_size - Stack_Size - (AlignExpr(ImageLimit(RW_IRAM1), 16) - m_data_start))
- #define Heap_Size                    0x0400

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ARMmbed/team-nxp any thoughts?

targets/targets.json Outdated Show resolved Hide resolved
targets/targets.json Outdated Show resolved Hide resolved
targets/targets.json Outdated Show resolved Hide resolved
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 9, 2021

CI started

@mbed-ci
Copy link

mbed-ci commented Mar 9, 2021

Jenkins CI Test : ❌ FAILED

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

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM
jenkins-ci/mbed-os-ci_build-example-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 ✔️

@adbridge
Copy link
Contributor

@harmut01 looks like there are some errors to investigate...

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 11, 2021

CI restarted (internal CI issue yesterday)

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 11, 2021

I realized the CI run 2 days ago, I aborted the current job.

@harmut01 The failures are related, please review

@adbridge
Copy link
Contributor

@harmut01 is this ready for CI again?

@harmut01
Copy link
Contributor Author

Yes @adbridge, we're good to go again!

@adbridge
Copy link
Contributor

Ci started

@mbed-ci
Copy link

mbed-ci commented Mar 29, 2021

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_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
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 ✔️

@adbridge
Copy link
Contributor

Ci restarted

@mbed-ci
Copy link

mbed-ci commented Mar 30, 2021

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-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
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-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_cmake-example-test

@mergify mergify bot added needs: work and removed needs: CI labels Mar 30, 2021
@adbridge
Copy link
Contributor

Timeout error, re-running again

@mbed-ci
Copy link

mbed-ci commented Mar 30, 2021

Jenkins CI Test : ✔️ SUCCESS

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-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️

"uARM",
"GCC_ARM",
"IAR"
"GCC_ARM"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please do the same for all NXP targets (perhaps as a separate commit). There are inconsistencies where IAR is listed as a supported toolchain but no supported c libs are listed for IAR. See LPC541114 for example.

Modify linker scripts to add heap to memory map, add list of supported c libs and "bare-metal" to supported_application_profiles.
Toolchains should provide support for small c lib, remove IAR from the
NXP targets that don't currently do so.
@harmut01
Copy link
Contributor Author

harmut01 commented Mar 31, 2021

Apologies, this force-push was unintended. It adds a commit that removes IAR from supported tool-chains for targets that don't currently support the small c library with IAR.

Copy link
Contributor

@LDong-Arm LDong-Arm left a comment

Choose a reason for hiding this comment

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

We should aim to get this PR tested and merged after the review comment is addressed.

targets/targets.json Show resolved Hide resolved
@harmut01
Copy link
Contributor Author

harmut01 commented Apr 8, 2021

Thanks @LDong-Arm, I've built the baremetal blinky example locally to confirm the changes work. @0xc0170 can we start CI on this?

Copy link
Contributor

@LDong-Arm LDong-Arm left a comment

Choose a reason for hiding this comment

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

LGTM

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 12, 2021

CI started

@mbed-ci
Copy link

mbed-ci commented Apr 12, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 6 | 🔒 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_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_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-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️

@0xc0170 0xc0170 merged commit 291beda into ARMmbed:master Apr 13, 2021
@mergify mergify bot removed the ready for merge label Apr 13, 2021
@mbedmain mbedmain removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Apr 26, 2021
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.

CMake build fails with Use full profile as baremetal profile is not supported for this Mbed target
10 participants