book@book-desktop:~/work/xr806/xr806_sdk_v1.2.1/project/demo$ ll
总用量 32
drwxrwxr-x 8 book book 4096 4月 2 16:50 ./
drwxrwxr-x 10 book book 4096 4月 2 16:50 ../
drwxrwxr-x 3 book book 4096 4月 2 17:26 at_demo/
drwxrwxr-x 4 book book 4096 4月 2 17:23 audio_demo/
drwxrwxr-x 8 book book 4096 4月 2 16:50 bluetooth/
drwxrwxr-x 3 book book 4096 4月 2 17:22 hello_demo/
drwxrwxr-x 4 book book 4096 4月 2 16:50 wlan_ble_demo/
drwxrwxr-x 3 book book 4096 4月 2 16:50 wlan_demo/
(3)选择hello_demo cd hello_demo (4)进入gcc目录,进行编译 cd gcc make 结果,编译出错了,原因是我们没有安装交叉编译工具链。
...
/bin/sh: 1: /home/book/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/arm-none-eabi-gcc: not found
../../../../project/project.mk:437: recipe for target 'hello_demo.elf' failed
make[1]: *** [hello_demo.elf] Error 127
make[1]: 离开目录“/home/book/work/xr806/xr806_sdk_v1.2.1/project/demo/hello_demo/gcc”
../../../../project/project.mk:426: recipe for target '__all' failed
make: *** [__all] Error 2
4、安装交叉编译工具链 (1)解压工具链 cd ~/work/xr806/ tar -xvf gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2 (2)复制到项目例程指定的目录 根据上面的错误信息,我们可以知道交叉编译工具链,应该是存放在这个位置: /home/book/tools/gcc-arm-none-eabi-8-2019-q3-update/
cd ~ mkdir tools cd ~/work/xr806/ cp -r gcc-arm-none-eabi-8-2019-q3-update ~/tools/
5、回到例程目录,重新编译 cd ~/work/xr806/xr806_sdk_v1.2.1/project/demo/hello_demo/gcc/ make 编译结果,看起来像是成功了
root@mysheep:/var/lib/docker# vgdisplay
--- Volume group ---
VG Name ubuntu-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size <19.00 GiB
PE Size 4.00 MiB
Total PE 4863
Alloc PE / Size 1024 / 4.00 GiB
Free PE / Size 3839 / <15.00 GiB
VG UUID lhPVeA-sFX5-5sQ6-2mAq-VR41-uvjU-YrPzFI