A SDK for WinnerMicro W806



This is a SDK for WinnerMicro W806, migrated from W800 SDK.

SDK File Structure

├─app              # User application source code
├─bin              # Binary executables, compilaion results
├─demo             # Demos
├─doc              # Release notes, API Docs 
├─include          # API header files 
├─ld               # Link scripts
├─lib              # Libraries
├─platform         # Chip&Platform related common code
├─src              # Applications, network protocols, OS and 3rd party source code
└─tools            # Compilation scripts, tools for CDS IDE project、CDK project and IMAGE generation

How To

Install Toolchain


  • https://occ.t-head.cn/community/download
  • 导航->工具->工具链-800系列->(For now, it is V3.10.29)
  • Download according to your OS version, e.g. for Ubuntu20.04, download csky-elfabiv2-tools-x86_64-minilibc-20210423.tar


Be careful that the tar ball file use ./ as root path, please move it to a subfolder or specify a target folder for the uncompression

mkdir csky-elfabiv2-tools-x86_64-minilibc-20210423
tar xvf csky-elfabiv2-tools-x86_64-minilibc-20210423.tar.gz  -C csky-elfabiv2-tools-x86_64-minilibc-20210423/

Then move it to somewhere, e.g. /opt, and set it read-only

cd /opt/toolchains/
sudo mv ~/Backup/linux/csky-elfabiv2-tools-x86_64-minilibc-20210423/ .
sudo chown -R root:root csky-elfabiv2-tools-x86_64-minilibc-20210423/

You don't need to add it to PATH variable.


Checkout this project

git clone https://github.com/IOsetting/wm-sdk-w806.git

Run menuconfig, set the toolchain path

cd w806_makefile
make menuconfig

In menuconfig, navigate to Toolchain Configuration, In the second line, the toolchain path, input the absolute path of the toolchains, e.g.


Leave other settings unchanged, Save and Exit menuconfig

Now, compile the SDK



Check the USB port name of your development board using commands dmesg and lsusb, the USB chip is CH340 so it is easy to find in the list.

Then run menuconfig to set the download port

cd w806_makefile
make menuconfig

In menuconfig, navigate to Download Configuration -> download port, input the USB port name you just got, e.g. ttyUSB0, then save and exit menuconfig

Then download the hex to the development board

make flash

Press the Reset key according to the prompt

