4.4. How to develop with Nuclei Studio(Ver.2020-09)¶
This chapter will introduce how to run Hello World demo on HBirdv2 E203 SoC with Nuclei Studio.
4.4.1. Nuclei Studio introduction¶
Nuclei Studio is an integrated development environment(IDE) developed by Nuclei System Technology to support its self-developed processors(including commercial Nuclei series processors and open source HBird E203 processor). It’s implemented based on the open source Eclipse framework, and fully integrated with Nuclei SDK(for commercial Nuclei series processors) and HBird SDK(for open source HBird E203 processor). Users could easily create new projects and modify project settings based on their requirements with Nuclei Studio.
4.4.2. Install Nuclei Studio¶
Nuclei Studio could be downloaded from Nuclei Download Center.
Note
Nuclei Studio is available in Windows and Linux, here just take Nuclei Studio(Ver.2020-09) for Windows as example.
Nuclei Studio Ver.2022-04 and subsequent verison support new features(NPK), and the development flow is different with old verison, so if using Nuclei Stuido with 2022-04 or subsequent verison, please refer to How to develop with Nuclei Studio(Ver.2022-04).
Etract the downloaded package, there are three parts, shown in the figure below.
NucleiStudio: Nuclei Studio IDE.
SerialDebugging_Tool: Serial Debugging tool for Windows.
HBird_Driver.exe: HBird Debugger driver for Windows.
4.4.3. Creat Hello World Project¶
1. Lanuch Nuclei Studio
Doubel-click eclipse.exe under NucleiStudio directory, shown in the figure below.
Then setting workspace in the next window, shown in the figure below.
Note
Workspace is the directory used to store the projects you will create, so you can choose any directory in your working PC as you like.
After workspace set, click the Launch button, Nuclei Studio will be launched, shown in the figure below.
2. Creat project
In the menu bar, select “File -> New -> C/C++ Project”, shown in the figure below.
In the pop-up window, select “C Managed Build”, then click “Next”, shown in the figure below.
In next window, input “HelloWorld” as Project name, and select “HBird SDK Project For hbirdv2 e203 SoC”, then click “Next”, shown in the figure below.
In next window, “Board”, “Core” and “DOWNLOAD”, these project options could be set, here just keep them as default, and click “Next”, shown in the figure below.
In next window, select “baremetal helloworld” as Project Example, and about other options just keep them as default, then click “Next”, shown in the figure below.
In the next steps, just keep them as default, then click “Next”, finally click “Finish”, shown in the figure below.
The created project is shown in the figure below.
Note
From the Project Explorer on the left side of the figure, we can find that, the created project already includes HBird SDK, so users could develop other applications easily based on the created baremetal demo.
4.4.4. Compile Hello World Project¶
1. Compile options setting
In the menu bar, select “RV-Tools -> SDK Configuration Tools”, shown in the figure below.
In the pop-up window, you can choose the download mode as you need, then click “Save” button, shown in the figure below.
2. Compile HelloWorld demo
Click the “Build” button, the icon of this button is a hammer, shown in the figure below.
After the project compiled successfully, it will shown as the figure below.
Note
The generated executable file named “HelloWorld.elf” is located in Debug directory.
The code size and data size is also printed in the Console window.
4.4.5. Run Hello World Project¶
1. Hardward connection
Same as Step1 in Run Hello World demo with HBird SDK.
2. Debugger driver install
Same as Step2 in Run Hello World demo with HBird SDK.
Note
If the Debugger driver has been installed successfully, don’t need to install it again.
3. Download and run
Open the created Hello World project, select “RV-Tools -> SDK Configuration Tools”, choose “FLASH” as download mode, then click “Save” button, shown in the figure below.
Click the “Build” button, compiling the project.
In the menu bar, select “Run -> Run Configuration”, shown in the figure below.
Double-click “GDB OpenOCD Debugging”, then a set configuration file used for debug/download named “HelloWorld Debug” will be generated automatically, finally click “Run” button, shown in the figure below.
Note
If the Run/Debug Configuration file already exists, don’t need to generate again.
After the program uploaded successfully, it will shown as the figure below.
4. Run result
In the menu bar, select “Window -> Show View -> Terminal”, then click the “Open a Terminal” button in Terminal window, the icon of this button is a monitor, shown in the figure below.
In the pop-up window, choose “Serial Terminal”, and set other parameters as following figure shown.
Note
The serial port number depends on your device.
After Serial Terminal opened, you can press the MCU_RESET button on Nuclei ddr200t development board to reset MCU and the Hello World program will be executed again, the result is shown in the figure below.
4.4.6. Debug Hello World Project¶
1. Hardward connection
Same as Step1 in Run Hello World demo with HBird SDK.
2. Debugger driver install
Same as Step2 in Run Hello World demo with HBird SDK.
Note
If the Debugger driver has been installed successfully, don’t need to install it again.
3. Debug
Open the created Hello World project, click the “Build” button, compiling the project.
Note
Debugging program need to set download mode as “ILM”, since the newly created Hello World project already sets “ILM” as default download mode, so we don’t need to do any changes before compiling. If the download mode has been changed by yourself, please make sure it should be set to “ILM” when you want to debug program.
In the menu bar, select “Run -> Debug Configuration”, shown in the figure below.
Double-click “GDB OpenOCD Debugging”, then a set configuration file used for debug/download named “HelloWorld Debug” will be generated automatically, finally click “Debug” button, shown in the figure below.
Note
If the Run/Debug Configuration file already exists, don’t need to generate again.
After entering debugging mode successfully, it will shown as the figure below.