GithubHelp home page GithubHelp logo

liteos-bluepillplus's Introduction

Huawei LiteOS - WeAct BluePill Plus

This is a build of Huawei LiteOS 5.1.0 for GD32F303 on WeAct BluePill Plus . The demo does the following:

  • led blinks
  • usb cdc serial port echoes back all characters
  • usb hid device moves the mouse in small circles
  • Huawei LiteOS console on serial0 (PA9/PA10)
********Hello Huawei LiteOS********

LiteOS Kernel Version : 5.1.0
build data : Aug 17 2021 10:35:22

**********************************
OsAppInit
cpu 0 entering scheduler
app init!
Hello, welcome to liteos demo!

Huawei LiteOS # 

Installation

Download pre-built binaries from releases, boot in DFU mode, connect a usb-serial adapter to pin PA9/PA10 and install using

stm32flash -w Huawei_LiteOS.hex /dev/ttyUSB0

Developer notes

Patches are relative to Huawei Liteos

Do a make menuconfig, set target family to GD, target to GD32F303RGT6_BearPi.

(Top) โ†’ Targets
                          Huawei LiteOS Configuration
    Family (GD)  --->
    Target (GD32F303RGT6_BearPi)  --->
[ ] Qspi peripherals
[*] Enable Floating Pointer Unit
[*] Enable Access Permission Control
[ ] Enable Flash Patch

Makefile

Create binaries in intel hex format.

Makefile.patch

link script

The linker script is incomplete. This patch is needed to link.

GD32F303RGT6_BearPi.patch

WeAct BluePill-Plus

GD32F303RGT6_BearPi has a LED on pin PB0, WeAct BluePill Plus has a LED on pin PB2. This patch puts the led on pin PB2. Apply this patch if compiling for WeAct BluePill Plus. Skip this patch if compiling for GD32F303RGT6_BearPi.

WeActBluePillPlus.patch

usb device

The GD32F303 usb hardware seems register-compatible with STM32F103. The usb stack used is libusb_stm32, configuration is same as for STM32F103.

libusb_stm32 is a device-only usb stack for stm32 arm, optimized for speed and size. Compare with Ha thach tinyusb.

Compiling

Huawei LiteOS 5.1.0 was compiled using gcc-9.4.0 and gcc-arm-none-eabi-9-2020-q2-update:

export PATH=/opt/xpack-arm-none-eabi-gcc-9.3.1-1.1/bin/:/opt/gcc-9.4.0/bin/:$PATH
make GCCLIB_PATH_32=/opt/xpack-arm-none-eabi-gcc-9.3.1-1.1/lib/gcc/arm-none-eabi/9.3.1/ CXXLIB_PATH_32=/opt/xpack-arm-none-eabi-gcc-9.3.1-1.1/arm-none-eabi/lib/

Firmware

Download firmware with a debugger or using a usb-serial converter.

To download via the serial port, connect a usb serial to the WeAct BluePill Plus:

  • RXD to pin A9
  • TXD to pin A10

Do not provide power via the USB connector and the +5V pin at the same time, or you risk short-circuit.

Boot in DFU mode:

  • press BOOT0 button
  • press RESET
  • release RESET
  • release BOOT0

Download the intel hex file via DFU. On linux:

stm32flash -w out/GD32F303RGT6_BearPi/Huawei_LiteOS.hex /dev/ttyUSB0

Reboot and you should have the LiteOS prompt on the serial port.

not truncated

liteos-bluepillplus's People

Contributors

koendv avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.