Skip to content

GX8005/6 Development Environment Setup*

The GX8005/6 chip SDK needs to be compiled in a Linux environment. This article mainly introduces how to set up the SDK development and compilation environment.

Note

For Windows developers, you can use VirtualBox virtual machine software to install Ubuntu, then read the following content to install the required compilation tools, and you can also carry out SDK development.

1. SDK Toolchain Installation*

  • Click the link http://yun.nationalchip.com:10000/l/3FjmDz to download it to the local ~/Downloads/ directory.
  • Extract Xuantie-900-gcc-elf-newlib-x86_64-V2.10.2-20240904.tar.gz to /opt
    sudo tar zxvf Xuantie-900-gcc-elf-newlib-x86_64-V2.10.2-20240904.tar.gz -C /opt/
    
  • Then edit ~/.profile or ~/.bashrc, and add /opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.10.2/bin to the PATH variable
    gedit $HOME/.bashrc
    Add at the end
    export PATH=$PATH:/opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.10.2/bin
    Save and exit
    
  • Close the terminal and reopen it, so that ~/.profile or ~/.bashrc will take effect.

2. Obtaining the SDK Package*

  • Two project packages need to be pulled: ovp_aiot and viva. They are both hosted on the GtiLab private repository. Please read Register GitLab Account and provide your GitLab account to our sales manager, who will have our project manager release the code for that account.

3. Creating the First Demo*

3.1. Compilation*

cp configs/example/opus_play/8005_internal_pa_play.config .config
make defconfig
make

Note

make menuconfig / make defconfig may sometimes encounter this error Linux Error: ncurses.h: No such file or directory. This is due to missing dependent libraries. The Ubuntu solution is: sudo apt-get install libncurses5-dev.

3.2. Firmware Flashing*

cd tools/bootx/
./flash_nor.sh 1 -r 1000000 # The number 1 indicates the serial port number, and the number after -r is the baud rate

3.3. Running*

  • Open your serial terminal, then restart the development board. The following output will appear:
    [OVP]Offline Voice Preprocess
    [OVP]Copyright (C) 2001-2024 NationalChip Co., Ltd
    [OVP]ALL RIGHTS RESERVED!
    [OVP]Board Model: [fornax_module_1v]
    [OVP]Git Version: [39927a2]
    [OVP]Release Ver: [0x42555858]
    [OVP]Build Date : [2025-01-03, 14:19:07]
    [OVP]PLL   Freq:  [393216000 Hz]
    [OVP]CPU   Freq:  [196608000 Hz]
    [OVP]Uart0 Freq:  [16384000 Hz]
    [OVP]Uart1 Freq:  [16384000 Hz]
    [OVP]XIP   Freq:  [196608000 Hz]
    [OVP]Timer Freq:  [6144000 Hz]
    [OVP]Sample Delay:[2]
    [OVP]Chip Name:   [GX8005A-ANNA]
    [OVP_BUFF] The Stack Scope:[0x20000bfc - 0x20000000], Stack Size:2ff
    [OVP_BUFF][Heap]total: 97724
    [OVP_BUFF][Heap]total:97700, use:0, max_used:0
    [Olab_Panda] [vpa_init]
    
    
    ... 此处省略一亿行
    
    ctx:1300
    [VPA_CTC][CTC] Activation B[0],Kws:小艾小艾[100],th:837,S:849[837], ctx:1307
    [ST] B:0,Kws:小艾小艾[100],th:837,S:849,D:12
    [ST] Activation! B[0],Kws:[小艾小艾,837],KV:100,S:849,ctx:1307
    [OFFLINE_ASR_APP]event_id: 100
    [OFFLINE_ASR_APP]awaken!!!
    [PLAYER]player use:12860 [13K]
    play finish
    ctx:1400