xuos-web/docs/doc/constructenv/goujian.md

3.8 KiB
Executable File
Raw Blame History

编译步骤

前言

本文档将介绍XiUOS分别在基于ARM和RISC-V架构的开发板上的编译、烧录和运行的过程。包括开发板选择及配置初始化、编译命令等信息。

开发板的选择及配置初始化

在执行编译之前,我们需要先确定XiUOS系统要运行在哪个开发板上,然后针对具体的开发板设置相关的配置信息。

  • 开发板的选择
    为了查看XiUOS支持的开发板种类,可以执行以下命令,也可以查看支持的开发板

    $ make BOARD=list
    
  • 配置初始化

    • 以stm32f407-st-discovery为例进行开始系统参数。

      $ make BOARD=stm32f407-st-discovery menuconfig
      
      对应的配置信息将存放在board/stm32f407-st-discovery/xsconfig.h头文件中文件中的选项均以XS_为前缀开头。
    • 以kd233为例进行开始系统参数。

      $ make BOARD=KD233 menuconfig
      
      对应的配置信息将存放在board/kd233/xsconfig.h头文件中文件中的选项均以XS_为前缀开头。

编译命令

通用编译命令, 默认为BOARD=KD233

$ make [BOARD=<所选开发板>]
  • 当 make 命令被执行时它会扫描当前目录下Makefile或makefile文件找到目标以及其依赖。如果这些依赖自身也是目标继续为这些依赖扫描Makefile 建立其依赖关系,然后编译它们。
  • 创建build目录目录下包含了各种目标文件、.bin、.elf等文件
    • 目标文件,以.o结尾的文件
    • .bin 二进制文件
    • .elf 可执行文件

烧录命令

  • 基于ARM开发板的烧录命令

    $ sudo st-flash write <生成的.elf文件> 0x8000000
    
  • 基于RISC-V开发板的烧录命令

    $ sudo kflash <生成的.elf文件> -t 
    

运行界面

  • XiUOS运行在ARM开发板
  • XiUOS运行在RISC-V开发板

FAQ

尝试借助gitee下载源码

  • Operation feedback: enable the users to clearly perceive their operations by style updates and interactive effects;
  • Visual feedback: reflect current state by updating or rearranging elements of the page.
  • Simplify the process: keep operating process simple and intuitive;
  • Definite and clear: enunciate your intentions clearly so that the users can quickly understand and make decisions;
  • Easy to identify: the interface should be straightforward, which helps the users to identify and frees them from memorizing and recalling.
  • Decision making: giving advices about operations is acceptable, but do not make decisions for the users;
  • Controlled consequences: users should be granted the freedom to operate, including canceling, aborting or terminating current operation.