Nuvoton NuEclipse User Manual Download Page 1

NuEclipse 

Apr. 25, 2022 

Page 

1 of 57

 

Rev 1.02.019 

NU

E

CL
IP

S

E

 U
S

E

R MA

NU

AL
 

 

 

 

 

 

 

 

 

 

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

 

Summary of Contents for NuEclipse

Page 1: ...ration 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 resp...

Page 2: ...Startup Tab 19 Debug Views 20 4 6 1 Registers View 20 4 6 2 Memory View 21 4 6 3 Disassembly View 22 4 6 4 Peripheral Registers View 23 Watchpoints 29 Debug in RAM 31 Debug Executable Files Only 35 Co...

Page 3: ...the Instruction Stepping Mode Button 22 Figure 4 12 Disassembly View 22 Figure 4 13 Opening the Packs Perspective 23 Figure 4 14 How to Download Packages 24 Figure 4 15 Locations of Repositories 25 F...

Page 4: ...M4 core 45 Figure 4 37 Configuring the Launch Group 46 Figure 4 38 How to Disable SMP 47 Figure 4 39 Multi core Debugging 47 Figure 4 40 Locating the AARCH64 GDB Executable 49 Figure 4 41 The First Ti...

Page 5: ...t target chips Building projects by the GNU ARM Toolchain The toolchain contains the ARM Embedded GCC compiler The user can use it to build projects without restriction Debugging projects by GDB The u...

Page 6: ...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...

Page 7: ...staller on Microsoft Windows 2 Extracting the NuEclipse tar file on GNU Linux 3 1 1 Performing the NuEclipse Installer on Microsoft Windows On Windows it is very easy to install the NuEclipse only by...

Page 8: ...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 pr...

Page 9: ...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...

Page 10: ...able 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...

Page 11: ...NUAL 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...

Page 12: ...ually 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...

Page 13: ...t way to create a C C project is using the New Project Wizard For instance to create a C project click File New C Project The New Project Wizard appears Here we choose Hello World Nuvoton Cortex M C P...

Page 14: ...s 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 val...

Page 15: ...The Import wizard shows up 2 Select General Existing Project into Workspace and click Next 3 Choose either Select root directory or Select archive file and click the associated Browse to locate the d...

Page 16: ...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 The...

Page 17: ...ink 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...

Page 18: ...n files are specified in the 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...

Page 19: ...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 To load executable to RAM we need to s...

Page 20: ...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 Regis...

Page 21: ...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 locati...

Page 22: ...1 Setting breakpoints at the start of any assembler instruction 2 Enabling and disabling breakpoints 3 Stepping through the disassembly instructions of the program 4 Jumping to specific instructions i...

Page 23: ...iew 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...

Page 24: ...e 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...

Page 25: ...Page 25 of 57 Rev 1 02 019 NUECLIPSE USER MANUAL 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 Loca...

Page 26: ...clipse Apr 25 2022 Page 26 of 57 Rev 1 02 019 NUECLIPSE USER MANUAL When the download is completed we can find the Nuvoton SFR files and install them on Eclipse if needed Figure 4 16 Installing SFR Fi...

Page 27: ...AL 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...

Page 28: ...NuEclipse Apr 25 2022 Page 28 of 57 Rev 1 02 019 NUECLIPSE USER MANUAL As a result we can monitor the peripheral registers when debugging Figure 4 18 Peripheral Registers View...

Page 29: ...PSE USER MANUAL Watchpoints To add watchpoints on Eclipse we need to do the following steps 1 Selecting a globe variable i e g_seconds in the Outline view 2 Right clicking on the global variable and c...

Page 30: ...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...

Page 31: ...eps to follow 1 Modifying the ld script 2 Assigning PC to the specific RAM address 3 Assigning SP to the specific RAM address 4 Downloading the binary file to RAM The ld script is responsible for tell...

Page 32: ...NuEclipse Apr 25 2022 Page 32 of 57 Rev 1 02 019 NUECLIPSE USER MANUAL The modified ld script should meet the memory layout design Figure 4 23 Modifying the ld Script...

Page 33: ...the PC and SP addresses should be Reset_Handler and 0x20001400 respectively In addition set Vector Table Offset Register 0xE000ED08 should be 0x20000000 and unselect the Pre run Restart reset Button...

