๐Ÿš— Air101 / Air103#

Usually you donโ€™t need this document, this is a high-level document for self-expanding firmware.

The firmware package we provide contains the compiled firmware (soc suffix๏ผ‰

If you just want to add your existing libraries to the firmware, you can use our Online Cloud Compilation to generate custom firmware.

If you are looking for application-oriented documents such as machine brushing/compiling lua scripts, then this document is not what you need to check.

Video tutorial link: Station B drinks porridge every day

Prepare the environment#

Windows Platform Users#

Install 7-zip, it is recommended to keep the default folder๏ผ๏ผ๏ผ

Install xmake and restart the computer after installation๏ผ๏ผ๏ผ

Linux Platform Users#

**Install 7-zip with xmake!!! **, each platform has different loading methods (apt/yum/pacman), search for it yourself

Prepare the project#

Clone the LuatOS main warehouse to the appropriate location, recommend use git, if you download zip, you must decompress and change the folder name.!!!

If you are not familiar with git, strongly establish Getting Started

git clone https://gitee.com/openLuat/LuatOS.git

Then clone the Air101 project to the same directory as the LuatOS main repository.

git clone https://gitee.com/openLuat/luatos-soc-air101.git

It must be placed according to the following directory structure, taking D:\gitee as an example

LuatOS Main library code D:\gitee\LuatOS
Air101 Adaptation code D:\gitee\luatos-soc-air101

Checkpoint, if the path is correct, the following file path must exist. If it cannot be found, it must be a naming problem. It is futile to add it manually. 

D:\gitee\LuatOS\lua\src\lgc.c
D:\gitee\luatos-soc-air101\app\include\luat_conf_bsp.h

Any additional characters are not available, e.g. LuatOS-master is the wrong name

If it is Air103#

Open app/port/luat_conf_bsp.h , change#define AIR101 to #define AIR103, and save

Libraries in Custom Firmware#

Open app/port/luat_conf_bsp.h to comment or uncomment as needed. Note that if the firmware does not fit, the compilation will fail.

luat_conf_bsp.hIt is configured according to the space of Air101. After changing to Air103, it will definitely not fit. You need to comment out some parts, such as u8g2/LCD/lvgl

Otherwise it will be reported

I-SRAM' overflowed by  XXXX

Compile#

Enter the 101 warehouse directory, executive xmake, and start compiling. The generated file will be in the build/out/directory with.soc as the suffix

Compile Error Resolution#

Not enough space, performance is as follows ,

More convenient method-xmake plugin#

The above compilation method has run through and can be compiled normally before looking here.๏ผ๏ผ๏ผ

Install the xmake plugin in vscode

vscode_xmake

vscode Open the luatos-soc-air101 in directly click build below to compile

xmake_build