Riscv Dev Board with LCD

I recently got one one of these boards with the lcd. I have been trying to compile the examples in the LCD master library mentioned on the product page and there is no SPI.h header file. I don’t know where to get this file. Should it be part of the LCD library or android frame work?

Richard Snow

Hi ,

Which model RISC-V Dev board you are using? and can you share the library link .

The board is:

SeeedStudio GD32 RISC-V Dev Board



The error message:

cannot open source file “SPI.h” (dependency of “TFT_eSPI.h”)

Library Link:


I have the same problem.

What I have been able to determine, is that the GD32V version of the Arduino framework does not have any standard Arduino libraries. You can verify this fact by navigating to your PlatformIO installation folder and looking at the contents of the framework-arduino-gd32v folder. The full path (on Windows) is

</s><i> </i> %USERPROFILE%\.platformio\packages\framework-arduino-gd32v\ <e>

The libraries subfolder is completely empty (as opposed to framework-ardiuno-avr)… So far, I have been unable to find where to report the bug :frowning:

Any ideas?

I have the exact same problem. Seeed should help us…

The source of the program the board is shipped with should be useful too. Is that source available?

It’s really hard to use the LCD without a working demo.

I had more luck with the Longan nano board.

Confusing, that the LCD is not even connecting with spi but using parallel gpio ports.


Aiming at the questions above, here are some solutions.

The SPI.h is not necessary, so it should be commented out before compiling.

Besides, please check your TFT_eSPI lib is added on the correct path, it must be added under the …/.platformio/lib


Did anyone solve the issue?

I tried to include the library in two different ways, by adding the following lines to platformio.ini:

lib_extra_dirs = …/lib

;lib_deps = Seeed_Arduino_LCD

In the first case, I had to rename the library to TFT_eSPI. I I use include it this way, it’s possible to modify the setup in the files if necessary.

The other way PIO downloads the library, modifications are difficult. By the way, PIO downloads 1.5, however there is a new 1.6.

Unfortunately there are still errors.


  1. seems, that the correct hardware configuration is missing. Its not an easy job, depends on the actual hardware. The manufacturer should include it according to the hw design.
  2. simply commenting out spi.h in main.c doesn’t help, as other files still include it

    I am disappointed.

    This development kit is made for beginners. The provided software simply doesn’t work.

    Seeed, could you please give us a program that’s actually working? Either this one properly configured, or the other one that’s running on the board?


Please try to replace the original Arduino Framework you have downloaded. The “framework-arduino-gd32v-master” document is placed at /.platformio/packages/…

Please download the framework at https://github.com/LynnL4/framework-arduino-gd32v

Thank you very much for the help, it’s working now! :smiley:

Here is a short guide:

  1. Go to this website:

    <LINK_TEXT text=“http://wiki.seeedstudio.com/SeeedStudio … Dev-Board/”>http://wiki.seeedstudio.com/SeeedStudio-GD32-RISC-V-Dev-Board/</LINK_TEXT>

    download and unzip Seeed_Arduino_LCD-TFT_GD32

  2. make an empty lib folder under Projects
  3. download, unzip Seeed_Arduino_LCD-master to the new lib folder, then rename it to TFT_eSPI


    (there are many different modes how to link it, that’s what I choose)
  4. modify Platformio.ini:

This way PIO uses the special LynnL4 libraries (there is the missing SPI.h :wink: ), and links the renamed library in lib as well.

Of course modify debug_tool and upload_protocol according to your debugger tool.

5. modify the


file near line 157:

6. Build, upload, enjoy the show… :wink:

Someone flagged this post as “spam”. I’m not selling anything here. I’m just mentioning a free software to program microcontrollers. If you consider that to be spam, then you should also flag all posts about Eclipse, PlatformIO, GNU GCC, … (they’re also free software). In short: talking about free software is not spam.

Hi @vorosj and @xujx2017,
I’m working in a startup. We’re building a new IDE for microcontrollers (https://embeetle.com). We’d like to support the GD32 RISC-V kit (with LCD) in our IDE.

To get that done, I first need to get a sample project (blinky LED, hello world, …) up and running on this board. I’ve tried everything that was mentioned here on the forum, but still can’t get it to work (please not that I’ve never worked with PlatformIO or Arduino before).

What I really need is a self-contained sample project:

  • Self-contained: It must not rely on external libraries. Everything relevant should be in the project folder itself.

  • IDE independent: The project must be able to compile and flash without any IDE involved. The best approach is a simple makefile that you can run with GNU make for the build, and perhaps some OpenOCD config files for flashing the firmware.

If you could provide me with that, I can very easily support this board in Embeetle IDE.

Thank you very much :slight_smile:
Kind greetings,

@kristof.mulier I’m in charge of the research and development of this product. Maybe I can help you.What advantage does your IDE have over platfromIO?

1 Like

Hi @Baozhu,
I tried to answer your question, but my post was flagged as spam (probably because I was talking about our product). I’ll send you a mail with the answer :slight_smile:

How to run the sample project TFT_GD32 under VSC/Platformio.
I spent about 5 days and finally got it works. below is my steps.

on wiki of the product
download the example project file “TFT_GD32” to your project folder under platformio
rename the original package “framework-arduino-gd32v”(at youruserid/.platformio/packages/…) to some thing else, since it is not completed;
download the new framework on github to get “LynnL4/framework-arduino-gd32v”;
rename it to framework-arduino-gd32v and put it under youruserid/.platformio/packages/…;
Build the TFT_GD32 project. and notice the firmware.hex is at .pio\build\gd32vf103v-eval;


  1. connect the LCD cable in this way the blue marks on both end must face up on both LCD board and Dev board.
    in this way the connector pin1 of LCD is connected to connector pin32 on the Dev board.
  2. Set the jumpers (BOOT0 & BOOT1) like this,
    for uploading/programming/Writing_to_board mode, set BOOT0 to 3V3 and BOOT1 to GND;
    for Normal mode, set BOOT0 to GND and BOOT1 to GND;
    STEP 5
  3. following wiki of SeeedStudio-GD32-RISC-V-Dev-Board
    download the DFU tool;
  4. set the jumper to uploading/programming/Writing_to_board mode(BOOT0 to 3V3 and BOOT1 to GND);
    and plug the USB cable to your computer;
  5. program the firmware.hex to the board ;
  6. reset the jumper to Normal mode(BOOT0 to GND and BOOT1 to GND). and plug the usb cable to computer. the show will begin.

I tried both procedures (by vorosj and MichaelZhu), and didn’t get through “SPI.h not found”, no matter how hard I tried.

I have concluded that unfortunately, seeed studio did not put in enough time or effort into making this board easy to use.

The light at the end of the tunnel is that I may be able to make my own applications some other way, because the purpose of the procedures shown by seeed studio and in this forum seems to getting the board to act as an Arduino, which is certainly NOT what I want.

Too bad. I had high hopes for this board.

go to my github MichaelZhu168