-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cpu/msp430: update to modern gcc/ELF/newlib toolchain #12457
Conversation
Can you give more details ? |
The compilation of following tests failed with new gcc version in RIOT-OS/riotdocker#91 and this PR:
I tried it for |
|
fe2ce31
to
cb2d3e7
Compare
Done. I've rebased to make use of the new Makefile.ci. @maribu, the flattened BOARD_INSUFFICIENT_MEMORY lists are so much nicer. 😉 |
This failes to compile here because of an sprintf overflow error. Fix in #12503. |
Even it compiles now, I get the following error on linking:
Any idea? I have seen this for other tests too. |
Now that's weird, I don't get that error with the same toolchain!? |
e4d59c7
to
fe1e2f4
Compare
I tried building using a freshly built RIOT-OS/riotdocker#91, that also builds fine. Something is weird. I've seen that linking error, too, but don't remember where. |
I have build |
sorry, I rebased to get #12503. |
That's ok, I had to cherr pick PR #12503 before. I started complete recompilation by intention to see in which other tests I got this linking error. |
Great, the complete rerun of compilation test in a fresh environment worked. There are no compilation or linking errors anymore. |
I'm observing an issue with stdio. The unittest "OK (N tests)" output doesn't show the N (number). Weirdly the number shows when adding |
Hm, with my self-compiled toolchain it works fine. Maybe we have to compile ourselves after all. :( |
Sounds depressing 😟 |
1 similar comment
Sounds depressing 😟 |
Yup. :) embunit does this:
The resulting writes arrive re-ordered at newlib's |
The only board with this chipset was the chronos, which has been removed.
Both tests/pthread_tls and tests/prng_sha256prng fail without this, but other platforms run fine with their defaults. Lets consider the higher value a better default.
/* Port 1: * P1.0 is not assigned by default * P1.1 is the bootstrap-loader (BSL) TX pin -> input, special function, default to GND * THIS PIN MUST *NEVER* BE USED IN NORMAL EXECUTION, SINCE IT INTERFERES WITH UART0 !!! * P1.2 receives the FIFOP interrupt from CC2420 -> input, GPIO, default to GND * P1.3 receives the FIFO/GIO0 interrupt from CC2420 -> input, GPIO, default to GND * P1.4 receives the CCA/GIO1 signal from CC2420 -> input, GPIO, default to GND * P1.5 is wired to Vcc -> input, GPIO, default to Vcc * P1.6 receives interrupt INT1 from accelerometer -> input, GPIO, default to GND * P1.7 receives interrupt INT2 from accelerometer -> input, GPIO, default to GND */ (test starts indexing at 0)
c17875e
to
480ef32
Compare
all dependencies are in.
|
I don't really have hardware to test. But I honestly would argue to merge this as is, provided that everything compiles, as:
|
+1, let me run tests on z1 before merging though that that the issue listing failing tests can be updated (but I think Kaspar took care of most already.) |
Results summary, and details
|
Huge improvement compared to #13267, nothing unexpected is failing now. |
@maribu you have taken a closer look at the code do you want to tick the other labels and ACK? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Thanks @kaspar030! This was a big one :-) |
Thanks a lot for reviewing! |
fyi: Since msp430 has newlib support, adding support to picolibc should be rather straightforward. That should bring the ROM size down again. |
Contribution description
This PR updates msp430 to a current gcc/newlib.
I used a self-compiled toolchain while developing this,
but it turns out that the current TI gcc 8.3.0 toolchain works just fine. *Thus that's PR'ed at RIOT-OS/riotdocker#91.Update: now using toolchains from https://github.com/RIOT-OS/toolchains/releases, which is also in our Docker container.
Until this is in riotdocker, the toolchain can be downloaded here. Only the gcc binary tarball is needed.As expected, code size increases a lot. E.g., hello-world almost doubles (4k -> 8k ROM). That's probably mostly because newlibs stdio is much larger than the old TI one. Let's hope that picolibc will mitigate this...
The upside is that now msp430 can use C11, is re-using unmodified newlib-syscalls-default, and generally gets some support from upstream. Generally, many msp430 specific hacks are made obsolete.
The PR reverts some of the recent malloc updates to msp430, as they're not needed anymore.
This also includes a script to download the msp430-support-files (including headers and linkerscripts for every msp430 variant) that then removes all but the actually currently used files. That script should make adding more msp430 boards, or updating the support files, quite easy.
The PR does not yet remove all the blacklists that might not be necessary anymore, and it does not yet update insufficient memory lists that will probably get longer due to increased code size. I'm waiting for CI support to tackle those.done, all blacklists are updated.Testing procedure
Test the shit out of any msp430 board.
Issues/PRs references
RIOT-OS/riotdocker#91
Partly fixes #3355
Fixes #8408.
Fixes all compilation errors and most tests found in #13267.