2303 views|6 replies

71

Posts

0

Resources
The OP
 

RISC-V/ARM MCU IDE MounRiver Studio dual-core development project practice (CH32V103&CH32F103) [Copy link]

 

In recent years , the RISC-V ecosystem has been thriving , and many industry giants have made plans . A number of commercial IPs and supporting integrated development environments for RISC-V cores have also emerged in China . More and more commercial solutions and industry applications have also chosen RISC-V core MCUs . Taking my personal development experience as an example , a recent company project used the CH32V103 chip from Nanjing Qinhengwei . After submitting the development board application on the WCH official website, I went to its supporting tool official website ( www.mounriver.com ) to download the latest version of the corresponding integrated development environment MounRiver Studio (MRS) .

The MRS download package is about 470M . The installation process is very fast. After the installation wizard software is executed, you can directly open MRS without installing a tool chain or other software operating environment. It is quite convenient. The page when running for the first time is as follows :

The overall page is quite clean . Although we know from the software introduction that MRS is also developed based on the Eclipse platform , the simplicity of the interface is still refreshing. Next is the happy project development time!

First, open the New Project dialog box and use the template project that comes with MRS to verify the CH32V103 development board at hand .

On the project template page, there are RISC-V series MCU project templates from WCH and GD manufacturers , with a complete range of models . What's more surprising is that there are CH series chips with ARM core in the chip list ( I later found out that I didn't read the relevant introduction on the MRS welcome page carefully ) . I just happened to have a CH32F103 board on hand, so I can try to use MRS to develop ARM core projects later. At present, we continue the development of CH32V103 , select the C6T6 model to create a standard template project, and compile successfully .

Next, I want to try the online simulation function . I connect the WCH-Link I applied for with the CH32V103 development board according to the instructions in the documentation. The red light of the debugger is always on , indicating that it is currently in RISC-V mode , and the device manager has also recognized the hardware:

Hardware connection diagram:

Click the Debug icon on the toolbar to successfully enter the debugging mode . The lower left corner of the page is the disassembly code window , and the bottom output box also has register information :

I tried double-clicking to add breakpoints , single-step execution , pause , and re-execution ... Well, everything is normal ~

Click the stop button to exit the debugging mode , and then test the code burning function. Find the code download button on the toolbar, click the triangle button on the right , open the download configuration interface , and find that this page integrates the functions of device Flash read protection query / setting , programming address , erase , programming , verification , reset operation, etc.

Click the download button after applying directly :

Download successfully , connect to the serial port and see if the code runs normally :

Nice! The whole operation basically fills in parameters automatically. There is no need to set additional options for compilation and debugging. It is very developer-friendly and allows us to focus on the code rather than the integrated development environment itself.

The next step is to try out the CH32F103 development under MRS . We still use the built-in template project, select the CH32F103 C8T6 model, and create a project:

Click compile ~ Hey , it passes directly :

This is a bit magical. Could it be that MRS automatically switched the tool chain according to the chip core and automatically set the compilation parameters? Let's quickly open the project properties page to find out:

It has really been automatically switched to the ARM GCC tool chain. It seems that MRS has really worked hard to simplify development operations. Next, let's test the code download function of MRS for ARM core chips: WCH-Link needs to be switched to ARM mode. Refer to the accompanying documentation, connect TX to ground and power on again. The red and blue lights of the debugger are always on, indicating a successful switch.

Hardware connection diagram:

This time click the Download button again:

Sure enough, the downloaded software also automatically switched to the corresponding ARM core. After a little exploration, I found that the software can read the basic information of the chip, specify the location and length of the Flash content, query and set the Flash read protection status, etc.

After the burning is completed, connect the serial port, reset the chip, and observe the printed information:

The program runs normally! The last step is to do an online simulation test. Just click the simulation button:

Still no need to configure, the simulation is successful directly!

The above is all the content of the practical sharing of the MRS dual-core development project. From MCU to integrated development environment, it has given me a lot of surprises. I hope that domestic MCUs and development tools will get better and better!

This post is from Domestic Chip Exchange

Latest reply

riscv is all over the place. I just saw the review of Pingtouge's board.   Details Published on 2021-6-24 21:53

赞赏

1

查看全部赞赏

 
 

53

Posts

0

Resources
2
 

Awesome

This post is from Domestic Chip Exchange

Comments

Thank you for the compliment. I just started developing RISC-V kernel projects. I come to the forum every day to see if there are any experts sharing similar experiences.  Details Published on 2021-6-28 13:42
 
 
 

2w

Posts

74

Resources
3
 

Good review, looking forward to more sharing from the author.

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

Comments

Haha, thank you for your approval. I will share more experiences related to RISC-V development in the future!  Details Published on 2021-6-28 13:43
Personal signature

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

 
 
 

7422

Posts

2

Resources
4
 

riscv is all over the place. I just saw the review of Pingtouge's board.

This post is from Domestic Chip Exchange

Comments

RISC-V is indeed an unstoppable trend. Many domestic companies have already started tape-outs, and more and more projects are using it.  Details Published on 2021-6-28 13:45
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 
 

71

Posts

0

Resources
5
 

Thank you for the compliment. I just started developing RISC-V kernel projects. I come to the forum every day to see if there are any experts sharing similar experiences.

This post is from Domestic Chip Exchange
 
 
 

71

Posts

0

Resources
6
 
soso posted on 2021-6-24 09:22 The review is good, and I look forward to more sharing from the OP.

Haha, thank you for your approval. I will share more experiences related to RISC-V development in the future!

This post is from Domestic Chip Exchange
 
 
 

71

Posts

0

Resources
7
 
freebsder posted on 2021-6-24 21:53 riscv is all over the place. I just saw the review of Pingtouge's board

RISC-V is indeed an unstoppable trend. Many domestic companies have already started tape-outs, and more and more projects are using it.

This post is from Domestic Chip Exchange
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

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