小虎 · 2022年01月12日

【XR806开发板试用】使用硬件SPI驱动TFT液晶屏显示图片

【开发背景】

在完成开发板呼吸灯效果后(【XR806开发板试用】使用PWM模块模拟手机呼吸灯提示功能),考虑到显示界面过于单一,如果想要呈现更多的信息就很困难了,刚好之前买过一个TFT液晶屏,正在某个角落吃灰呢,于是将它翻了出来,看看能否跟XR806开发板配合起来使用,于是做了这个测试,先上显示效果

【效果展示】

借用一下极术小姐姐的头像,O(∩_∩)O哈哈~
显示效果2.jpg
显示效果.jpg

【接口信号】

1、接线图如下,涉及8根信号;比较幸运的是XR806上有5V/3.3V两组电压输出,液晶屏刚好需要5V供电,如果用3.3V供电则需要短路一个降压的芯片;CS为片选信号,直接全程拉低选中,也可以直接接地;RESET为屏的复位信号,RS为数据/指令选择控制信号(代表发给屏的是数据还是命令),MOSI就是我们SPI的数据发送接口了,SCK为时钟信号,LED是屏幕的背光,我这里直接接了3.3V,为常亮状态,如果需要开关背光,可以接到IO口上。因为只需要向屏幕发数据,所以此处并未接MISO信号。

XR806开发板TFT液晶屏
5V --->VCC
GND--->GND
A13--->CS
A12--->RESET
A11--->RS
B04--->MOSI
B07--->SCK
3V3--->LED

接线.jpg

【设计思路】

1、配置XR806芯片的SPI功能,调试通信ok,可以将MOSI和MISO两个信号接在一起,实现自发自收,此处参考了论坛的一篇文章;
2、完成自发自收后一直屏幕相关例程,将底层的SPI驱动函数替换成XR806中的驱动函数,这样就基本完成了主要代码的移植;
3、将极术小姐姐的头像下载后,用取模工具获取数据,然后将数据用数组形式放到代码中就好了;
ps:我使用的取模工具是Image2Lcd,网上能找到这款屏的资料,有兴趣的同学可以搜一下;

【关键代码】

1、IO口定义

#define CS_PIN      13
#define RST_PIN     12
#define RS_PIN      11
#define LED_PIN     19

#define    LCD_CS_SET      IoTGpioSetOutputVal(CS_PIN, 1)  
#define    LCD_RS_SET        IoTGpioSetOutputVal(RS_PIN, 1)  
#define    LCD_RST_SET        IoTGpioSetOutputVal(RST_PIN, 1) 
                            
#define    LCD_CS_CLR      IoTGpioSetOutputVal(CS_PIN, 0)    
#define    LCD_RS_CLR        IoTGpioSetOutputVal(RS_PIN, 0)    
#define    LCD_RST_CLR        IoTGpioSetOutputVal(RST_PIN, 0)  

2、硬件SPI初始化

SPI_Global_Config spi_param;

    spi_param.cs_level = DEMO_SPI_CS_LEVEL;
    spi_param.mclk = DEMO_SPI_MCLK;

    HAL_SPI_Init(DEMO_SPI_PORT, &spi_param);

    SPI_Config spi_Config;

    spi_Config.firstBit = SPI_TCTRL_FBS_MSB;
    spi_Config.mode = SPI_CTRL_MODE_MASTER;
    spi_Config.opMode = SPI_OPERATION_MODE_POLL;
    spi_Config.sclk = 24000000;
    spi_Config.sclkMode = SPI_SCLK_Mode0;

    printf("spi open...\n");
    ret = HAL_SPI_Open(DEMO_SPI_PORT, DEMO_SPI_CS, &spi_Config, 5000);
    if (ret != HAL_OK) {
        printf("spi open failed");
        return ret;
    }

    HAL_SPI_Config(DEMO_SPI_PORT, SPI_ATTRIBUTION_IO_MODE, SPI_IO_MODE_NORMAL);

3、IO口初始化

