Longan nano & usb-to-serial issue

spent several days. finally got it done for the sipped longan nano board. please see blow:

Step1.
in “platformio.ini” set
[env:sipeed-longan-nano]
platform = gd32v
framework = gd32vf103-sdk
board = sipeed-longan-nano
monitor_speed = 115200
upload_protocol = serial
; change microcontroller
board_build.mcu = GD32VF103CBT6

; change MCU frequency
board_build.f_cpu = 108000000L

Step 2.
USB-to-Serial cable (Prolific PL2303 TA chip inside) pins wires with sipeed-longan-nano
(RX, TX must be across wired. see below)

USB-to-Serial pins— sipeed-longan-nano pins
VDD— VDD
GND— GND
TX— RX
RX— TX

Step3.
In Device Manager (Win 10) Ports (COM & LPT)
select the "USB-to-Serial Comm Port (COMx). Properties. Port Settings.
set it as below
Bits per second: 115200
Data bits: 8
Parity: Even
Stop bits: 1
Flow control: None

other notes:

  1. the original code longan_led_on() is actually turn the LED off;
  2. sometimes need to “push boot, pusg reset, release boot” twice to make the board to into upload mode.

hope this can help you.