NuMaker-HMI-N9H30 固件下载(Linux)

前面 介绍了在 Windows 系统中使用 NuWriter 图形界面工具为 NuMaker-HMI-N9H30 开发板烧写固件程序的方法。对于 Linux 用户,虽然无法在 Linux 系统中运行 NuWriter 图形工具,不过我们可以使用命令行工具完成固件程序的下载。本文将以 Ubuntu 20.04 系统为例,演示如何安装 NUC970_NuWriter_CMD 命令行工具,并完成程序烧写。



sudo apt install libusb-1.0-0-dev
sudo apt install autoconf automake automake-1.15

下载编译 下载源代码,例如使用 git 克隆仓库。

git clone

切换到 NUC970_NuWriter_CMD 目录

cd NUC970_NuWriter_CMD


./configure --prefix=$PWD/install

如果 make 失败,出现如下错误提示:

$ make
 cd . && /bin/bash /home/rudy/workspace/NUC970_NuWriter_CMD/missing automake-1.15 --foreign error: version mismatch.  This is Automake 1.15.1, but the definition used by this AM_INIT_AUTOMAKE comes from Automake 1.15.  You should recreate aclocal.m4 with aclocal and run automake again.
WARNING: 'automake-1.15' is probably too old.
         You should only need it if you modified '' or
         '' or m4 files included by ''.
         The 'automake' program is part of the GNU Automake package:
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
make: *** [] 错误 1

那么需要执行下面命令,在重新 make 编译。

$ aclocal
$ autoreconf --force


编译完成后,执行下面命令将 nuwriter 安装到前面配置的指定目录

make install

添加 udev rule

sudo install -Dm644 99-nuvoton_isp.rules /etc/udev/rules.d/99-nuvoton_isp.rules

这样,nuwriter 命令行工具就安装成功了!可执行文件位于 install/bin/ 目录中。


执行 nuwriter -h 命令,查看 nuwriter 工具的选项参数,如下所示。

==   Nuvoton NuWriter Command Tool V1.0   ==
NuWriter [Options] [File/Value]

-d [File]      Set DDR initial file
-d show        Print supported DDR model

-m sdram       Set SDRAM Mode
-m emmc        Set eMMC Mode
-m nand        Set NAND Mode
-m spi         Set SPI Mode

-t data        Set DATA Type
-t env         Set Environemnt Type
-t uboot       Set uBoot Type
-t pack        Set PACK Type
SDRAM parameters:
-a [value]     Set execute address
-w [File]      Write image file to SDRAM
-i [value]     device tree address
-n             Download & Run

NAND/SPI/eMMC parameters:
-a [value]     Set start offset/execute address
               if erase, unit of block
-w [File]      Write image file to NAND
-r [File]      Read image file from NAND
-e [value]     Read/Erase length(unit of block)
-e 0xFFFFFFFF  Chip erase
-v             Verify image file after Write image 



SDRAM 下载方式

$ ./install/bin/nuwriter -m sdram -d N9H30F61IEC.ini -a 0x0 -w rtthread.bin -n

SPI Flash 下载方式

$ ./install/bin/nuwriter -m spi -d N9H30F61IEC.ini -t uboot -a 0x0 -w rtthread.bin -v