void LCD_GPIOInit(void)
{
    IoTGpioInit(RST_PIN);
    IoTGpioSetDir(RST_PIN, IOT_GPIO_DIR_OUT);

    IoTGpioInit(CS_PIN);
    IoTGpioSetDir(CS_PIN, IOT_GPIO_DIR_OUT);

    IoTGpioInit(RS_PIN);
    IoTGpioSetDir(RS_PIN, IOT_GPIO_DIR_OUT);

    IoTGpioInit(LED_PIN);
    IoTGpioSetDir(LED_PIN, IOT_GPIO_DIR_OUT);
}

4、LCD初始化与图片显示

LCD_Init1();     

    for(i = 0; i < 6; i++)
    {
        for(j = 0; j < 5; j++)
        {
            Gui_Drawbmp16(50*j, 50*i, gImage_jishu);
        }
    }  

5、底层SPI驱动替换

uint8_t SPI_WriteByte(uint8_t SPIx, uint8_t Byte)
{
    uint8_t tx_data = 0;
    uint8_t rx_data = 0;
    HAL_Status ret = HAL_OK;

    tx_data = Byte;

    ret = HAL_SPI_TransmitReceive(DEMO_SPI_PORT, &tx_data, &rx_data, 1);
    if (ret != HAL_OK) 
    {
        printf("spi write failed");
        return 0;
    }
    return rx_data;
} 

6、更多代码

另外还有很多移植的LCD的代码,此处就不贴了,可以到网盘下载
链接: https://pan.baidu.com/s/1rPyM... 提取码: bi63

【问题与改进】

1、大家可以看到显示的图片其实比较小,原因是如果取模数据量太大后会编译不过,我估计是代码空间超了,目前还没有比较好的解决方案;原本还有字符、汉字、画图等展示,都因为这个同样的原因加不进去;
2、至此已将XR806的IO功能、PWM功能、SPI功能基本用起来了,更重要的wifi和蓝牙功能还在熟悉中,这部分不太熟,希望在后面的测试中用起来;
3、报错内容从253之后开始的,前面都没有错误,详细内容如下,怀疑是跟空间有关,但还不确定,暂时也还没有想到解决办法;
报错内容:

