RT-smart Kernel - Compile errors with the Hello app

Hello MangoPi,

I have successfully downloaded the SDK from this thread and now trying to experiment with a simple Hello app.

OS: virtual box with Lubuntu (latest version), x86-64 PC running Windows10

On the start I used this script provided:

. smart-env.sh riscv64

However, I experienced compile error - this is when I didn’t pass any parameters:

comp1@comp1-virtualbox:~/mango_rtsmart_app/userapps/apps/hello$ scons

scons: *** No SConstruct file found.
File "/usr/lib/python3/dist-packages/SCons/Script/Main.py", line 947, in _main

Then, I used “scons -u” and it complained about CC1 missing, but then now reported about something else:

scons: Entering directory `/home/comp1/mango_rtsmart_app/userapps'
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build/hello
CC build/hello/main.o
Assembler messages:
Fatal error: invalid -march= option: `rv64imafdc'
scons: *** [build/hello/main.o] Error 1
scons: building terminated because of errors.

Is there something I left out during the deploying of the SDK?

I have also included the path of CC1 which is from this mango_rtstart_app:

~/mango_rtsmart_app/tools/gnu_gcc/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/libexec/gcc/riscv64-unknown-linux-musl/10.1.0

However, after including this CC1 path, it still results to this:

comp1@comp1-virtualbox:~/mango_rtsmart_app/userapps/apps/hello$ scons -u --verbose
scons: Entering directory `/home/comp1/mango_rtsmart_app/userapps'
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build/hello
riscv64-unknown-linux-musl-gcc -o build/hello/main.o -c -mcmodel=medany -march=rv64imafdc -mabi=lp64 -Werror -Wall -O0 -g -gdwarf-2 -n --static -DHAVE_CCONFIG_H -I. -Iapps/hello -Isdk/rt-thread/include -Isdk/rt-thread/components/dfs -Isdk/rt-thread/components/drivers -Isdk/rt-thread/components/finsh -Isdk/rt-thread/components/net apps/hello/main.c
Assembler messages:
Fatal error: invalid -march= option: `rv64imafdc'
scons: *** [build/hello/main.o] Error 1
scons: building terminated because of errors.

Should I need to leave out the rv64imafdc, or is there other way I can successfully compile this?