Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    XR806开发板FreeRTOS SDK试用

    XR系列-无线互联
    1
    1
    311
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Randolph
      Randolph LV 6 last edited by Randolph

      1、根据文档下载SDK

      git clone ssh://YOURNAME@sdk.allwinnertech.com/git_repo/XR806/xr806_sdk/xr806_sdk.git -b xr806_sdk
      

      YOURNAME是自己在客户平台的用户名,我这里的环境是官方给的Ubuntu14,之前编译D1的tinaLinux用的。

      拉代码之前务必确认正确添加了本机公钥。

      2、配置

      可以看看目录结构:

      allwinner@allwinner-VirtualBox:~/xr806_sdk$ tree -L 1
      .
      ├── bin
      ├── ChangeLog.md
      ├── chip.mk
      ├── config.mk
      ├── gcc.mk
      ├── include
      ├── Kconfig
      ├── lib
      ├── Makefile
      ├── project
      ├── README.md
      ├── src
      └── tools
      
      6 directories, 7 files
      
      

      打开README.md查看:

      # XR806 SDK
      
      XR806 SDK supports XR806 series wireless MCUs.
      
      
      ## Configuration
      
      - Edit "gcc.mk" to define GCC path to your own path, eg.
      ```
        CC_DIR = ~/tools/gcc-arm-none-eabi-8-2019-q3-update/bin
      ```
      
      
      ## Building
      
      - Building commands
      ```
        $                        # make sure in SDK top dir
        $ make PRJ=${prj} defconfig or  cp ${prj_defconfig} .config
                                 # eg. make PRJ=demo/wlan_demo defconfig or copy project/demo/wlan_demo/gcc/defconfig .config
        $ make menuconfig        # check configuration, like board/XTAL/XIP/CacheSize/...
        $ make lib               # build libraries and copy them to "lib"
        $ make lib_clean         # remove files in "src" generated by `make lib`
        $ make lib_install_clean # Remove libraries in "lib" generated by `make lib`
        $ make                   # build the executable binary
        $ make clean             # remove files generated by `make`
        $ make image             # create the image file
        $ make image_clean       # remove files generated by `make image`
        $ make objdump           # generate the disassembled file
        $ make build             # same as `make lib && make && make image`
        $ make build_clean       # same as `make image_clean clean lib_clean lib_install_clean`
      ```
      
      
      ## Links
      
      - SDK: https://github.com/XradioTech/xr806-sdk.git
      - WiKi: https://github.com/XradioTech/xradiotech-wiki.git
      - DOC: https://docs.xradiotech.com
      

      根据提示需要先指定编译器的位置

      下载一下相应的编译器并解压:
      gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2

      tar -jxvf gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2
      

      然后修改gcc.mk中指向的目录即可,如下:

      CC_DIR := ~/gcc-arm-none-eabi-8-2019-q3-update/bin
      

      后面详细列出了make方式,注意要在SDK最顶层下执行。

      3、编译DEMO

      首先需要执行一下:

      make menuconfig
      

      然后保存退出即可。

      然后执行:

      make PRJ=demo/hello_demo
      

      可以看到结果:

         text	   data	    bss	    dec	    hex	filename
        39752	   1576	   2248	  43576	   aa38	hello_demo.elf
      make[2]: Leaving directory `/home/allwinner/xr806_sdk/project/demo/hello_demo/gcc'
      make[1]: Leaving directory `/home/allwinner/xr806_sdk/project/demo/hello_demo/gcc'
      /home/allwinner/xr806_sdk
      

      4、制作镜像

      进入上一步的demo目录下:

      cd project/demo/hello_demo/gcc/
      

      执行

      make image
      

      可以看到:

      Flash Layout:
      sec bin 0 boot_40M.bin      :	flash_offs: 0x00000000(   0K)	data_size: 0x00002F28(  12K)
      sec bin 1 app.bin           :	flash_offs: 0x00004000(  16K)	data_size: 0x00004920(  19K)
      sec bin 2 app_xip.bin       :	flash_offs: 0x00029800( 166K)	data_size: 0x000058D0(  23K)
      
      generate image: xr_system.img
      cp -t ../../../../out/ ../image/"xr806"/*.bin ../image/"xr806"/xr_system.img *.map
      

      回到SDK根目录下可以看到out文件夹,进入后可见输出文件:

      allwinner@allwinner-VirtualBox:~/xr806_sdk/out$ ls
      app.bin  app_xip.bin  boot_40M.bin  hello_demo.map  sys_sdd_40M.bin  wlan_bl.bin  wlan_fw.bin  xr_system.img
      

      5、烧录

      在SDK的tools文件夹下可见有烧录工具:

      allwinner@allwinner-VirtualBox:~/xr806_sdk/tools$ ls
      Blink.apk       fs_img_tools         mkimage.exe        phoenixMC.dll    settings.ini      SoundConfig.apk
      config          HcidumpXr.7z         mkimage_mac64      phoenixMC.exe    settings_mac.ini
      efuse_tool      map_parse_gcc_v3.py  phoenixMC          phoenixMC_mac64  signpack.sh
      etfGuiTool.exe  mkimage              phoenixMC_cli.exe  sdd_editor       SmartConfig.apk
      

      由于想偷懒,没在虚拟机下烧录,直接把img和工具都拖到Windows下:

      e95796a2-382c-434f-bfe6-781e23251b67-image.png

      完成烧录:
      762a337c-a127-4e80-9dc5-3ad9a2cd243d-image.png

      6、查看输出

      我是用的是putty,波特率115200
      813e99aa-3b1a-4a47-b162-9a0505fc1dfc-image.png

      熟悉的helloworld:

      744de9be-71da-40d8-bc62-cbad76f2f404-image.png

      1 Reply Last reply Reply Quote Share 0
      • 1 / 1
      • First post
        Last post

      Copyright © 2022 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

      行为准则 | 用户协议 | 隐私权政策