-
Notifications
You must be signed in to change notification settings - Fork 7.5k
hello_world not working on frdm_k64f/qemu_cortex_m3 with newlib and arm gcc embedded 2018q2 #8838
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
Comments
I'm not able to reproduce this. It works fine for me on frdm_k64f and qemu_cortex_m3. |
hmm
with
but if I use
it works. @SebastianBoe any idea? |
I did the latter |
Looking at the zephyr.map diff between gccarmemb and cross-compile it is clear that cross-compile is not using a thumb libc implementation. I was able to reproduce the failure when CROSS_COMPILE was used. However adding the flag -DLIBC_LIBRARY_DIR=/home/sebo/Downloads/gcc-arm-none-eabi-7-2018-q2-update/arm-none-eabi/lib/thumb/v7-m resolved the issue again. The difference between cross-compile and gccarmemb is that with gccarmemb we are successfull in finding the correct newlib libc implementation, but cross-compile is not. gccarmemb.cmake sets SYSROOT_DIR, which in turn causes gcc.cmake to execute 'gcc --print-multi-directory' and detect the correct newlib libc implementation. The libc build scripts has this to say about detecting the correct libc implementation:
Fundamentally, auto-detection of the correct toolchain flags is believed to not be possible with cross-compile. So using it is always at one's own risk and maintenance. It is recommended to develop a toolchain cmake file to support a toolchain instead of using cross-compile. If it was possible, we would not need any toolchain cmake files ... To have this just-work one could try to extract the sysroot_dir or the newlib_dir from the compiler. But I don't know how to do this ... Until this is figured out users should use gccarmemb instead of cross-compile. |
This looks to be fixed. I think commit aa049e5 fixes this issue. |
crashes already when flashing...
with qemu:
The text was updated successfully, but these errors were encountered: