riscv-mcu / nuclei_sesprojects

Nuclei RISC-V Simple Segger Embedded Studio Projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nuclei SES Projects 使用说明

下载SEGGER Embedded Studio for RISC-V

打开SEGGER官网Embedded Studio下载页面,下载SEGGER Embedded Studio for RISC-V(以下简称SES)并安装到本地,要求版本不低于5.50

克隆仓库到本地

打开windows command控制台,输入git clone git@repo\link 下载仓库到本地。

注意:根据实际仓库SSH或HTTPS修改git@repo\link内容。

在SES中打开Nuclei SES Projects

下载后双击NucleiExamples.emProject文件即可启动SES并打开Nuclei SES Projects。

If you want to add extra compiler options to this project, you can configure the project configuration.

  1. Select Code->Compiler->Additional C/C++ Compiler Options, and append your options
  2. Take care: each option need one newline without space

通过J-LINK连接开发板

目前本工程仅支持使用J-LINK下载调试,由于J-LINK使用20pin接口,需要准备杜邦线,以便跳线连接。

J-LINK与JTAG各接口对应关系如下图:

image-20210604182718502

其中VTref需要单独接到开发板上3.3V的接口。

TDI 接到JTAG的TDI接口。

TMS接到JTAG的TMS接口。

TCK接到JTAG的TCK接口。

TDO接到JTAG的TDO接口。

GND接到JTAG的GND接口。

参考连接实物图如下:

image-20210604183439857

下载运行调试

SES中打开Nuclei SES Projects如下:

image-20210604183730907

选择菜单栏Build -> Build coremark编译工程,连接好J-LINK,打开开发板电源,点击菜单栏Debug -> Go开始下载调试。调试界面如下:

image-20210604184203682

有关调试的详细功能介绍,请参考SES内菜单栏Help -> Contents

切换使用不同打印方式

在头文件nuclei_demosoc.h中可以通过修改DEBUG_SEMIHOST的值来选择使用哪种打印方式。如果使用Terminal I/O打印输出,此处应设置为1 。如果使用uart串口打印输出,需要设置为0,并且需要准备串口转usb工具连接uart输出到pc主机上。此外需右击当前工程,选择Options打开设置页面,左侧目录栏选择Library,右侧修改Runtime LibraryEmbedded Studio。参考设置如下图:

image-20210604185142208

About

Nuclei RISC-V Simple Segger Embedded Studio Projects


Languages

Language:C 82.1%Language:Assembly 17.9%