Page 34: ...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 followi...

Page 35: ...referring to Figure 4 26 2 Click Browse following Select executable then select an executable referring to Figure 4 27 3 Choose GDB Nuvoton Nu Link Debugging as a Launch Configuration referring to Fig...

Page 36: ...NuEclipse Apr 25 2022 Page 36 of 57 Rev 1 02 019 NUECLIPSE USER MANUAL Figure 4 27 Selecting Executable...

Page 37: ...NuEclipse Apr 25 2022 Page 37 of 57 Rev 1 02 019 NUECLIPSE USER MANUAL Figure 4 28 Choosing GDB Nuvoton Nu Link Debugging...

Page 38: ...NuEclipse Apr 25 2022 Page 38 of 57 Rev 1 02 019 NUECLIPSE USER MANUAL Figure 4 29 Locating the GDB Executable...

Page 39: ...NuEclipse Apr 25 2022 Page 39 of 57 Rev 1 02 019 NUECLIPSE USER MANUAL Figure 4 30 Choosing the ELF File to Download...

Page 40: ...NuEclipse Apr 25 2022 Page 40 of 57 Rev 1 02 019 NUECLIPSE USER MANUAL Figure 4 31 Adding Source Lookup Path...

Page 41: ...r than v3 09 7380r The term SMP stands for symmetric mulitiprocessing AMP is asymmetric mulitiprocessing Nu Link2 had built in CMSIS DAP interface from v3 09 7380r and this CMSIS DAP interface is used...

Page 42: ...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 For more details please refer to Se...

Page 43: ...02 019 NUECLIPSE USER MANUAL 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 F...

Page 44: ...usr local OpenOCD scripts target Figure 4 34 Disable CPU1 Setting After choosing NuMicro A35 in the Startup tab the numicroMA35D1 cfg will be automatically updated in the Config options field of the...

Page 45: ...Cortex M in AMP mode To debug AMP e g one A35 core and M4 simultaneously we build the A35 and M4 projects and create the corresponding debug configurations see Section 4 5 The debug configuration of...

Page 46: ...s 1 Give a name to the newly created launch group 2 Press on the Add button 3 Add the expected launch configurations to the launch group 4 Press on the OK button 5 Move the A35 launch configuration in...

Page 47: ...re 4 38 How to Disable SMP The debug configuration of A35 CPU0 follows Section 4 10 2 to complete settings The debug configuration of A35 CPU1 and M4 follows Section 4 10 3 to complete settings but th...

Page 48: ...referring to Figure 4 27 3 Choose GDB Nuvoton Nu Link Debugging as a Launch Configuration referring to Figure 4 28 4 Locate the GDB executable in the debug configuration referring to Figure 4 40 5 Ch...

Page 49: ...NuEclipse Apr 25 2022 Page 49 of 57 Rev 1 02 019 NUECLIPSE USER MANUAL Figure 4 40 Locating the AARCH64 GDB Executable Figure 4 41 The First Time to Enter the Debug Mode Settings...

Page 50: ...NuEclipse Apr 25 2022 Page 50 of 57 Rev 1 02 019 NUECLIPSE USER MANUAL Figure 4 42 The Second Time to Enter the Debug Mode Settings Figure 4 43 AARCH32 Program Debugging...

Page 51: ...stack frame Some system registers are listed after general registers Figure 4 44 System Register View If there are no system registers user want to access in the list please select the debugger conso...

Page 52: ...pts folder From there we can change Flash and RAM size 6 Q Why can the application not enter the debug mode A Firstly we must install all the stuff by following the previously mentioned steps Then che...

Page 53: ...n by adding udev rules for Nu Link Here are the steps to do that Add the User to the plugdev Group Type the command in the Terminal sudo useradd G plugdev USER Add Nu Link to udev Type the commands in...

Page 54: ...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...

Page 55: ...are 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 pop up NuMi...

Page 56: ...013 Official version released 2018 11 30 1 01 014 1 Supported NUC505 2 Updated the new project wizard 2019 08 09 1 01 015 Supported M031 M261 and M480LD 2020 03 06 1 01 016 Supported M031BT NUC1311 M...

Page 57: ...s not limited to equipment for surgical implementation atomic energy control instruments airplane or spaceship instruments the control or operation of dynamic brake or safety systems designed for vehi...

Reviews: