MDK972-EK开发板裸调试设置和裸机程序烧写(转)
硬件平台:MDK972-EK开发板
编译调试软件:KEIL uVision4
仿真工具:JLINK V7/V8
本例子从串口输出信息,如图:


KEIL uVision4调试设置如图所示:



开发板启动方式设置:
1、需要禁用硬件看门狗和使能JTAG引脚功能,如图所示:
2、可以将开发板设置于USB启动方式,或设置为其他启动方式,然后烧写U-Boot,使开发板停在U-Boot命令行对开发板进行仿真。
上面的仿真采用的是U-Boot命令行方式,若开发板烧写有Linux系统,则在开发板启动时从串口输入任意值,就可以使开发板停在U-Boot命令行下。
>PA[0:9] (= Cfg[0:9])
>设定的脚位需用 10KΩ 下拉到地
>关于Linux或U-Boot的烧写,请参考NUC970 NuWriter 使用手冊
1、需要禁用硬件看门狗和使能JTAG引脚功能,如图所示:

2、可以将开发板设置于USB启动方式,或设置为其他启动方式,然后烧写U-Boot,使开发板停在U-Boot命令行对开发板进行仿真。

上面的仿真采用的是U-Boot命令行方式,若开发板烧写有Linux系统,则在开发板启动时从串口输入任意值,就可以使开发板停在U-Boot命令行下。
>PA[0:9] (= Cfg[0:9])
>设定的脚位需用 10KΩ 下拉到地
>关于Linux或U-Boot的烧写,请参考NUC970 NuWriter 使用手冊
裸机程序固化:
首先将开发板设置为USB启动方式:
然后用Jlink仿真器连接开发板和电脑,同时连接开发板USB Device接口到电脑,然后将开发板上电,接着长按POWER_ON按键,最后开发板将被电脑识别(USB驱动为Tools文件夹下的WinUSB4NuVCOM_NUC970,双击安装即可)为如下设备:
然后打开Tools\NuWriter\bin文件夹下的NuWriter工具,出现如下界面,选择NUC972DF62Y:
连接成功后,界面如下图所示:

首先将开发板设置为USB启动方式:

然后用Jlink仿真器连接开发板和电脑,同时连接开发板USB Device接口到电脑,然后将开发板上电,接着长按POWER_ON按键,最后开发板将被电脑识别(USB驱动为Tools文件夹下的WinUSB4NuVCOM_NUC970,双击安装即可)为如下设备:

然后打开Tools\NuWriter\bin文件夹下的NuWriter工具,出现如下界面,选择NUC972DF62Y:

连接成功后,界面如下图所示:

NuWriter工具连接开发板成功后,选择烧写的方式(SPI或NAND),这里选择NAND方式,如果nandflash里有程序,则需要先将其擦除,如下图所示:
接着烧写裸机程序,Image Name选择裸机程序编译生成的.bin文件,Image Type选择uBoot,Image execute address设置为0x0,然后点击Burn进行烧写,如图所示:
确认操作:
烧写成功:
然后退出NuWriter工具:

接着烧写裸机程序,Image Name选择裸机程序编译生成的.bin文件,Image Type选择uBoot,Image execute address设置为0x0,然后点击Burn进行烧写,如图所示:

确认操作:

烧写成功:

然后退出NuWriter工具:

然后将开发板设置为NAND启动方式,然后复位开发板,烧写的程序开始运行:


