Here's what Ken and I have tried for the riscv64 libm linking problem: (1) The recommended toolchain for NuttX on riscv64 is SiFive Freedom Tools. But it doesn't support Raspberry Pi OS (64-bit Debian).
(2) So we used Debian gcc-riscv64-unknown-elf instead. Which shows the missing libm error that Ken described. (3) We're trying an alternative toolchain: xPack GNU RISC-V Embedded GCC. Which might fix the libm problem, but we're not sure if it's supported for NuttX. Wonder if anyone has tried building riscv64 NuttX on Raspberry Pi OS / Arm64 Linux? More details below. Thanks! https://lupyuen.github.io/articles/riscv#appendix-xpack-gnu-risc-v-embedded-gcc-toolchain-for-64-bit-risc-v https://lupyuen.github.io/articles/release#appendix-missing-mathh Lup On Mon, Sep 18, 2023 at 4:15 AM <ken.dic...@whidbey.com> wrote: > On 2023-09-17 12:47, Petro Karashchenko wrote: > > Hi, > > > > What kind of RISC-V toolchain are you using? > > Raspian:RasPi4:~/RISCV/NuttX/apps >>> apt search riscv64-unknown > Sorting... Done > Full Text Search... Done > binutils-riscv64-unknown-elf/oldstable,now 2.32.2020.04+dfsg-2 arm64 > [installed] > GNU assembler, linker and binary utilities for RISC-V processors > > gcc-riscv64-unknown-elf/oldstable,now 8.3.0.2019.08+dfsg-1 arm64 > [installed] > GCC compiler for embedded RISC-V chips > > picolibc-riscv64-unknown-elf/oldstable,oldstable,now 1.5.1-2 all > [installed] > Smaller embedded C library for RISC-V development > > So just `sudo apt-get install ...` of the above. > > > Please try to remove "CFLAGS += -lm " and feedback if that helps. > > No change. > > The problem is not that I am trying to use some released libm library > but that the NuttX nuttx/libs/libm/libm.a is not being linked into the > scheme binary file. > > I have not used other than trivial makefiles in a couple of decades, > never used `make menuconfig`, which allows one to specify many > non-bootable systems, and so have little clue how to specify linking the > NuttX libm into the scheme executable or alternately getting nuttx to > dynamically load the libm library. > > Note that there is no file 'kconfig-language.txt' in the NuttX tools > repository. > > I am kinda stuck. Thanks for any help! > -KenD > >