1651 views|6 replies

501

Posts

4

Resources
The OP
 

[Domestic FPGA Anlu high-integration low-power SF1 series FPSoC new product] RISC-V development environment construction nanny-level tutorial [Copy link]

 
This post was last edited by qinyunti on 2023-2-27 00:01

UsbDriverTool-2.1.exe (9.39 MB, downloads: 7)

Preface

The RISC-V hard core is integrated inside the chip. From now on, we will start the RISC-V development journey.

The official documentation is not very detailed and not very friendly to novices, so this article records the process as detailed as possible.

process

Prepare

TN810_SF102 Development Board Application Example User Guide.zip

Unzip and put it in a non-Chinese path. Mine is TN810_SF102.

Bit file burning

Connect the FPGA to JTAG

Open

TN810_SF102\src\mcu_ahb_to_fpga\td_project\mcu_ahb_to_fpga.al

Note: The following screenshots are from the oled_screen_display project. The operations are the same, so you won’t need to take new screenshots.

Download bit file

Mode selection download to FLASH

Speed selection 90k

Modify MCU JTAG driver

Double-click UsbDriverTool-2.1.exe

Double-click UsbDriverTool/UsbDriverTool.exe

Click Yes in the User Account Control dialog box that pops up.

Right click on the following device to install Install Libusb – WinUSB

Preparing FD IDE

Unzip FutureDynasty-Win-2022.12.13 under SF1S60CG121I_SF102\Software\2022-12-05 to a non-Chinese path.

Double-click FutureDynasty\FutureDynasty.exe to open it.

Create a C project via File->New Project->C/C++->C Project

Click the icon in the upper left corner as shown below to enter the project view

Menu bar Project->Build All

Import SDK project

Connect the MCU JTAG line

File->Open Projects from File System

Select TN810_SF102\src\mcu_ahb_to_fpga\sdk_project\bmp_image_display

Set toolchain path

Windows->Preferences

Add PATH variable D:\BOARD\SF1-FPSoC\FutureDynasty-Win-2022.12.13\FutureDynasty\toolchain\gcc\riscv\sf1\bin

Compile

Project->Build All

Download and run

Click the triangle below and select Run Configurations...

Modify the paths of gdb and openocd respectively

${eclipse_home}toolchain\openocd\sf1\openocd\bin\openocd.exe

${eclipse_home}toolchain\gcc\riscv\sf1\bin\riscv-nuclei-elf-gdb.exe

Application run

Download Success

Serial Terminal

Print as follows

simulation

Disconnect gdb first

Click on the Beetle icon

See that it stops at the main function

Double-click the breakpoint to run to the breakpoint

Windows->Show View can open the corresponding interface

For example, look at the assembly code

View core registers

refer to

TN810_SF102 Development Board Application Example User Guide.zip

Summarize

The official documentation is rather sketchy, and many of the introductions are not very coherent and detailed, nor are they systematic. There is no friendly introductory documentation, and it is not very friendly to novices. This needs to be improved.

Therefore, this article records as much as possible for reference by novices.

This post is from Domestic Chip Exchange

Latest reply

Yes, it seems that many domestic manufacturers now use the eclipse+GCC+Openocd model.   Details Published on 2023-2-27 16:12
 
 

9720

Posts

24

Resources
2
 

Very detailed


This post is from Domestic Chip Exchange
 
 
 

6593

Posts

0

Resources
3
 

The RISC-V development environment I have seen is indeed a nanny-level tutorial.

This post is from Domestic Chip Exchange
 
 
 

2w

Posts

74

Resources
4
 

Like it :)

This post is from Domestic Chip Exchange
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
Personal signature

加油!在电子行业默默贡献自己的力量!:)

 
 
 

6788

Posts

2

Resources
5
 

I found that these IDEs are all written using the eclipse framework.

This post is from Domestic Chip Exchange

Comments

They are all eclipse with a changed logo. RISC-V currently lacks the golden partner of ARM development environment such as MDK+JLINK. IAR supports RISC-V, but there are not many domestic manufacturers supporting it. You need to apply for evaluation. The main method is still eclipse+GCC+Openocd. Each company has an IDE.  Details Published on 2023-2-27 15:49
 
 
 

501

Posts

4

Resources
6
 
wangerxian posted on 2023-2-27 14:35 I found that these IDEs are all written in the eclipse framework.

They are all eclipse with a changed logo. RISC-V currently lacks the golden partner of ARM development environment such as MDK+JLINK. IAR supports RISC-V, but there are not many domestic manufacturers supporting it, and you need to apply for evaluation. The main method is still eclipse+GCC+Openocd. Each company has an IDE and an emulator. There are some compatibility issues, and the experience is not very good. This ecosystem needs to be gradually improved.

This post is from Domestic Chip Exchange

Comments

Yes, it seems that many domestic manufacturers now use the eclipse+GCC+Openocd model.  Details Published on 2023-2-27 16:12
 
 
 

6788

Posts

2

Resources
7
 
qinyunti posted on 2023-2-27 15:49 They are all eclipse changing the logo. RISC-V currently lacks the golden partner of ARM development environment such as MDK+JLINK. IAR supports RISC-V, but the country...

Yes, it seems that many domestic manufacturers now use the eclipse+GCC+Openocd model.

This post is from Domestic Chip Exchange
 
 
 

Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list