Using Maix Longan as RV Debugger fails to

Hi,
I am trying to use one Maix longan (nano) to debug another one. The VS code project to do this is here

RV-LINK (gitee.com)

But when doing an upload from platformio I get this error (I put more debug on the line for the key name)

KeyError: ‘Invalid board option ldscript build.ldscript’:

The project comes with a platformio, and a build.py

Platformio
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter, extra scripting
; Upload options: custom port, speed and extra flags
; Library options: dependencies, extra library storages
[env:sipeed-longan-nano]
platform = gd32v
;framework = gd32vf103-sdk
board = sipeed-longan-nano
monitor_speed = 115200
upload_protocol = dfu
debug_tool = sipeed-rv-debugger
build_flags =
-DGD32VF103C_START
-DUSE_STDPERIPH_DRIVER
-DUSE_USB_FS
-DLINK_LONGAN_NANO
-DTARGET_GD32VF103
-DAPP_GDB_SERVER
-DRVL_ASSERT_EN
-MMD
extra_scripts =
pre:build.py
src_filter =
+<*>-<.git/>-<.svn/>----
-<app/riscv-prober>
-<app/test-usb-serial/>
-<link/gd32vf103c-start/rvl-link.c>
-<link/gd32vf103c-start/rvl-button.c>
-<link/gd32vf103c-start/rvl-led.c>
-<link/gd32vf103c-start/rvl-jtag.c>
-<link/gd32vf103c-start/gd32vf103c_start.c>
-<link/gd32vf103c-start/rvl-jtag-inline.h>
-<link/rvl-link-stub.c>
-<link/gd32vf103c-start/RISCV/gcc/>
+<link/gd32vf103c-start/RISCV/gcc/init.c>
+<link/gd32vf103c-start/RISCV/gcc/handlers.c>
+<link/gd32vf103c-start/RISCV/gcc/entry.S>
+<link/gd32vf103c-start/RISCV/gcc/start.S>
-<link/gd32vf103c-start/RISCV/stubs>
+<link/gd32vf103c-start/RISCV/stubs/sbrk.c>
-<link/gd32vf103c-start/GD32VF103_standard_peripheral/>
+<link/gd32vf103c-start/GD32VF103_standard_peripheral/system_gd32vf103.c>
+<link/gd32vf103c-start/GD32VF103_standard_peripheral/Source/gd32vf103_gpio.c>
+<link/gd32vf103c-start/GD32VF103_standard_peripheral/Source/gd32vf103_rcu.c>
+<link/gd32vf103c-start/GD32VF103_standard_peripheral/Source/gd32vf103_timer.c>
+<link/gd32vf103c-start/GD32VF103_standard_peripheral/Source/gd32vf103_eclic.c>
+<link/gd32vf103c-start/GD32VF103_standard_peripheral/Source/gd32vf103_exti.c>
+<link/gd32vf103c-start/GD32VF103_standard_peripheral/Source/gd32vf103_pmu.c>

And the build.py

from os.path import isdir, join
Import(“env”)
board = env.BoardConfig()
PROJ_DIR = “$PROJECT_DIR”
env.Replace(
ASFLAGS = [“-x”, “assembler-with-cpp”],
CCFLAGS=[
“-Og”,
“-g”,
“-Wall”,
“-march=%s” % board.get(“build.march”),
“-mabi=%s” % board.get(“build.mabi”),
#“-mcmodel=%s” % board.get(“build.mcmodel”),
“-fshort-wchar”,
“-ffunction-sections”,
“-fdata-sections”,
“-fstack-usage”,
“-msmall-data-limit=8”,
],
LINKFLAGS=[
“-march=%s” % board.get(“build.march”),
“-mabi=%s” % board.get(“build.mabi”),
#“-mcmodel=%s” % board.get(“build.mcmodel”),
“-msmall-data-limit=8”,
“-nostartfiles”,
“-Wl,–gc-sections”,
#“-specs=nano.specs”
],
LIBS=[“c_nano”]
)

copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)

env.Append(ASFLAGS=env.get(“CCFLAGS”, [])[:])
env.Append(
CPPPATH = [
join(PROJ_DIR, “src”, “app”, “gdb-server”),
join(PROJ_DIR, “src”, “include”),
join(PROJ_DIR, “src”, “link”),
join(PROJ_DIR, “src”, “target”, “family”, “gd32vf103”),
join(PROJ_DIR, “src”, “target”, “arch”, “riscv”),
join(PROJ_DIR, “src”),
join(PROJ_DIR, “src”, “link”, “longan-nano”),
join(PROJ_DIR, “src”, “link”, “gd32vf103c-start”),
join(PROJ_DIR, “src”, “link”, “gd32vf103c-start”, “GD32VF103_standard_peripheral”),
join(PROJ_DIR, “src”, “link”, “gd32vf103c-start”, “GD32VF103_standard_peripheral”, “Include”),
join(PROJ_DIR, “src”, “link”, “gd32vf103c-start”, “GD32VF103_usbfs_driver”, “Include”),
join(PROJ_DIR, “src”, “link”, “gd32vf103c-start”, “RISCV”, “drivers”),
]
)
env.Replace(
LDSCRIPT_PATH = join(PROJ_DIR, “src”, “link”, “gd32vf103c-start”, “RISCV”, “gcc”, board.get(“build.ldscript”))
)