[OHOS INFO] [252/254] STAMP obj/build/lite/gen_rootfs.stamp
[OHOS INFO] [253/254] ACTION //device/xradio/xr806:libSDK(//build/lite/toolchain:arm-none-eabi-gcc)
[OHOS ERROR] [253/254] ACTION //device/xradio/xr806:libSDK(//build/lite/toolchain:arm-none-eabi-gcc)
[OHOS ERROR] FAILED: obj/device/xradio/xr806/libSDK_build_ext_components.txt 
[OHOS ERROR] /usr/bin/python3 ../../../build/lite/build_ext_components.py --path=../../../device/xradio/xr806 --command=./build.sh\ /home/jackie/out/xr806/wifi_skylark --target_dir=/home/jackie/out/xr806/wifi_skylark/obj/device/xradio/xr806/build.log --out_dir=/home/jackie/out/xr806/wifi_skylark/error.log
[OHOS ERROR] make[1]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/project/demo/audio_demo/gcc'
[OHOS ERROR] cd ../../../..; make prj=demo/audio_demo include/generated/autoconf.h; cd -
[OHOS ERROR] make[2]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark'
[OHOS ERROR] make[3]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/tools/config'
[OHOS ERROR] make[3]: 'conf' is up to date.
[OHOS ERROR] make[3]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/tools/config'
[OHOS ERROR] /home/jackie/device/xradio/xr806/xr_skylark
[OHOS ERROR] #
[OHOS ERROR] # No change to .config
[OHOS ERROR] #
[OHOS ERROR]   NUPD    .config
[OHOS ERROR]   NUPD    include/generated/autoconf.h
[OHOS ERROR] make[2]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark'
[OHOS ERROR] /home/jackie/device/xradio/xr806/xr_skylark/project/demo/audio_demo/gcc
[OHOS ERROR] make  __build sdk_cfg_rdy=y
[OHOS ERROR] make[2]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/project/demo/audio_demo/gcc'
[OHOS ERROR] make  -C ../../../../src install
[OHOS ERROR] make[3]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src'
[OHOS ERROR] make _install TARGET=install
[OHOS ERROR] make[4]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src'
[OHOS ERROR] make  -C driver/chip install
[OHOS ERROR] make  -C libc install
[OHOS ERROR] make  -C image install
[OHOS ERROR] make  -C rom install
[OHOS ERROR] make  -C sys install
[OHOS ERROR] make  -C debug install
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/driver/chip'
[OHOS ERROR] make  -C pm install
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/libc'
[OHOS ERROR] make  -C driver/component install
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/image'
[OHOS ERROR] make  -C console install
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/rom'
[OHOS ERROR] make  -C efpg install
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/sys'
[OHOS ERROR] make  -C fs install
[OHOS ERROR] make  -C audio/pcm install
[OHOS ERROR] make  -C audio/manager install
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/driver/component'
[OHOS ERROR] make  -C net/ethernetif install
[OHOS ERROR] make  -C net/lwip-2.1.2 install
[OHOS ERROR] make  -C net/ping install
[OHOS ERROR] make  -C net/HTTPClient install
[OHOS ERROR] make  -C net/mbedtls-"2.16.8" install
[OHOS ERROR] make  -C net/nopoll install
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/efpg'
[OHOS ERROR] make  -C net/libwebsockets/lib install
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/audio/manager'
[OHOS ERROR] make  -C net/mqtt install
[OHOS ERROR] make  -C net/shttpd-1.42 install
[OHOS ERROR] make  -C net/sntp install
[OHOS ERROR] make  -C net/udhcp-0.9.8 install
[OHOS ERROR] make  -C net/cloud/aliyun install
[OHOS ERROR] make  -C smartlink install
[OHOS ERROR] make  -C wlan install
[OHOS ERROR] make  -C atcmd install
[OHOS ERROR] make  -C cjson install
[OHOS ERROR] make  -C util install
[OHOS ERROR] make  -C sdd install
[OHOS ERROR] cp -t ../../lib libimage.a
[OHOS ERROR] cp -t ../../lib librom.a
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/wlan'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/fs'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/console'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/ping'
[OHOS ERROR] cp -t ../../lib libxrc.a
[OHOS ERROR] cp -t ../../../lib libaudmgr.a
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/mqtt'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/audio/pcm'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/HTTPClient'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/libwebsockets/lib'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/nopoll'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/pm'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/lwip-2.1.2'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/rom'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/util'
[OHOS ERROR] cp -t ../../lib libefpg.a
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/udhcp-0.9.8'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/cloud/aliyun'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/debug'
[OHOS ERROR] cp -t ../../lib libxrsys.a
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/sntp'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/shttpd-1.42'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/libc'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/sys'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/smartlink'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/cjson'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/atcmd'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/ethernetif'
[OHOS ERROR] cp -t ../../lib libpm.a
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/audio/manager'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/mbedtls-2.16.8'
[OHOS ERROR] cp -t ../../../lib libpcm.a
[OHOS ERROR] cp -t ../../lib libfs.a
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/efpg'
[OHOS ERROR] cp -t ../../../lib libsntp.a
[OHOS ERROR] cp -t ../../lib libmbuf.a
[OHOS ERROR] cp -t ../../lib libdebug.a
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/image'
[OHOS ERROR] make[5]: Entering directory '/home/jackie/device/xradio/xr806/xr_skylark/src/sdd'
[OHOS ERROR] cp -t ../../lib libcjson.a
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/pm'
[OHOS ERROR] cp -t ../../../..//lib libaliyun.a
[OHOS ERROR] cp -t ../../../lib libmqtt.a
[OHOS ERROR] cp -t ../../lib libatcmd.a
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/audio/pcm'
[OHOS ERROR] cp -t ../../../lib libethernetif.a
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/sntp'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/cloud/aliyun'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/fs'
[OHOS ERROR] cp -t ../../lib libconsole.a
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/cjson'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/wlan'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/ethernetif'
[OHOS ERROR] cp -t ../../lib libsmartlink.a
[OHOS ERROR] cp -t ../../../lib libhttpcli.a
[OHOS ERROR] cp -t ../../lib libutil.a
[OHOS ERROR] cp -t ../../../lib libping.a
[OHOS ERROR] cp -t ../../../lib libnopoll.a
[OHOS ERROR] cp -t ../../lib libsdd.a
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/util'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/atcmd'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/debug'
[OHOS ERROR] cp -t ../../../lib libudhcpd.a
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/smartlink'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/ping'
[OHOS ERROR] cp -t ../../../lib libhttpd.a
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/mqtt'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/HTTPClient'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/shttpd-1.42'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/console'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/nopoll'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/udhcp-0.9.8'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/sdd'
[OHOS ERROR] cp -t ../../../lib libcomponent.a
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/driver/component'
[OHOS ERROR] cp -t ../../../lib libchip.a
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/driver/chip'
[OHOS ERROR] cp -t ../../../lib libmbedtls.a
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/mbedtls-2.16.8'
[OHOS ERROR] cp -t ../../../lib liblwip.a
[OHOS ERROR] cp -t ../../../../lib liblibwebsockets.a
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/lwip-2.1.2'
[OHOS ERROR] make[5]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src/net/libwebsockets/lib'
[OHOS ERROR] make[4]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src'
[OHOS ERROR] make[3]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/src'
[OHOS ERROR] ~/tools/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc -E -P -CC -DCONFIG_CHIP_ARCH_VER=3 -DCONFIG_ARCH_APP_CORE -DCONFIG_CPU_CM33F -DPRJ_XIP_SIZE=8M -DPRJ_BOOT_CERT="\"null\"" -DPRJ_IMAGE_BOOT_ATTR="\"0x1\"" -DPRJ_IMAGE_APP_SRAM_OFFS="\"0x00201000\"" -DPRJ_IMAGE_APP_EP="\"0x00201101\"" -DPRJ_IMAGE_BOOT_SRAM_OFFS="\"0x00230000\"" -DPRJ_IMAGE_BOOT_EP="\"0x00230101\"" -DPRJ_IMAGE_TZ_ATTR="\"0x25\"" -DPRJ_IMAGE_TZ_XIP_ATTR="\"0x26\"" -DPRJ_IMAGE_TZ_PSRAM_ATTR="\"0x25\"" -DPRJ_APP_BIN_CERT="\"null\"" -DPRJ_APP_XIP_BIN_CERT="\"null\"" -DPRJ_APP_PSRAM_BIN_CERT="\"null\"" -DPRJ_IMAGE_APP_ATTR="\"0x1\"" -DPRJ_IMAGE_APP_XIP_ATTR="\"0x2\"" -DPRJ_IMAGE_APP_PSRAM_ATTR="\"0x1\"" -DCONFIG_RAM_START=0x00201000 -DPRJ_RAM_SIZE=300K -DPRJ_PSRAM_START_OFFS="\"0x01400000\"" -DCONFIG_PSRAM_START=0x01400000 -DPRJ_PSRAM_SIZE=0K -DPRJ_IMAGE_BOOT_BIN="\"boot_"40"M.bin\"" -DPRJ_IMAGE_SYS_SDD_BIN="\"sys_sdd_"40"M.bin\""  -I../../../../include -I../../../../lib/xradio_v3 -include generated/autoconf.h -o .project.ld - < ../../../../project/linker_script/gcc/appos.ld && \
[OHOS ERROR] ~/tools/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc -mcpu=cortex-m33 -mtune=cortex-m33 -march=armv8-m.main+dsp -mfpu=fpv5-sp-d16 -mfloat-abi=softfp -mcmse -mthumb -Wl,--gc-sections --specs=nano.specs --specs=nosys.specs -Wl,-Map=audio_demo.map,--cref -u _printf_float -u _scanf_float -Wl,--wrap,main -Wl,--wrap,exit -Wl,--wrap,_malloc_r -Wl,--wrap,_realloc_r -Wl,--wrap,_free_r -Wl,--wrap,gettimeofday -Wl,--wrap,settimeofday -Wl,--wrap,time -Wl,--wrap,printf -Wl,--wrap,vprintf -Wl,--wrap,puts -Wl,--wrap,fprintf -Wl,--wrap,vfprintf -Wl,--wrap,fputs -Wl,--wrap,putchar -Wl,--wrap,putc -Wl,--wrap,fputc -Wl,--wrap,fflush -Wl,--wrap,memcpy -Wl,--wrap,memset -Wl,--wrap,memmove -T.project.ld -L../../../../lib -L../../../../lib/xradio_v3  -o audio_demo.elf ../../../../project/common/iperf/iperf.o ../../../../project/common/startup/gcc/retarget.o ../../../../project/common/startup/gcc/retarget_main.o ../../../../project/common/startup/gcc/retarget_stdout.o ../../../../project/common/startup/gcc/startup.o ../../../../project/common/framework/user_data.o ../../../../project/common/framework/fs_ctrl.o ../../../../project/common/framework/bt_ctrl.o ../../../../project/common/framework/sys_monitor.o ../../../../project/common/framework/psram.o ../../../../project/common/framework/audio_ctrl.o ../../../../project/common/framework/net_ctrl.o ../../../../project/common/framework/sc_assistant_port.o ../../../../project/common/framework/net_sys.o ../../../../project/common/framework/sysinfo.o ../../../../project/common/framework/platform_init.o ../../../../project/common/framework/sys_ctrl/event_queue.o ../../../../project/common/framework/sys_ctrl/container.o ../../../../project/common/framework/sys_ctrl/observer.o ../../../../project/common/framework/sys_ctrl/publisher.o ../../../../project/common/framework/sys_ctrl/looper.o ../../../../project/common/framework/sys_ctrl/sys_ctrl.o ../../../../project/common/apps/player_app.o ../../../../project/common/apps/recorder_app.o ../../../../project/common/apps/cedarx/capture_ctrl/captureControl_rtos.o ../../../../project/common/apps/cedarx/os_glue/cdx_fs.o ../../../../project/common/apps/cedarx/os_glue/cdx_memory.o ../../../../project/common/apps/cedarx/os_glue/sleep.o ../../../../project/common/apps/cedarx/os_glue/atomic.o ../../../../project/common/apps/cedarx/os_glue/pthread.o ../../../../project/common/apps/cedarx/sound_ctrl/soundControl_rtos.o ../../../../project/common/apps/cedarx/sound_ctrl/soundStreamControl.o ../../../../project/common/apps/cedarx/sound_ctrl/reverb_pcm.o ../../../../project/common/apps/cedarx/sound_ctrl/reverb_buffer.o ../../../../project/common/apps/cedarx/sound_ctrl/card_pcm.o ../../../../project/common/apps/buttons/matrix_buttons_low_level.o ../../../../project/common/apps/buttons/matrix_buttons.o ../../../../project/common/apps/buttons/buttons.o ../../../../project/common/apps/buttons/buttons_low_level.o ../../../../project/common/board/board.o ../../../../project/common/board/board_common.o ../../../../project/common/cmd/cmd_i2c.o ../../../../project/common/cmd/cmd_etf.o ../../../../project/common/cmd/cmd_keyboard.o ../../../../project/common/cmd/cmd_irtx.o ../../../../project/common/cmd/cmd_arp.o ../../../../project/common/cmd/cmd_thread.o ../../../../project/common/cmd/cmd_ping.o ../../../../project/common/cmd/cmd_flash.o ../../../../project/common/cmd/cmd_i2s.o ../../../../project/common/cmd/cmd_wlancmd.o ../../../../project/common/cmd/cmd_dhcpd.o ../../../../project/common/cmd/cmd_bench_mark.o ../../../../project/common/cmd/cmd_iperf.o ../../../../project/common/cmd/cmd_smartlink.o ../../../../project/common/cmd/cmd_clock.o ../../../../project/common/cmd/cmd_nopoll.o ../../../../project/common/cmd/cmd_voice_print.o ../../../../project/common/cmd/cmd_pwm.o ../../../../project/common/cmd/cmd_ble.o ../../../../project/common/cmd/cmd_wlan.o ../../../../project/common/cmd/cmd_uart.o ../../../../project/common/cmd/cmd_sysinfo.o ../../../../project/common/cmd/cmd_sntp.o ../../../../project/common/cmd/cmd_heap.o ../../../../project/common/cmd/cmd_rtc.o ../../../../project/common/cmd/cmd_httpc.o ../../../../project/common/cmd/cmd_echo.o ../../../../project/common/cmd/cmd_httpd.o ../../../../project/common/cmd/cmd_audio.o ../../../../project/common/cmd/cmd_ble_etf.o ../../../../project/common/cmd/cmd_sd.o ../../../../project/common/cmd/cmd_scr.o ../../../../project/common/cmd/cmd_oled.o ../../../../project/common/cmd/cmd_broadcast.o ../../../../project/common/cmd/cmd_smart_config.o ../../../../project/common/cmd/cmd_rf.o ../../../../project/common/cmd/cmd_lpuart.o ../../../../project/common/cmd/cmd_cedarx.o ../../../../project/common/cmd/cmd_gpio.o ../../../../project/common/cmd/cmd_console.o ../../../../project/common/cmd/cmd_json.o ../../../../project/common/cmd/cmd_flashc_crypto.o ../../../../project/common/cmd/cmd_ota.o ../../../../project/common/cmd/cmd_camera.o ../../../../project/common/cmd/cmd_timer.o ../../../../project/common/cmd/cmd_adv.o ../../../../project/common/cmd/cmd_mesh.o ../../../../project/common/cmd/cmd_lws.o ../../../../project/common/cmd/cmd_btsnoop.o ../../../../project/common/cmd/cmd_fs.o ../../../../project/common/cmd/cmd_mem.o ../../../../project/common/cmd/cmd_gatt.o ../../../../project/common/cmd/cmd_codec.o ../../../../project/common/cmd/cmd_pm.o ../../../../project/common/cmd/cmd_efpg.o ../../../../project/common/cmd/cmd_psram.o ../../../../project/common/cmd/cmd_rom.o ../../../../project/common/cmd/cmd_ifconfig.o ../../../../project/common/cmd/cmd_airkiss.o ../../../../project/common/cmd/cmd_trustzone.o ../../../../project/common/cmd/cmd_hexdump.o ../../../../project/common/cmd/cmd_irrx.o ../../../../project/common/cmd/cmd_psensor.o ../../../../project/common/cmd/cmd_blink.o ../../../../project/common/cmd/cmd_ce.o ../../../../project/common/cmd/cmd_cache.o ../../../../project/common/cmd/cmd_util.o ../../../../project/common/cmd/cmd_mqtt.o ../../../../project/common/cmd/cmd_lmac.o ../../../../project/common/cmd/cmd_settings.o ../../../../project/common/cmd/cmd_upgrade.o ../../../../project/common/cmd/cmd_adc.o ../../../../project/common/cmd/cmd_xz.o ../../../../project/common/cmd/cmd_auddbg.o ../../../../project/common/cmd/cmd_spi.o ../../../../project/common/cmd/cmd_wdg.o ../../../../project/common/cmd/fft/Cooley_Tukey_FFT_para.o ../../../../project/common/cmd/fft/Cooley_Tukey_FFT.o ../../../../project/common/cmd/tls/cmd_tls.o ../../../../project/common/cmd/tls/client.o ../../../../project/common/cmd/tls/tls.o ../../../../project/common/cmd/tls/server.o ../../../../project/common/cmd/tls/custom_certs.o ../../../../project/common/board/xr806_dig_ver/board_config.o -Wl,--whole-archive -lchip -lxrsys -lrom -Wl,--no-whole-archive  -lefpg -lwlan -lwpas -lhostapd -lwpa -lwpas -lhostapd -lwpa -lnet80211 -lxrwireless -lnet80211 -lxrwireless_phy -lcedarx -lmp3 -lamr -lamren -lwav -laac -lcedarx -lmqtt -lnopoll -llibwebsockets -lhttpd -lhttpcli -lmbedtls -lsntp -lping -ludhcpd -lsmartlink -lairkiss_aes -lsc_assistant -lethernetif -llwip -lmbuf -lcjson -lfs -lconsole -lcomponent -lreverb -laudmgr -lpcm -ladt -lutil -lsdd -lzbar -leq -ldrc -lopus -lpm -limage  -ldebug -lxrc -lstdc++ -lsupc++ -lm -lc -lgcc -lxrc -Wl,--whole-archive ../../../../lib/ohos/libapp_console.a ../../../../lib/ohos/libapp_spi_demo.a -Wl,--no-whole-archive -Wl,--start-group ../../../../lib/ohos/libcpup.a ../../../../lib/ohos/libbacktrace.a ../../../../lib/ohos/libhilog_lite.a ../../../../lib/ohos/libnative_file.a ../../../../lib/ohos/libhal_sysparam.a ../../../../lib/ohos/libhal_file_static.a ../../../../lib/ohos/libbroadcast.a ../../../../lib/ohos/libhichainsdk.a ../../../../lib/ohos/libwifiservice.a ../../../../lib/ohos/libcmsis.a ../../../../lib/ohos/libsec.a ../../../../lib/ohos/libtoken_static.a ../../../../lib/ohos/libexchook.a ../../../../lib/ohos/libarch.a ../../../../lib/ohos/libhilog_lite_command.a ../../../../lib/ohos/libdump_static.a ../../../../lib/ohos/libbootstrap.a ../../../../lib/ohos/libutils.a ../../../../lib/ohos/libkal.a ../../../../lib/ohos/libliteos_glue.a ../../../../lib/ohos/libhievent_lite.a ../../../../lib/ohos/libxr_wifi_adapter.a ../../../../lib/ohos/libkernel.a ../../../../lib/ohos/libhal_iothardware.a ../../../../lib/ohos/libsamgr_adapter.a ../../../../lib/ohos/libutils_kv_store.a ../../../../lib/ohos/libposix.a ../../../../lib/ohos/libhal_token_static.a ../../../../lib/ohos/libhiview_lite.a ../../../../lib/ohos/libsysparam.a ../../../../lib/ohos/libsamgr.a ../../../../lib/ohos/libohos_bt_gatt.a ../../../../lib/ohos/libsamgr_source.a -Wl,--end-group
[OHOS ERROR] ~/tools/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-objcopy -O binary -R .xip   audio_demo.elf audio_demo.bin
[OHOS ERROR] ~/tools/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-size audio_demo.elf
[OHOS ERROR]    text       data     bss     dec     hex filename
[OHOS ERROR] 1156600       8032   76268 1240900  12ef44 audio_demo.elf
[OHOS ERROR] ~/tools/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-objcopy -O binary -j .xip audio_demo.elf audio_demo_xip.bin
[OHOS ERROR] cp audio_demo_xip.bin ../image/"xr806"/app_xip.bin
[OHOS ERROR] cd ../image/"xr806" && \
[OHOS ERROR] chmod a+r *.bin && \
[OHOS ERROR] ~/tools/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc -E -P -CC -DCONFIG_CHIP_ARCH_VER=3 -DCONFIG_ARCH_APP_CORE -DCONFIG_CPU_CM33F -DPRJ_XIP_SIZE=8M -DPRJ_BOOT_CERT="\"null\"" -DPRJ_IMAGE_BOOT_ATTR="\"0x1\"" -DPRJ_IMAGE_APP_SRAM_OFFS="\"0x00201000\"" -DPRJ_IMAGE_APP_EP="\"0x00201101\"" -DPRJ_IMAGE_BOOT_SRAM_OFFS="\"0x00230000\"" -DPRJ_IMAGE_BOOT_EP="\"0x00230101\"" -DPRJ_IMAGE_TZ_ATTR="\"0x25\"" -DPRJ_IMAGE_TZ_XIP_ATTR="\"0x26\"" -DPRJ_IMAGE_TZ_PSRAM_ATTR="\"0x25\"" -DPRJ_APP_BIN_CERT="\"null\"" -DPRJ_APP_XIP_BIN_CERT="\"null\"" -DPRJ_APP_PSRAM_BIN_CERT="\"null\"" -DPRJ_IMAGE_APP_ATTR="\"0x1\"" -DPRJ_IMAGE_APP_XIP_ATTR="\"0x2\"" -DPRJ_IMAGE_APP_PSRAM_ATTR="\"0x1\"" -DCONFIG_RAM_START=0x00201000 -DPRJ_RAM_SIZE=300K -DPRJ_PSRAM_START_OFFS="\"0x01400000\"" -DCONFIG_PSRAM_START=0x01400000 -DPRJ_PSRAM_SIZE=0K -DPRJ_IMAGE_BOOT_BIN="\"boot_"40"M.bin\"" -DPRJ_IMAGE_SYS_SDD_BIN="\"sys_sdd_"40"M.bin\""  -I../../../../../include/generated -include autoconf.h -o .image.cfg - < image.cfg && \
[OHOS ERROR] true && \
[OHOS ERROR] chmod 777 ../../../../../tools/mkimage && ../../../../../tools/mkimage  -c .image.cfg -o xr_system.img
[OHOS ERROR] err: bin 1 and bin 2 were overlaped!
[OHOS ERROR] Overlapped size: 1024 Byte(1kB)
[OHOS ERROR] bin 1 name:app.bin    begin: 0x00008000    end: 0x00019000
[OHOS ERROR] bin 2 name:app_xip.bin    begin: 0x00018C00
[OHOS ERROR] 
[OHOS ERROR] We've rearranged bin files and generated new cfg file 'image_auto_cal.cfg', the new one is recommended.
[OHOS ERROR] Generate image file failed
[OHOS ERROR] cfg string:
[OHOS ERROR] /*
[OHOS ERROR]  *
[OHOS ERROR]  * Automatically generated file; DO NOT EDIT.
[OHOS ERROR]  * XR806 SDK Configuration
[OHOS ERROR]  *
[OHOS ERROR]  */
[OHOS ERROR] /*
[OHOS ERROR]  *
[OHOS ERROR]  * Automatically generated file; DO NOT EDIT.
[OHOS ERROR]  * XR806 SDK Configuration
[OHOS ERROR]  *
[OHOS ERROR]  */
[OHOS ERROR] {
[OHOS ERROR]     "magic" : "AWIH",
[OHOS ERROR]     "version" : "0.5",
[OHOS ERROR]     "image" : {"max_size": "1532K"},
[OHOS ERROR]     "section" :[
[OHOS ERROR]   {"id": "0xa5ff5a00", "bin" :"boot_40M.bin", "cert": "null", "flash_offs": "0K", "sram_offs": "0x00230000", "ep": "0x00230101", "attr":"0x1"},
[OHOS ERROR]   {"id": "0xa5fe5a01", "bin" :"app.bin", "cert": "null", "flash_offs": "32K", "sram_offs": "0x00201000", "ep": "0x00201101", "attr":"0x1"},
[OHOS ERROR]   {"id": "0xa5fd5a02", "bin" :"app_xip.bin", "cert": "null", "flash_offs": "99K", "sram_offs": "0xffffffff", "ep": "0xffffffff", "attr":"0x2"},
[OHOS ERROR]   {"id": "0xa5fa5a05", "bin" :"wlan_bl.bin", "cert": "null", "flash_offs": "1170K", "sram_offs": "0xffffffff", "ep": "0xffffffff", "attr":"0x1"},
[OHOS ERROR]   {"id": "0xa5f95a06", "bin" :"wlan_fw.bin", "cert": "null", "flash_offs": "1173K", "sram_offs": "0xffffffff", "ep": "0xffffffff", "attr":"0x1"},
[OHOS ERROR]   {"id": "0xa5f85a07", "bin" :"sys_sdd_40M.bin", "cert": "null", "flash_offs": "1198K", "sram_offs": "0xffffffff", "ep": "0xffffffff", "attr":"0x1"},
[OHOS ERROR]   {}
[OHOS ERROR]  ]
[OHOS ERROR] }
[OHOS ERROR] 
[OHOS ERROR] ../../../../project/project.mk:519: recipe for target 'image' failed
[OHOS ERROR] make[2]: *** [image] Error 255
[OHOS ERROR] make[2]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/project/demo/audio_demo/gcc'
[OHOS ERROR] ../../../../project/project.mk:493: recipe for target '__build' failed
[OHOS ERROR] make[1]: *** [__build] Error 2
[OHOS ERROR] make[1]: Leaving directory '/home/jackie/device/xradio/xr806/xr_skylark/project/demo/audio_demo/gcc'
[OHOS ERROR] Makefile:164: recipe for target 'build' failed
[OHOS ERROR] make: *** [build] Error 2
[OHOS ERROR] you can check build log in /home/jackie/out/xr806/wifi_skylark/build.log
[OHOS ERROR] command: "/home/jackie/prebuilts/build-tools/linux-x86/bin/ninja -w dupbuild=warn -C /home/jackie/out/xr806/wifi_skylark" failed
[OHOS ERROR] return code: 1
[OHOS ERROR] execution path: /home/jackie
root@USER-20200124ZG:/home/jackie# 
推荐阅读
关注数
13823
内容数
139
全志XR806开发板相关的知识介绍以及应用专栏。
目录
极术微信服务号
关注极术微信号
实时接收点赞提醒和评论通知
安谋科技学堂公众号
关注安谋科技学堂
实时获取安谋科技及 Arm 教学资源
安谋科技招聘公众号
关注安谋科技招聘
实时获取安谋科技中国职位信息