Having bought a small lump of what I thought were Longan Nano boards from aliexpress I struggled for a while to get them to do anything other than become bricks. So this explanation is intended to make an explicit post about the issue rather than it be buried in a discussion of uploading or debugging tools.
Apologies where this is a slight repeat of a sub part of one of those topics :-
A bunch of digging, googling and coupled with trial and error work showed that there is a lot of confusion amongst the sellers as to what they are selling. The boards as supplied had the wrong processors on them.
In most cases the Sipeed (I am assuming none are clones of the earlier version, but they could well be) boards appear to have been produced in two identical looking versions.
Longan Nano using the GD32VF103CBT6 processor (128K Flash, 64K Ram)
Longan Nano Lite using the GD32VF103C8T6 processor (64K Flash, 20K Ram)
In discussion with Sipeed, they did confirm that there were a small number of initial boards made using the GD32VF103C8T6. But that they should be pretty rare.
However there seems to be a lot of confusion on aliexpress when you read the item descriptions. Some descriptions in one place claim GD32VF103CBT6 and go on to later counter claim GD32VF103C8T6. And vice versa.
In my own case the claims were all consistently GD32VF103CBT6, but the boards that arrived were GD32VF103C8T6. So worth asking before buying, and be prepared to test them as soon as they arrive before the buyer protection has expired.
Platformio will support either (\o/) as there are board profiles for both using the GD32V platform . And putting aside the flash and ram they are otherwise identical CPU, IO etc.
Symptoms of programming a GD32VF103C8T6 with either pre-compiled code or compiled code for the GD32VF103CBT6 are that it crashes randomly and quickly or does not run at all. Although the DFU or JTAG upload appear to have succeeded (errors not withstanding).
There are a bunch of errors shown in the terminal for DFU or JTAG (Sipeed RV-Debugger Lite) uploading (Platformio 5.1.0, out of the box) which does confuse matters a lot. Particularly if you are a platformio newbie like myself.
It is also possible to upload them the other way around, programming a GD32VF103CBT6 with either a pre-compiled binary or a compiled binary for the GD32VF103C8T6 . In this case it all works fine except that you don’t get the full code and memory space.
Oddly the loading tools are not currently able to tell the two apart or warn of the issue.
The mismatch that fails is probably due to the heap v stack placement leaving one or other of them placed into ram that does not exist with random results.
Overall though nice little boards, well featured processors (when you know for sure what they are) and using the same peripherals as the STM32F10 version of the same chip, but with a Risc-V core. Don’t be put off by the evolving Platformio support or randomness of vendors.