@lupyuen besides gcc-arm-embedded, one can also utilize Nixpkgs' cross compilation support for fetching the toolchains. This is a shell.nix for playing around NuttX on BL602:
(import <nixpkgs> {
crossSystem = {
config = "riscv32-none-elf";
libc = "newlib";
gcc.arch = "rv32imafc";
gcc.abi = "ilp32f";
};
}).callPackage (
{ mkShell, kconfig-frontends }:
mkShell {
nativeBuildInputs = [ kconfig-frontends ];
buildInputs = [ ];
}
) { }