lupyuen commented on issue #2836: URL: https://github.com/apache/nuttx-apps/issues/2836#issuecomment-2466628701
@lvanasse I was able to reproduce the problem with Docker: https://gist.github.com/nuttxpr/a881eea7923c9471d026ac2bfcbdac82 It seems the problem is caused by the incompatibility between Rust Compiler and GCC Linker used by NuttX: - Rust Compiler emits LLVM Symbols like __aeabi_memclr, expecting them to be in libc (C Standard Library) from the LLVM Linker - But for GCC Linker on Embedded Platforms: These LLVM Symbols [don't exist](https://gist.github.com/nuttxpr/a881eea7923c9471d026ac2bfcbdac82#file-gistfile1-txt-L25368) ```bash ## __aeabi_memclr doesn't exist in libgcc $ objdump -t /tools/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/thumb/v7e-m/nofp/libgcc.a \ | grep memclr ``` - Some Embedded Folks wrote their own implementation of __aeabi_memclr: [Rust for STM32](https://rudi-horn.de/Home/6-rust-stm-handling-static-variables) / [Rust for TockOS](https://www.hackster.io/alevy/building-your-first-tock-app-540695#:~:text=There%20are%20known%20issues%20with%20arm%2Dnone%2Deabi%2Dgcc%20version%205.1%20and%20older%2C%20or%20other%20versions%20packaged%20with%20a%20newlib%20version%20earlier%20than%202.3%2C%20as%20they%20will%20run%20into%20problems%20with%20missing%20ARM%20intrinsics%20(e.g.%2C%20__aeabi_memclr%20).%20Tock%20does%20not%20support%20these%20versions.) So it seems we have to wait for NuttX support to become official in Rust: - https://github.com/apache/nuttx/issues/12960 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
