cpu/lpc23xx: enable support for picolibc#14830
Merged
aabadie merged 2 commits intoRIOT-OS:masterfrom Sep 8, 2020
Merged
Conversation
ca93bc8 to
727e924
Compare
fjmolinas
reviewed
Aug 26, 2020
| # use the nano-specs of Newlib when available | ||
| USEMODULE += newlib_nano | ||
|
|
||
| ifeq (1,$(PICOLIBC)) |
Contributor
There was a problem hiding this comment.
Why are we using a variable here? Shouldn't it be
ifeq (picolibc newlib,$(USEMODULE))
# whatever default you want to choose
endif
Contributor
Author
There was a problem hiding this comment.
Just copied that from cpu/cortexm_common/Makefile.dep :)
Do you mean picolibc should be selected by USEMODULE += picolibc instead of PICOLIBC=1?
Contributor
There was a problem hiding this comment.
Yes, I think that would be better, I understand it is unrelated with this PR but it would be good to do this cleanup.
Contributor
Author
There was a problem hiding this comment.
Should we do that as a follow-up?
The RISC-V port also uses this variable.
Contributor
There was a problem hiding this comment.
I agree that this would be nicer but I think that this should be done in a follow-up, with all affected CPUs changed at once (cortexm, fe310 and lpc23xx).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
lpc23xxworks with the same ARM targeted picolibc as our Cortex-M targets. The linker script also looks almost the same, so adding support for TLS is just copy & paste.So all that's left to do is enable support for picolibc in the build system.
Testing procedure
Only tried
tests/thread_cooperation,examples/defaultandtests/malloc. All worked, buttests/mallocwould only use the first heap segment as multi-heap support is not implemented yet in the picolibc support code.newlibc
picolibc
newlibc
picolibc
Issues/PRs references
depends on #14827