Coder Social home page Coder Social logo

tkernelcn / f1c100s_projects Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nminaylov/f1c100s_projects

0.0 0.0 0.0 2.8 MB

Low-level libraries and bare metal projects for allwinner F1C100s SOC

License: GNU General Public License v3.0

C++ 0.06% C 99.81% Assembly 0.04% Makefile 0.08%

f1c100s_projects's Introduction

Bare metal libraries and projects for Allwinner F1C100s/F1C200s SOC

Libraries and tools

  • f1c100s/arm926 - Various ARMv5-related headers

  • f1c100s/drivers - Low-level peripheral drivers. Currently work-in-progress:

    • f1c100s_clock - Clock controller (CCU)
    • f1c100s_intc - Interrupt controller
    • f1c100s_gpio - GPIO, external interrupts
    • f1c100s_timer - Timers, watchdog
    • f1c100s_pwm - PWM outputs
    • f1c100s_uart - 16550-compatible UART
    • f1c100s_de - Display Engine (TCON, DEBE, DEFE)
    • f1c100s_tve - Undocumented TV(CVBS) encoder
    • f1c100s_tvd - Undocumented TV(CVBS) decoder
  • lib - Miscellaneous non hardware-related libraries

  • tools/mksunxi - A tool to add checksum to eGON.BT0 header. Taken from xboot project

Projects

All projects are targeted for Lichee Nano devboard with 800x480 LCD.

  • hello_led - Yet another LED blinking project
  • simple_loader - Very simple second-stage loader for booting bare metal apps from SPI flash
  • lcd_test - Example of display driver usage with simple graphics library
  • lvgl_demo - Demonstration project of LVGL library
  • tv_out_test - Test project for TVE driver
  • tv_in_test - Test project for TVD driver

Required tools

  • Visual Studio Code with Cortex-Debug plugin
  • arm-none-eabi-gcc

For debugging:

Building

Run make -C projects/<project_name>

Running

With U-Boot

  • Copy <project_name>.bin file to SD card
  • Run it with the following commands:
fatload mmc 0:1 80000000 <project_name>.bin
go 80000000

With simple_loader

  • Compile simple_loader project
  • Use mksunxi tool to fix eGON.BT0 header in simple_loader.bin
  • Flash simple_loader.bin to SPI flash at offset 0, using U-Boot or FEL mode
  • Compile your project with -DLOAD_HEADER option (enabled by default in all projects)
  • Flash your code to SPI flash at offset 0x10000

Via JTAG

This will work only if there is no bootable code in the SPI Flash chip.

Set your JTAG adapter config file path in the OPENOCD_ADAPTER option of makefile, run make -C projects/<project_name> load

Debugging

You can debug your code using Cortex-Debug plugin

  • Compile and write simple_loader to SPI flash, it will enable JTAG and perform DRAM initialization on start
  • Set your JTAG adapter type in .vscode/launch.json config file
  • Press F5 to start debug

f1c100s_projects's People

Contributors

nminaylov 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.