Deepseek on Microcontroller? Running LLM on RT-Thread

RT-Thread IoT OS
3 min readFeb 7, 2025

--

Introduction

While browsing the RT-Thread Club, I came across an article about microcontrollers interacting with large language models. Considering the recent surge in interest around large language models and having an RA8D1 Vision Board development kit available, I decided to give it a try by integrating a large language model API on the Vision Board to enable intelligent conversational features.

Test Platform

Implementation Process (Using Vision Board as an Example)

  1. Log in to DeekSeek-API: https://api-docs.deepseek.com/zh-cn/
  2. Create a DeekSeek API key:

3. Create a New Wi-Fi Example Project Based on Vision Board

4. Configure the LLM Package: Double-click on RT-Thread Settings, select “Add Package”, and search for the keyword “llm”.

5. Add the Package to the Project: After adding the package, proceed to configure it by entering the API key obtained earlier.

6. Configure WebClient in TLS Mode:
Go to RT-Thread SettingsPackagesIoT (Internet of Things)WebClient → In the "TLS Mode" section, select MbedTLS support.

7. Enable Software RTC Functionality

8. Update Package Configuration:
In the RT-Thread Settings interface, press Ctrl+S to save the configuration. Then, compile the code and flash it to the board.

9. Manually Connect the Development Board to Wi-Fi:
Open a serial terminal tool and enter:
wifi join [Wi-Fi Name] [Wi-Fi Password]

10. Enter the Chat Terminal:
Type “llm” to enter the chat terminal. Press CTRL+D to exit the chat window and return to the MSH terminal.

RT-Thread Community Developer RB contributed this article.
Check out the open-source Repository
:
https://github.com/Rbb666/llm_chat

Note: Due to high usage on Deepseek’s servers, you may encounter connection failures, resulting in errors like the one shown below:

You can try switching to the ChatGPT large language model for an alternative experience.

--

--

RT-Thread IoT OS
RT-Thread IoT OS

Written by RT-Thread IoT OS

An Open-Source Community-Powered Real-Time Operating System (RTOS) Project! Let’s develop, DIY, create, share, and explore this new IoT World together!

No responses yet