build finished!
connecting serial...
serial connected.
wait serial sync.........
please manually reset the device. <--- Press the Reset key
serial sync sucess.
start download.
0% [###] 100%
download completed.
please manually reset the device.

You need to press Reset key again to make it run, or it will stay in download mode (keep bumping CCCCCC).

  • error libc

    error libc

    CC libc_port.c libc_port.c: In function ‘_ftoa’: libc_port.c:888:3: internal compiler error: Instrucción ilegal if (diff > 0.5) { ^~ csky-elfabiv2-tools-x86_64-minilibc-20210423

    tanks ( git clone repository)

    opened by iotw806 18
  • Timer Demo not working

    Timer Demo not working

    Compiled Timer Demo (/demo/tim) and flashed it to w806.

    In serial monitor it doesn't serial print anything, it displays only "enter main" and then nothing...

    opened by Chandler-Kluser 8
  • Commenting out CONFIG_KERNEL_NONE = 1 might be switching off the interrupts.

    Commenting out CONFIG_KERNEL_NONE = 1 might be switching off the interrupts.

    I'm working on a small W806 app (https://github.com/nyh-workshop/w806-i2s) and trying to put a FreeRTOS inside.

    From the readme, I need to comment out the "CONFIG_KERNEL_NONE = 1" or else it won't work.

    However when I comment out this setting, most of the interrupts are not being called anymore, even the DMA ones.

    There is someone also discussing about this here: http://ask.winnermicro.com/question/269.html. There is a possible answer at the bottom of that thread - however my Mandarin is limited and the translation seems to be not working good today.

    It could mean to remove the macros, but I'm not sure which one to remove on these files.

    opened by nyh-workshop 6
  • w806 CPU exception

    w806 CPU exception

    Hello, Friends. I tried to connect the fatfs library to the SDHC card via SPI on the w806. My card initialization is going well. And when I try to read one block, I get an error on UART monitor: CPU Exception : 7r0: 00000000 r1: 001010a9 r2: 00000001 r3: 001000a9 r4: c08ed88e r5: 7c00befb r6: b90600bf r7: a4f30200 r8: 4de428b3 r9: 4c83600a r10: 4e46aa12 r11: 3384e604 r12: ffffffff r13: 0000002d r14: 20001100 r15: 000621ea epsr: e0000340epc : 4dfa. My question is: what could be the problem? In which files is CPU exceptions processing located? In which file is the stack fnd heap size specified? I also tried to write a library to work with HARD I2C. Did you also fail to get the START command on the bus? Is it a hardware problem in the chip? I will be very grateful for answers to my questions. I would really like to understand the work of this MCU in more detail. My email [email protected] .

    opened by AndrejChoo 5
  • I2S and DMA: Trouble getting Circular to work, and what are differences between Normal Circular vs. Link Circular?

    I2S and DMA: Trouble getting Circular to work, and what are differences between Normal Circular vs. Link Circular?

    Hi there, I am trying to write a simple I2S and DMA example of a circular buffer with only the DMA TX. However, I could not get these "Half Complete" and "Complete" interrupts to be triggered. There is no response after calling HAL_I2S_Transmit_DMA. All it does now is to jump to the while loop in the main.

    In the library, there are two DMA transfer modes: Link and Normal. I am not entirely sure what are the differences between that, so I picked the Normal.

    Here are the parts of the code, which I modified from the i2s example:


    int main(void)
        printf("enter main\r\n");
        // I2S_BUFFER_SIZE is 512 in my modified example:
        memset(tx_buf, 0x00, I2S_BUFFER_SIZE);
        HAL_I2S_Transmit_DMA(&hi2s, (uint32_t*)tx_buf, I2S_BUFFER_SIZE);
        while (1)
    static void DMA_Init(void)
        HAL_NVIC_SetPriority(DMA_Channel0_IRQn, 0);
    void HAL_I2S_TxHalfCpltCallback(I2S_HandleTypeDef *hi2s)
        printf("tx halfcplt\r\n");
    void HAL_I2S_TxCpltCallback(I2S_HandleTypeDef *hi2s)
        printf("tx cplt\r\n");


    void HAL_I2S_MspInit(I2S_HandleTypeDef *hi2s)
        if (hi2s->Instance == I2S)
            hdma_i2s_tx.Instance = DMA_Channel0;
            hdma_i2s_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
            hdma_i2s_tx.Init.DestInc = DMA_DINC_DISABLE;
            hdma_i2s_tx.Init.SrcInc = DMA_SINC_CIRCULAR;
            hdma_i2s_tx.Init.DataAlignment = DMA_DATAALIGN_WORD;
            hdma_i2s_tx.Init.Mode = DMA_MODE_NORMAL_CIRCULAR;
            hdma_i2s_tx.Init.RequestSourceSel = DMA_REQUEST_SOURCE_I2S_TX;
            hdma_i2s_tx.LinkDesc = tx_desc;
            if (HAL_DMA_Init(&hdma_i2s_tx) != HAL_OK)
            __HAL_LINKDMA(hi2s, hdmatx, hdma_i2s_tx);   
            HAL_NVIC_SetPriority(I2S_IRQn, 1);

    Is the Circular mode, when running, should trigger both the Half-Transfer Complete and Transfer Complete interrupts continuously?

    opened by nyh-workshop 4
  • Windows msys2 $make menuconfig gives Permission denied

    Windows msys2 $make menuconfig gives Permission denied

    Error: running msys2 build system gives the following error, while attempting to change toolchain executables path $ make menuconfig make: ./tools/W806/mconfig.sh: Permission denied make: *** [tools/W806/rules.mk:141: menuconfig] Error 127

    system: msys2 is running onto windows 11, all necessary packages updated/installed msys2 (run as admin) did not work

    opened by ramymagdy-rm 3
  • ld: error: no memory region specified for loadable section `.eh_frame_hdr'

    ld: error: no memory region specified for loadable section `.eh_frame_hdr'

    ok ... ld: error: no memory region specified for loadable section `.eh_frame_hdr'

    text of config ... `# Automatically generated file; DO NOT EDIT. WinnerMicro W800 Configuration

    Firmware Configuration


    Download Configuration


    Compile Configuration

    CONFIG_W800_USE_LIB is not set CONFIG_W800_FIRMWARE_DEBUG is not set

    Toolchain Configuration

    CONFIG_W800_TOOLCHAIN_PREFIX="csky-abiv2-linux" CONFIG_W800_TOOLCHAIN_PATH="/opt/toolchains/csky-linux-gnuabiv2-tools-x86_64-glibc-linux-4.9.56-20210423/bin/"`

    opened by gitmun 3
  • "Enable Use Lib" does not work correctly in SDK and CDK project.

    Hello there, I have just compiled a simple C++14 app with a number of constexpr and static declarations. However, it could not compile with reasons of undefined reference to __cxa_guard_acquire in the compilation.

    From the static compilation guides in C++, it is noticed that some form of stdlib needed to be enabled to be successfully compiled, or disabling the thread safety mechanism. However, since this app will be also used with a FreeRTOS, I will have to use the libc ("Enable Use Lib"?) provided.

    After enabling the "Enable Use Lib" in menuconfig, and compiling it, I got a warning:

    0/../../../../csky-elfabiv2/bin/ld.exe: warning: cannot find entry symbol Reset_Handler; defaulting to 08010400
    OBJCOPY  W806.bin
    generate normal image completed.
    generate normal image completed.
    compress binary completed.
    generate compressed image completed.
    build finished!
    connecting serial...

    and I could not get the program to run, and I'm suspecting it's just waiting for the user to upload binary in the terminal: MMMCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC It is possible too that it's not jumping to the intended program location.

    opened by nyh-workshop 2
  • How to make own custom app / Project template

    How to make own custom app / Project template

    Hi there, I managed to compile and flash the W806 kit successfully using the guides provided.

    However, I'm not sure which app it uploads to the board. It said "W806.bin" in the "make flash" output - but I couldn't locate that sample app that is associated with the W806.bin. Is it in the "demo" folder, or one of the apps in the "app" folder?

    Also, it could be easy if there's an empty project template which I can work on different things. Is it possible to just reuse that whole "WM-SDK-W806" folder and add my custom app inside (possibly passing a parameter to the make command?), or I have to create another separate copy of "WM-SDK-W806" if I need to have my own app inside?

    opened by nyh-workshop 2
  • sky-linux-gnuabiv2/bin/ld: error: no memory region specified for loadable section `.eh_frame_hdr' collect2: error: ld returned 1 exit status

    sky-linux-gnuabiv2/bin/ld: error: no memory region specified for loadable section `.eh_frame_hdr' collect2: error: ld returned 1 exit status

    /opt/toolchains/csky-linux-gnuabiv2-tools-x86_64-glibc-linux-4.9.56-20210423/bin/../lib/gcc/csky-linux-gnuabiv2/6.3.0/../../../../csky-linux-gnuabiv2/bin/ld: warning: file /opt/toolchains/csky-linux-gnuabiv2-tools-x86_64-glibc-linux-4.9.56-20210423/bin/../lib/gcc/csky-linux-gnuabiv2/6.3.0/hard-fp/libgcc.a(_fixunsdfsi.o)'s arch flag ck810 conflict with target ck803,set target arch flag to ck810 /opt/toolchains/csky-linux-gnuabiv2-tools-x86_64-glibc-linux-4.9.56-20210423/bin/../lib/gcc/csky-linux-gnuabiv2/6.3.0/../../../../csky-linux-gnuabiv2/bin/ld: error: no memory region specified for loadable section `.eh_frame_hdr' collect2: error: ld returned 1 exit status make: *** [tools/W806/rules.mk:206: bin/build/W806/image/W806.elf] Error 1

    opened by gitmun 2
  • download location for the toolchain

    download location for the toolchain

    I found some URL where you can download the toolchains and documentation without an account (and that work, unlike ipfs.io that currently times out) in a AUR package: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=csky-toolchain-bin

    opened by minirop 1
  • enable signature and privkey load

    enable signature and privkey load

    I am trying to enable firmware signature but it just doesn't work.

    I first enabled image key select with/without signature. the code just works irrespective of anything.

    I dont see any way to flash the otp or something to load the priv key inside.

    opened by arunmagesh 1
  • not programing ??????????????

    not programing ??????????????

    first of all thank you for the answer and the project ...

    well .... I bought the product from aliexpress and programmed the gpio example to see if it loaded ... now I have made a program for a greenhouse control and what is my surprise that when I save it (without compilation errors) I get it says that it is recorded (without errors) but instead there is still the led program, since my program does not use leds

    opened by iotw806 3
Have fun!
The Gecko SDK (GSDK) combines all Silicon Labs 32-bit IoT product software development kits (SDKs) based on Gecko Platform into a single, integrated SDK.

Silicon Labs Gecko SDK (GSDK) The Gecko SDK (GSDK) combines Silicon Labs wireless software development kits (SDKs) and Gecko Platform into a single, i

Silicon Labs 163 Dec 28, 2022
The old Windows NT OpenGL samples/SDK from an MSDN CD.

The OpenGL API is supported on a variety of graphics hardware; the software in this release provides support for graphics hardware including basic emulation on any video adapter that is supported with the operating system, and accelerated graphics hardware that is supported by an OpenGL mini-client driver (MCD) or an OpenGL installable client driver (ICD).

Ian Hanschen 19 Aug 13, 2022
Poc to test my little friend features without any sdk

poc.vic-hack POC to test my little friend "vector" features without any sdk Ultimate goal - being able to write own firmware components without propri

Oleg Lytvynenko 8 Feb 26, 2022
A SDK with a built-in cheat for Garry's Mod.

GMod-SDK This is a module for Garry's Mod that works based on a SDK. I've spent the past few days reversing a few modules of the game, in order to get

null 70 Jan 3, 2023
Portal 2/Portal Reloaded internal cheat sdk with imgui-based menu

portal2-internal A simple Portal 2/Portal Reloaded internal cheat base with imgui-based menu coded in a few days because why not Features: simple menu

es3n1n 38 Jan 2, 2023
Playground app for ZNN Dart SDK

Prerequisites Flutter SDK VS Code IDE recommended Installation Clone the repo git clone https://github.com/nemoryoliver/znn_playground.git Install pa

Oliver Martinez 10 Oct 26, 2022
32blit SDK boilerplate for the PicoSystem RP2040-based handheld

PicoSystem 32blit Boilerplate This is a basic template for starting 32blit projects for the Pimoroni PicoSystem. It shows a minimal code layout and as

32blit 15 Nov 14, 2022
MinIO C++ Client SDK for Amazon S3 Compatible Cloud Storage

The MinIO C++ Client SDK provides simple APIs to access any Amazon S3 compatible object storage.

Multi-Cloud Object Storage 45 Dec 26, 2022
First open-source Geometry Dash cross-platform Modding SDK

BoolkaSDK First open-source Geometry Dash cross-platform Modding SDK Requirements CMake 3.21 Android NDK r23 LLVM x86 Java and ApkTool Building Open C

null 7 Nov 20, 2022
Polaris-SDK for PHP

polaris-php Polaris is an operation centre that supports multiple programming languages, with high compatibility to different application framework. P

liaochuntao 0 Dec 10, 2021
This repository contains the source for the ANARI API SDK

ANARI-SDK This repository contains the source for the ANARI API SDK. This includes: Front-end library API utilties and helpers (mostly for implementat

The Khronos Group 69 Dec 11, 2022
A bare metal SDK for the ESP32 & ESP32C3

MDK (Minimal Development Kit) - a baremetal ESP32/ESP32C3 SDK An bare metal, make-based SDK for the ESP32, ESP32C3 chips. It is written from scratch u

Sergey Lyubka 100 Jan 2, 2023
Korg logue SDK port of Freeverb

Freeverb reverberator for logue SDK This is a logue SDK port of Freeverb reverberator by Jezar at Dreampoint. See readme.txt for the original readme.

null 7 Jul 30, 2022
SDK for creating GTA IV .asi plugins

iv-sdk "SDK" for creating GTA IV .asi plugins Supports and (EFIGS only) The majority of the project has been created for and t

null 29 Dec 9, 2022
SDK for building cross-platform desktop apps in ANSI-C

NAppGUI Cross-Platform C SDK. Build portable desktop applications for Windows, macOS and Linux, using just C. Quick start in Windows Prerequisites Vis

Francisco García Collado 242 Jan 2, 2023
Raspberry Pi Pico SDK Examples

Raspberry Pi Pico SDK Examples Getting started See Getting Started with the Raspberry Pi Pico and the README in the pico-sdk for information on gettin

Raspberry Pi 1.6k Jan 1, 2023
Simple C++ sample showing how to use OpenCL v1.2 on Windows/Linux/OSX with no 3rd party SDK installs

simple_opencl This is a simple and practical C++ sample showing how to use OpenCL v1.2 on Windows/Linux/OSX with no 3rd party SDK installs required un

Rich Geldreich 30 Sep 14, 2022
This is the development repo of Moai SDK.

Moai SDK is an embeddable cross-platform game development SDK written in C++ and scriptable in Lua. You can use Moai to write games or apps, or you ca

Zipline Games, Inc. 901 Dec 8, 2022
Sensory Cloud C++ SDK

Sensory Cloud C++ SDK This repository contains the source code for the Sensory Cloud C++ SDK. Requirements This project uses CMake as the primary buil

SensoryCloud 2 Jan 10, 2022