Git Product home page Git Product logo

bdk_freertos_tiancj's Introduction

Beken Development Kit on FreeRTOS

The BDK FreeRTOS supports multiple Beken chips, including BK7231N, BK7231U, BK7251. This repo mainly use BK7231U USB devices.

Hardware

We use BK7231U 48pin chip that supports USB Host/Device, and SCH and PCB are located in Hardware directory.

Pin assignment:

Get Started

Download arm gcc toolchain from https://developer.arm.com/downloads/-/gnu-rm, and set env FREERTOS_EXEC_PATH, for example

export FREERTOS_EXEC_PATH=/opt/toolchain/gcc-arm-none-eabi-5_4-2016q3/bin/

Current bash and zsh shell is supported, you may change you /bin/sh to bash or zsh.

Download source code and compile

git clone https://github.com/tiancj/bdk_freertos
make bk7231u -j$(nproc)

The generated binary is out/beken7231_bsp_crc.bin and out/all_2M.1220.bin. The former bin doesn't contain bootloader, while the latter contains bootloader.

Flash

Download Flash tool from https://github.com/tiancj/hid_download_py, and follow the instruction there to install it.

If BK7231U is a blank chip, you need to flash it a bootloader or a bin that contains bootloader.

Connect SPI flasher to BK7231U, and run the following command:

hidprogram out/all_2M.1220.bin

After flash the bootloader, you doesn't need the SPI flasher to flash bootloader later. Instead, you can use UART to flash.

uartprogram out/beken7231_bsp_crc.bin

Default baudrate is 115200 8N1, and console log is at UART1.

Then enjoy!

Bootloader

git checkout bootloader  # change to bootloader branch
make clean
make bk7231u -j8

uf2 bootloader is out/beken7231u_crc.bin,use hidprogram to flash.

After uf2 bootloader is flashed, press USER button before plug USB or press CEN button. Then copy uf2 firmware to usb disk, uf2 bootloader will reboot after write firmware to flash automatically.

Supported functions

  • WiFi (use sta command to connect to AP, or softap command to setup a hotspot)
  • USB Device (CherryUSB and Mentor USB), such as HID, MSC, CDC, etc.
  • UF2 bootloader (enable CFG_UF2 in app/sys_config_bk7231u.h)

Todo

  • USB SPI, I2C, PWM, SD/SDIO, ADC, IrDA, MJPEG, etc devices
  • Linux device drivers for these USB device
  • opensource wifi 4 protocol stack (softmac)

Documents

v There are original Beken documents at documents directory, which includes SDK API and User Guide. SDK API is recommended to read to familiar with API that used to develope user applications. If you want to develop USB devices or Host devices, please refer CherryUSB APIs at https://cherryusb.readthedocs.io/.

Contribution

Thanks the following repos:

bdk_freertos_tiancj's People

Contributors

tiancj avatar bekencorp avatar xeenych avatar

Stargazers

Pierre-Dªvid 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.