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: