When editing in VSCode, NimSuggest refers to config.nims and tries
to find the NuttX .config.
Fixed a problem that .config cannot be read because the environment
variable "TOPDIR" is not defined.
Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
NuttX Build fails when it compiles `examples/hello_nim` for RISC-V (32-bit and 64-bit). That's because the Nim Config Script `config.nims` couldn't identify the Nim Target Platform: `riscv32` or `riscv64`.
This PR fixes `config.nims` so that Nim Compiler correctly derives the Nim Target Platform (`riscv32` or `riscv64`), by searching NuttX `.config` for `CONFIG_ARCH_FAMILY=rv32` or `rv64`.
This logic is slightly different from the Nim Targets `arm` and `arm64`, which are currently derived from `CONFIG_ARCH=arm` and `arm64`.
`config.nims` is explained in this article: https://lupyuen.github.io/articles/nim#inside-nim-on-nuttx