about XR871 sdk code - XradioTech/XR871-OLD GitHub Wiki


Content


XR871 SDK Code Structure

  • bin - the directory in which pre-build binary files are stored
    用于启动和wlan功能的二进制文件
  • include - the directory in which SDK header files are stored
    头文件目录
  • lib - the directory in which the pre-build libraries are stored
    预编译的库文件存放路径,或者make lib编译出的库文件存放路径
  • project - the directory in which the demo projects and the public modules are stored
    存放一些示例工程,以及一些公共模块代码
  • src - the directory in which the source code of the base module are stored
    存放一些基础模块的源代码
  • tools - the directory in which some tools are stored
    存放一些常用工具,如打包工具,刷机工具

XR871 SDK GCC Configuration

GCC Configuration File(03_SDK/xr871sdk/gcc.mk) defines the toolchain path and the compile and link flags for XR871 platform. You have to configure the value of 'CC_DIR' to your GCC install path, otherwise you will get an error result like "arm-none-eabi-gcc: Command not found" when you execute the command "make lib" or "make".
gcc.mk文件是gcc的配置文件,其中定义了工具链路径以及在XR871平台上编译和连接的参数,您需要在编译之前配置CC_DIR到你自己的gcc安装路径,否则在执行make的时候将会受到类似“arm-none-eabi-gcc: Command not found”的错误信息。

  1 #
  2 # Common rules for GCC Makefile
  3 #
  4
  5 # ----------------------------------------------------------------------------
  6 # cross compiler
  7 # ----------------------------------------------------------------------------
  8 CC_DIR := ~/tools/gcc-arm-none-eabi-4_9-2015q2/bin
  9 CC_PREFIX := $(CC_DIR)/arm-none-eabi-
 10
 11 AS      := $(CC_PREFIX)as
 12 CC      := $(CC_PREFIX)gcc
 13 CPP     := $(CC_PREFIX)g++
 14 LD      := $(CC_PREFIX)ld
 15 AR      := $(CC_PREFIX)ar
 16 OBJCOPY := $(CC_PREFIX)objcopy
 17 OBJDUMP := $(CC_PREFIX)objdump
 18 SIZE    := $(CC_PREFIX)size
 19 STRIP   := $(CC_PREFIX)strip