Compatibility checklist and usage
Compatibility checklist
- Luckfox Pico / Luckfox Pico Plus
- Luckfox Pico Plus
Usage Guide
Example Programs
Please click the link below to access the example program directory and download the corresponding sample program. The compressed package includes device tree files, image files, and sample programs for adaptation. You can download and use them directly or follow the steps below to configure them yourself.
Version Description Download Example Program Includes device tree files, image files, and programs Google Cloud Link Modify Device Tree
You can choose to directly replace the device tree files from the compressed package or configure them according to your needs. The paths to the device tree files are as follows:
- For Luckfox Pico:
<SDK directory>/sysdrv/source/kernel/arch/arm/boot/dts/rv1103g-luckfox-pico.dts
- For Luckfox Pico Plus:
<SDK directory>/sysdrv/source/kernel/arch/arm/boot/dts/rv1103g-luckfox-pico-plus.dts
- For Luckfox Pico:
Compile the Kernel
After modifying the device tree file, you need to recompile the kernel to generate the image files required for burning.
Choose the branch to compile and specify either LuckFox Pico or LuckFox Pico Plus:
# Choose Luckfox Pico, input 0
# Choose Luckfox Pico Plus, input 1
luckfox@luckfox:~/Luckfox-Pico/luckfox-pico$ ./build.sh lunchRecompile the kernel:
luckfox@luckfox:~/Luckfox-Pico/luckfox-pico$ ./build.sh kernel
Burn Firmware
After successfully compiling the kernel, the generated files can be found in the <SDK directory>output/image directory. Replace the identically named files in the original firmware with the boot.image file and env.txt file generated after recompilation.
- For Luckfox Pico: Create an SD card using the RkFlashTool.
- For Luckfox Pico Plus: In the RkFlashTool, select DownloadBin, env, and boot, then click Download.
Cross-Compilation
Specify the Cross-Compiler
Users need to move the entire "c" folder to the virtual machine and edit the Makefile in the "c" folder. Modify the content after CC= in the Makefile to specify the cross-compiler tool.
gcc Path: <SDK Directory>/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-gcc
g++ Path: <SDK Directory>/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-g++
Compile the Program
After editing the Makefile, use the make command to cross-compile the program.
luckfox@luckfox:~/c$ make
After successful cross-compilation, an executable file named "main" will be generated in the current directory.
luckfox@luckfox:~/c$ ls
bin examples lib main Makefile pic readme_CN.txt readme_EN.txt
File Transfer
First, transfer the entire "c" folder from the virtual machine to Windows. Then, use TFTP or ADB to transfer the files to the development board. Below are the steps for transferring files from Windows to the development board using ADB:
adb push [Path to the file on the host] [Storage path on the development board]
eg:(Transfer the 'c' folder from the current directory to the root directory of the development board)
adb push c /Run the Program
After modifying the permissions of the "main" file, run the program.