Table of Contents

Advertisement

Quick Links

NuEclipse
NuEclipse
User Manual
The information described in this document is the exclusive intellectual property of
Nuvoton Technology Corporation and shall not be reproduced without permission from Nuvoton.
Nuvoton is providing this document only for reference purposes of NuMicro microcontroller based
system design. Nuvoton assumes no responsibility for errors or omissions.
All data and specifications are subject to change without notice.
For additional information or questions, please contact: Nuvoton Technology Corporation.
www.nuvoton.com
Apr. 25, 2022
Page 1 of 57
Rev 1.02.019

Advertisement

Table of Contents
loading

Summary of Contents for Nuvoton NuEclipse

  • Page 1 The information described in this document is the exclusive intellectual property of Nuvoton Technology Corporation and shall not be reproduced without permission from Nuvoton. Nuvoton is providing this document only for reference purposes of NuMicro microcontroller based system design. Nuvoton assumes no responsibility for errors or omissions.
  • Page 2: Table Of Contents

    Supported Chips ...................... 5 2 REQUIREMENTS ....................6 3 QUICK START ....................... 7 Installation ....................... 7 3.1.1 Performing the NuEclipse Installer on Microsoft Windows ..........7 3.1.2 Extracting the NuEclipse Tar File on GNU/Linux .............. 8 3.1.3 Verifying the Eclipse Preferences ..................9 Running Eclipse.....................
  • Page 3 Figure 4-26 Importing Executable for Debugging ............... 35 Figure 4-27 Selecting Executable ....................36 Figure 4-28 Choosing GDB Nuvoton Nu-Link Debugging ............37 Figure 4-29 Locating the GDB Executable ................. 38 Figure 4-30 Choosing the ELF File to Download ................ 39 Figure 4-31 Adding Source Lookup Path..................
  • Page 4 NuEclipse Figure 4-32 Configuring the Startup Tab for MA35D1 ..............42 Figure 4-33 How to Disable Command Timeout ................. 43 Figure 4-34 Disable CPU1 Setting ..................... 44 Figure 4-35 Configuring the Debugger Tab for Single-core Debugging on MA35D1 ....44 Figure 4-36 Configuring the Debugger Tab for Multi-core Debugging on M4 core .......
  • Page 5: Overview

    NuEclipse OVERVIEW The NuEclipse is designed for cross-platform embedded ARM development. It includes a series of Eclipse plug-ins and tools. The plug-ins allow the user to create, build, and debug ARM-based projects within the Eclipse framework. Its features are listed below: ...
  • Page 6: Requirements

    NuEclipse REQUIREMENTS The following table lists system requirements for the user to run the NuEclipse. Minimum Requirements Recommended Specifications Operating System Windows® 7 x64 or GNU/Linux Windows® 10 x64 or Ubuntu 18.04 LTS GNU ARM Embedded Toolchain 6-2017-q1-major The latest version Note: To have a fully usable and pleasant experience on Linux, the recommended Linux distribution is Ubuntu 18.04 LTS (64-bit).
  • Page 7: Quick Start

    Performing the NuEclipse Installer on Microsoft Windows On Windows, it is very easy to install the NuEclipse only by performing the NuEclipse installer. The installer will ask the user to install the GNU ARM Eclipse Windows Build Tools and GNU ARM Embedded Toolchain because they are required by NuEclipse.
  • Page 8: Extracting The Nueclipse Tar File On Gnu/Linux

    Extracting the NuEclipse Tar File on GNU/Linux On GNU/Linux, it is very easy to install the NuEclipse only by extracting the NuEclipse tar file. After that, run the install.sh script to complete the installation process. Please do not use the sudo command to run the script.
  • Page 9: Verifying The Eclipse Preferences

    NuEclipse 3.1.3 Verifying the Eclipse Preferences After the installation, the Eclipse preferences are automatically written on Windows. To verify them, click Window > Preferences, the Preferences wizard appears. Go to C/C++ > Build > Global Tools Paths and make sure the Build tools and Toolchain folder be correctly configured to what the installer has installed in the previous step.
  • Page 10: Figure 3-4 Preferences For Openocd Nu-Link

    OpenOCD executable. On Microsoft Windows, for example, the path of OpenOCD folder could be C:/Program Files (x86)/Nuvoton Tools/OpenOCD. Similarly, on GNU/Linux it could be /usr/local/OpenOCD. The OpenOCD executable provided by Nuvoton is customized for Nu-Link.
  • Page 11: Running Eclipse

    NuEclipse Running Eclipse To run NuEclipse, double-click the eclipse.exe. Note that the .exe file and the related folders, such as the OpenOCD folder, should stay in the same directory; otherwise, the application will not work properly. Figure 3-5 Eclipse.exe and Related Folders Apr.
  • Page 12: Development Tutorial

    NuEclipse DEVELOPMENT TUTORIAL Select Workspace When Eclipse launches, we have to select a workspace which groups a set of related projects together that usually make up an application. In addition, some configuration settings for Eclipse and projects are stored here, too. For different computers, the configuration settings may change. We should create our own workspace rather than copying another user’s workspace.
  • Page 13: New Project Wizard

    C project, click File > New > C Project. The New Project Wizard appears. Here we choose Hello World Nuvoton Cortex-M C Project for Project type. Input the project name and click the Next > button to continue.
  • Page 14: Figure 4-3 Target Processor Settings

    NuEclipse Based on the actual target chip, we select the corresponding chip series. For some chip series, e.g., M2351_NonSecure, we need to input the additional library path. If not, the build process may fail. In addition, input the real values to Flash and RAM size. If not, the default values will be used. When all the settings are done, click the Next >...
  • Page 15: Import Existing Projects

    Select General > Existing Project into Workspace and click Next. Choose either Select root directory or Select archive file and click the associated Browse to locate the directory or file containing the projects. In the Nuvoton BSP, the Eclipse projects are stored in the GCC folder.
  • Page 16: Build Settings

    NuEclipse Build Settings After projects have been created, we still have a chance to alter the build settings by clicking Project > Properties. The Properties wizard shows up. Then go to C/C++ Build > Settings. From there, we can alter the build settings according to the actual target chip. Then click the Apply button to take effect.
  • Page 17: Debug Configuration

    Double click on the GDB Nuvoton Nu-Link Debugging group. The Nuvoton Nu-Link debug configuration appears on the right-hand side. In the Main tab, the name of Project should coincide with the project name. The C/C++ Application should point to the elf application generated by the build process.
  • Page 18: Debugger Tab

    Config options field. Nuvoton’s adapter is Nu-Link, which uses the interface configuration file named nulink.cfg. In addition, Nuvoton has three different ARM families, such as M0, M4, and M23. The corresponding target configuration files are numicroM0.cfg, numicroM4.cfg, and numicroM23.cfg.
  • Page 19: Startup Tab

    NuEclipse 4.5.2 Startup Tab As the first step, we should choose the right Chip Series in the Startup tab. When done, the corresponding target configuration file will be automatically written in the Config options field of the Debugger tab. To load executable to flash, we need to select the Load executable to flash checkbox.
  • Page 20: Debug Views

    NuEclipse Debug Views Eclipse provides many debug views. Each of them contains specific information for debugging. 4.6.1 Registers View When entering the debug mode, we can open the Registers view in the bottom of Debug perspective. The Registers view lists information about the registers in a selected stack frame.
  • Page 21: Memory View

    NuEclipse 4.6.2 Memory View The Memory view of the Debug perspective is used to monitor and modify the process memory. The process memory is presented as a list of so called memory monitors. Each monitor represents a section of memory specified by its location called base address. To open it, click the Memory tab on the lower side of Debug perspective.
  • Page 22: Disassembly View

    NuEclipse 4.6.3 Disassembly View The Disassembly view shows the loaded program as assembler instructions mixed with source code for comparison. We can do the following tasks in the Disassembly view: Setting breakpoints at the start of any assembler instruction. Enabling and disabling breakpoints.
  • Page 23: Peripheral Registers View

    NuEclipse 4.6.4 Peripheral Registers View To display the Peripheral Registers view, we need to utilize Packs mechanism. Packs can help the user download special function register (SFR) files from the Keil repository. Firstly, we open the Packs perspective by choosing it in the Open Perspective dialog.
  • Page 24: Figure 4-14 How To Download Packages

    NuEclipse For the first time we see the Packs perspective, its content is provided by the NuEclipse installer. If the default content is missing, please switch to a new workspace and try again. To get the latest version, click the Update the packages definitions from all repositories button at the upper-right corner. After clicking, Eclipse begins downloading all the SFR files from an online repository.
  • Page 25: Figure 4-15 Locations Of Repositories

    NuEclipse The locations of repositories are specified in the Window > Preferences > C/C++ > Packages > Repositories. The default is from Keil’s CMSIS Pack. Figure 4-15 Locations of Repositories Apr. 25, 2022 Page 25 of 57 Rev 1.02.019...
  • Page 26: Figure 4-16 Installing Sfr Files

    NuEclipse When the download is completed, we can find the Nuvoton SFR files and install them on Eclipse if needed. Figure 4-16 Installing SFR Files Apr. 25, 2022 Page 26 of 57 Rev 1.02.019...
  • Page 27: Figure 4-17 Device Selection

    NuEclipse To use the specific SFR file, open the project’s properties dialog and go to the C/C++ Build > Settings. From there, we should choose the specific device matching the real one. In this case, it is M487JIDAE. Click the Apply button to take effect.
  • Page 28: Figure 4-18 Peripheral Registers View

    NuEclipse As a result, we can monitor the peripheral registers when debugging. Figure 4-18 Peripheral Registers View Apr. 25, 2022 Page 28 of 57 Rev 1.02.019...
  • Page 29: Watchpoints

    NuEclipse Watchpoints To add watchpoints on Eclipse, we need to do the following steps: Selecting a globe variable, i.e. g_seconds, in the Outline view. Right-clicking on the global variable and choosing Toggle Watchpoint. Figure 4-19 Toggle Watchpoint Apr. 25, 2022 Page 29 of 57 Rev 1.02.019...
  • Page 30: Figure 4-20 Properties For C/C++ Watchpoint

    NuEclipse Configuring the settings for watchpoints. To stop execution when the watch expression is read, select the Read checkbox. To stop execution when the watch expression is written to, select the Write checkbox. Figure 4-20 Properties for C/C++ Watchpoint When the watchpoint is added, it appears in the Breakpoints view.
  • Page 31: Debug In Ram

    NuEclipse Debug in RAM To debug in RAM, there are several steps to follow: Modifying the ld script. Assigning PC to the specific RAM address. Assigning SP to the specific RAM address. Downloading the binary file to RAM. The ld script is responsible for telling the linker the layout of the compiled executable. For example, the...
  • Page 32: Figure 4-23 Modifying The Ld Script

    NuEclipse The modified ld script should meet the memory layout design. Figure 4-23 Modifying the ld Script Apr. 25, 2022 Page 32 of 57 Rev 1.02.019...
  • Page 33: Figure 4-24 Debug Configuration Settings

    NuEclipse To assign PC and SP to the specific addresses, we need to input them in the debug configuration, as follows. Based on the previous memory layout, the PC and SP addresses should be Reset_Handler and 0x20001400, respectively. In addition, set ector Table Offset Register (0xE000ED08) should be 0x20000000 and unselect the Pre-run/Restart reset Button.
  • Page 34: Figure 4-25 Debugging In Ram

    NuEclipse When the program stops in the main function, we open the Memory view. From there, we can verify that the binary file is successfully downloaded into RAM. The first word denotes the SP address. The following words denote the addresses of handlers.
  • Page 35: Debug Executable Files Only

    Import an executable for debugging (referring to Figure 4-26). Click Browse following Select executable, then select an executable (referring to Figure 4-27). Choose GDB Nuvoton Nu-Link Debugging as a Launch Configuration (referring to Figure 4-28). Locate the GDB executable in the debug configuration (referring to Figure 4-29).
  • Page 36: Figure 4-27 Selecting Executable

    NuEclipse Figure 4-27 Selecting Executable Apr. 25, 2022 Page 36 of 57 Rev 1.02.019...
  • Page 37: Figure 4-28 Choosing Gdb Nuvoton Nu-Link Debugging

    NuEclipse Figure 4-28 Choosing GDB Nuvoton Nu-Link Debugging Apr. 25, 2022 Page 37 of 57 Rev 1.02.019...
  • Page 38: Figure 4-29 Locating The Gdb Executable

    NuEclipse Figure 4-29 Locating the GDB Executable Apr. 25, 2022 Page 38 of 57 Rev 1.02.019...
  • Page 39: Figure 4-30 Choosing The Elf File To Download

    NuEclipse Figure 4-30 Choosing the ELF File to Download Apr. 25, 2022 Page 39 of 57 Rev 1.02.019...
  • Page 40: Figure 4-31 Adding Source Lookup Path

    NuEclipse Figure 4-31 Adding Source Lookup Path Apr. 25, 2022 Page 40 of 57 Rev 1.02.019...
  • Page 41: Configuration Of Cortex-A, Multi-Core Smp And Amp System

    Nu-Link2 had built-in CMSIS-DAP interface from v3.09.7380r, and this CMSIS-DAP interface is used to support Single Cortex-A, Multi-Core SMP and AMP (Cortex-A + Cortex-M). Besides, NuEclipse provides GNU toolchain for the Cortex-A family which resides in NuEclipse/Others folder. After configuring this toolchain (see Section 3.1.3), we can build MA35D1’s projects.
  • Page 42: Configuration Of Debugging Single-Core Cortex-A

    This section describes how to configure a single Cortex-A core debug. Take Nuvoton MA35D1 as an example, which has dual Arm Cortex-A35 cores and one Arm Cortex-M4 core. To debug it, we should choose NuMicro A35 and resume the target at the position where the executable starts running in the Startup tab, as follows.
  • Page 43: Figure 4-33 How To Disable Command Timeout

    NuEclipse When the images are too large, the download command may face a timeout. To avoid that, go to Window > Preferences > C/C+ > Debug > GDB and disable the Command timeout or increase it. Figure 4-33 How to Disable Command Timeout Apr.
  • Page 44: Figure 4-34 Disable Cpu1 Setting

    To debug single A35 core, we have to disable CPU1 setting by commenting out the following code in the numicroMA35D1.cfg. On Windows, the location where numicroMA35D1.cfg resides could be C:\Program Files (x86)\Nuvoton Tools\ OpenOCD\scripts\target. On GNU/Linux, it could be /usr/local/OpenOCD/scripts/target.
  • Page 45: Configuration Of Debugging Dual-Core Cortex-A In Smp Mode

    NuEclipse 4.10.3 Configuration of debugging Dual-core Cortex-A in SMP mode To debug SMP, e.g. dual A35 core, please refer to Section 4.10.2, but bypass the step that disabling CPU1 setting. 4.10.4 Configuration of debugging Single-core Cortex-A and Cortex-M in AMP mode To debug AMP, e.g.
  • Page 46: Figure 4-37 Configuring The Launch Group

    NuEclipse To launch A35 and M4 applications simultaneously, we use Launch Group by the following steps: Give a name to the newly created launch group. Press on the Add button. Add the expected launch configurations to the launch group. Press on the OK button.
  • Page 47: Configuration Of Debugging Dual-Core Cortex-A And Cortex-M In Amp Mode

    To debug AMP, e.g. dual A35 core and M4 simultaneously, we have to disable the CPU Symmetric Multi- Processors (SMP) by commenting out the following code in the numicroMA35D1.cfg. On Windows, the location where numicroMA35D1.cfg resides could be C:\Program Files (x86)\Nuvoton Tools\ OpenOCD\scripts\target. On GNU/Linux, it could be /usr/local/OpenOCD/scripts/target.
  • Page 48: Configuration Of Debugging Cortex-A Core In Aarch32 Mode

    Import an executable for debugging (referring to Figure 4-26). Click browse following select executable, then select an executable (referring to Figure 4-27). Choose GDB Nuvoton Nu-Link Debugging as a Launch Configuration (referring to Figure 4-28). Locate the GDB executable in the debug configuration (referring to Figure 4-40).
  • Page 49: Figure 4-40 Locating The Aarch64 Gdb Executable

    NuEclipse Figure 4-40 Locating the AARCH64 GDB Executable Figure 4-41 The First Time to Enter the Debug Mode Settings Apr. 25, 2022 Page 49 of 57 Rev 1.02.019...
  • Page 50: Figure 4-42 The Second Time To Enter The Debug Mode Settings

    NuEclipse Figure 4-42 The Second Time to Enter the Debug Mode Settings Figure 4-43 AARCH32 Program Debugging Apr. 25, 2022 Page 50 of 57 Rev 1.02.019...
  • Page 51: System Registers Access

    NuEclipse 4.10.7 System Registers Access When entering the debug mode, we can open the Registers View in the bottom of Debug perspective. The Registers view lists information about the registers in a selected stack frame. Some system registers are listed after general registers.
  • Page 52 Q: Can we simultaneously debug on Eclipse, Keil and Iar? A: No, we must stop the debug mode on Eclipse first. Then we can debug on another IDE. Q: Can we simultaneously debug on Eclipse and use the Nuvoton development tools, such as ICP Programming tool? A: No, we must stop the debug mode on Eclipse first.
  • Page 53: Figure 5-1 Adding Udev Rules

    NuEclipse Q: How to add udev rules for Nu-Link on GNU/Linux? A: When accessing target chips via Nu-Link, GNU/Linux requires the USB permission. We can get the permission by adding udev rules for Nu-Link. Here are the steps to do that: Add the User to the plugdev Group.
  • Page 54: Figure 5-2 Preferences For String Substitution

    Q: How to edit string substitution for openocd_nulink_path? A: The openocd_nulink_path string stores where the OpenOCD executable resides. After upgrading NuEclipse, the string may keep the previous OpenOCD path. To fix it, click Window > Preferences, the Preferences wizard appears. Go to Run/Debug > String Substituion.
  • Page 55: Figure 5-3 More Options For Nulink2

    A: One of possible reasons is that the write permission for Windows folders is denied. We need to find the correct folder and allow the write permission. On Windows, the location where we place software packs is C:\Program Files (x86)\Nuvoton Tools\Packages. 10. Q: How to adjust output voltage of Nu-Link2? A: Upgrade the NuLink2 firmware greater than version v3.08.7249, open NU_CFG.TXT file in...
  • Page 56: Revision History

    NuEclipse REVISION HISTORY Date Revision Description 2017.03.31 0.01.000 Alpha version released. 2017.06.30 1.01.000 Beta version released. 2018.09.15 1.01.013 Official version released. 1. Supported NUC505. 2018.11.30 1.01.014 2. Updated the new project wizard. 2019.08.09 1.01.015 Supported M031 ,M261 and M480LD. 2020.03.06 1.01.016...
  • Page 57 All Insecure Usage shall be made at customer’s risk, and in the event that third parties lay claims to Nuvoton as a result of customer’s Insecure Usage, customer shall indemnify the damages and liabilities thus incurred by Nuvoton.

Table of Contents