Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Eclipse IDE Survival Guide

Eclipse IDE Survival Guide

JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

The IDE provided with ModusToolbox software is built on the Eclipse IDE. For those unfamiliar with an Eclipse IDE, this FAQ answers questions about how to get common tasks done. Most information specific to ModusToolbox™ (for example: How do I install or get started?) is in the ModusToolbox™ documentation, especially the ModusToolbox Installation Guide, the Quick Start Guide, and the User Guide.

If you are already familiar with an Eclipse IDE in general, you will find some useful answers here on unique IDE features such as the Quick Panel and how to build an application. However, most information unique to the Eclipse IDE for ModusToolbox™ (such as the Project Creator and Library Manager) is in the Eclipse IDE for ModusToolbox User Guide or other documentation..

Questions are organized into the following categories:

In this document, the term "Application" means deployable firmware for the target hardware. To build an application, you require a collection of one or more Eclipse projects.

A "Project" is a compilation unit. An application may consist of several Eclipse projects but typically is a single project.

Eclipse IDE for ModusToolbox™ Project Management

 

For general information about how the Eclipse IDE for ModusToolbox™ creates and implements projects, see the “Getting Started” chapter of the Eclipse IDE for ModusToolbox User Guide .

Parts of the code example’s readme file are hard to read in the IDE. How do I fix that?

 

Infineon uses GitHub to deliver examples and libraries. We use GitHub-flavored markdown, which has some extensions (like support for tables) that are not understood by the Eclipse markdown editor. There are a few things you can do. You can look at the readme file on GitHub. You can right-click the document in the project explorer and choose “Open With…” to pick a different reader application. You can get a more capable markdown editor and install that. You can also modify the Eclipse IDE to open a markdown document in that editor.

How do I set up the IDE to use my preferred markdown editor?

 

If a document does not open the editor you want, use Window > Preferences > General > Editors > File Associations and set up the file association. For the *.md file type, assign it to your preferred markdown viewer. When you double-click a .md file in the Eclipse project explorer, it opens in your external editor.

How do I find the right Eclipse panel or option when I don’t know where anything is?

 

Use the Eclipse IDE Quick Access feature. This is a search engine that helps you find things in an Eclipse IDE. The IDE is a complex application with significant resources located in various menus, panels, windows, and so forth. The Quick Access field solves the problem of not knowing where things are.

Type a search term into the Quick Access field, and you are presented with hits. Each item is a link. Clicking a link either executes the command or takes you to the location in the Eclipse UI.

JamesT_21_31-1690899472397.png

How do I rename an application?

 

In the project explorer, right-click the project name and choose Rename. However, launch configurations (used for programming and debugging the target) are linked to the original project name, so they disappear when you rename the project. See My launch configurations disappeared, what do I do?

How do I share a project?

 

With an Eclipse IDE, there are two ways to do this: via an archive file, and from the file system.

  • Export an archive file: Select File > Export >General > Archive File. Select the project that represents the application. Send the archive to the person who needs the application. That person imports via File > Import > General >Existing projects into workspace and sets options to import the archive file.
  • If you have a folder that contains an Eclipse project, you can use File > Import > General > Existing projects into workspace; point to the root directory that contains the project(s) you want to import.

Pro Tip: When you archive a project, do not include the build folder. The IDE regenerates this information, you don’t need to include it. You will save many megabytes of space excluding the build folder.

JamesT_21_0-1690895992930.png

What is a workspace?

 

Eclipse IDE always opens in association with a workspace. A workspace is a directory on the disk where Eclipse keeps projects. Within the workspace, each project has its own directory. You can have multiple projects in a single workspace. You can also have multiple workspaces. All projects associated with a workspace appear in the Project Explorer window. When you switch between workspaces, the projects of the new workspace appear.

Running the ModusToolbox™ executable prompts you to select the Workspace when launching the Eclipse IDE.

JamesT_21_33-1690899509067.png

How do I create a new/empty workspace?

 

Choose File > Switch Workspace > Other... and then create the new workspace. You can do this by just entering a new name, or browsing and creating a folder.

How do I change workspaces?

 

Choose File > Switch Workspace, and then pick an existing workspace.

What is a perspective and how does the IDE use them?

 

In Eclipse, a perspective is the collection of panes and views visible in the user interface. The Eclipse IDE for ModusToolbox™ has its own perspective, which is what appears when you launch the IDE for the first time. This is called the ModusToolbox™ perspective. It contains views that enable project management, code creation, and debugging all in the same perspective. It also contains the Quick Panel, which contains one-click shortcuts to the most common tasks. By default, the IDE does not use the standard Eclipse C/C++ or Debug perspectives.

How can I change to a different perspective?

 

There are at least three ways.

Select Window > Perspective > Open Perspective and choose the one you want. You can also click the Open Perspective button in the toolbar. The icon for any perspective you open appears as a button on the toolbar.

JamesT_21_34-1690899540298.png

 

To the right of that is a button for each of the perspectives you have used, such as the ModusToolbox perspective. Just click the button corresponding to the perspective you want to use.

How can I make my own perspective?

 

This is one of the most powerful features of an Eclipse IDE. You can open, close, or relocate any view in any panel. In effect, you can build your own UI. When the UI is set up to your liking, use Window > Perspective > Save Perspective As. Give it a name, and it is added to the list of available perspectives.

How do I remove or delete a project from the project explorer?

 

In the project explorer, select the project(s) you want to remove. Then press the Delete key, or right-click and choose Delete. The Delete Resources dialog appears.

To remove a project from the explorer, but keep the actual project, make sure that Delete project contents on disk is disabled. This is often the right thing to do, for example, when you point to a project outside your workspace that should continue to exist.

To delete the project permanently, enable the Delete project contents on disk option. Project deletion cannot be undone. This is often the right thing to do when you want to permanently remove the project from the workspace.

JamesT_21_35-1690899560677.png

What are workspace settings?

 

Workspace settings are preferences that apply to the entire workspace. In general, these are set by changing options in Window > Preferences.

How do I share workspace settings across workspaces?

 

You can export preferences from one workspace and import them into another. Select File > Export > General > Preferences. This creates a preferences file. You can use the file as a backup of your preferences. You can switch to any workspace and import the preferences.

When creating a new workspace, expand the Copy Settings option and specify which preferences from the current workspace you want to use in the new workspace.

JamesT_21_36-1690899582492.png

What is a working set and why would I want to use one?

 

A working set is a collection of Eclipse projects. Fundamentally it is just a group, but you can perform various operations that will affect all the projects in the group. For example, you can show, hide, or build a working set. This can make it easier to manage multiple related projects.

How do I create a working set?

 

To make things easy, do the following:

1.    In the project explorer, first select all the projects you want in the working set.

2.    In the project explorer, use the View drop-down menu and choose Select Working Set.

JamesT_21_1-1690896391255.png

3.  Click New, and then select C/C++ and click Next. If you selected the projects first, they appear already selected in the New Working Set dialog. Otherwise, you can pick them one by one.

Pro Tip: In the View menu you can also make the working set the top-level element. Only selected working sets are visible. You can see projects that aren’t in the working set in the Other Projects collection.

JamesT_21_2-1690896424713.png

How do I set up dependencies between projects?

 

When working with a set of applications, you may wish to ensure that if you build one, the projects it depends upon build first.

In the project explorer, right-click a project and choose Properties. Click the Project References item. In the panel, select the projects on which this project depends.

JamesT_21_3-1690896450551.png

What does it mean to close a project, and how do I do it?

 

A closed project requires no resources and is not affected by any workspace command (e.g., Build All).

To close projects, select them, right-click, and choose Close.

You can also select one you want to keep open, right-click, and choose Close Unrelated Projects. Every project not related to your selected project will close.

What is the difference between a local file and a linked file, and how do I tell which is which?

 

A local file is a file that exists inside the project directory. It is unique to the project that owns the file. Any change you make to this file has local effect only. You are changing the file in the project.

A linked file is a file that the project refers to, but it does not maintain a local copy. Most commonly, linked files are library source files. However, it can be a file anywhere that is used by reference. The project points to the original file and does not have a local copy. That means, if you change the linked file, you change every project that uses that file.

How can you tell which is which? This is a particularly subtle part of the Eclipse UI. The icon for a linked file has a tiny arrow. Like this.

How do I link to files instead of duplicating files in each project that uses them?

 

This is easy, but obscure. You can link to a single file, or an entire folder full of files.

Use File > New > Other, select Folder (or file) and click Next.

In the resulting dialog, specify the parent folder that will hold the new linked folder in the Project explorer. Click Advanced. Then Click Link to alternate location (Linked Folder). Click the Browse button and navigate to the folder you want to link to the project. Instead of an absolute path, you can use path Variables to specify the location. The folder name is set automatically, but you can rename it whatever you want.

JamesT_21_4-1690896486934.png


Click Finish and you’re done. The project now has a link to the folder and its contents. All the files in the folder appear, you do not need to add them individually. If you change a file, any project that uses that file is affected. In the project explorer it looks like this:

JamesT_21_5-1690896504869.png

 

The folder icon has a tiny arrow, which means this folder and its contents are linked, and not in the project folder.

How do I launch multiple instances of Eclipse on macOS?

 

By design, macOS allows one instance of an app. There is a way around this from the terminal. This is a macOS issue, not an Eclipse problem.

From the terminal, do the following:

1.    Navigate to the application directory, for example: cd /Applications/eclipse/

2.    Open the app: open -n Eclipse.app &

The & immediately sends the app to the background, and you now have two instances of Eclipse running.

Can I use an Eclipse IDE with a version control system?

 

The short answer is yes. However, you need to be careful about what gets checked in. The IDE does not restrict what it checks in. The IDE can add everything in a project, not just the files you want. As a result way too many files, including binaries, can get checked in. This can cause grief.

Although the Eclipse egit plugin typically manages this automatically, even then you can have problems. If the project builds with an error, inappropriate files will be checked in when you add files to source code control.

For starters, never commit the entire workspace into a version control system. Any Eclipse IDE maintains workspace metadata that is easily corrupted if you revert changes. So, do not check in your workspace, but do check in some of the content in your project folder.

You do not need to check in any files created in the build process. For example, anything in the final Build folder. You need to manage your version control system to exclude these files. For example, ensure that your .gitignore file lists any file or directory that should not be included.

Editor

How do I show line numbers?

Select Window > Preferences > General > Editors > Text Editors and find the Show line numbers option.

How do I search across all files in a project or workspace?

Use the Search menu. When the dialog opens, control the scope of the search with the options near the bottom of the dialog.

How do I go from a file listed in the project explorer to the actual file in the file system?

In the project explorer, right-click the file, choose Properties. In the dialog, note the Location field. Click the button to the right of the location.

pastedImage_17.png


I have multiple files of the same name open in the editor. How do I tell which project each one belongs to?

There are at least two ways to do this.

  • Hover over the tab in the editor. The project and path within the project to the file appear.

pastedImage_18.png

  • Enable the Link with Editor option in the explorer pane. When this is enabled, the file with focus in the editor is highlighted in the project explorer.

pastedImage_19.png


Build System

How do I build an application?

In the project explorer, select the project. In the Quick Panel click Build <appname> Application. You can also right click the project and choose Build Project. If there are dependent projects those build as well.

What does Build All build?

The Project > Build All command builds every open project in a workspace. You probably don’t want to use this command if you have more than one application in a workspace.

In addition, open projects can be hidden in the project explorer. If you hide an application and its projects (using working sets for example), those projects will still be built if they are open.

How do I add middleware or a library to a project?

In the project explorer, select the project. Then in the Quick Panel, click the Library Manager link. Click the Libraries tab to see all available libraries. You can select the version you want, as well as the library.

How do I set up an application to run on a different kit?

In the project explorer, select the project. Then in the Quick Panel, click the Library Manager link. Click the BSPs tab to see all available kits. If you are working with a code example, make sure that the example supports the kit you want to use.

What is the project’s makefile and what does it do?

For ModusToolbox™, every application has a makefile. That file fully describes the application, including what board or kit to use, what tool chain to use, what files to use, what libraries to include, what compiler and linker flags control the build, and so on. See Running ModusToolbox from the Command Line for detailed documentation. You can also go to a community KBA on how to manage the makefile.

Where do I find build settings?

 In ModusToolbox™, compiler and linker settings are controlled by the makefile that describes the application. They are not set in the Eclipse UI.

There are many settings in the project’s properties that you may want to adjust. To see a project’s properties, use Project > Properties or right-click a project and choose Properties. Then navigate to the panel you need.

JamesT_21_6-1690896655184.png

 

What is a build configuration?

The ModusToolbox™ makefile has two default build configurations, Debug and Release. Use the CONFIG variable in the makefile to choose which to use. For example, CONFIG=Debug. Before switching to a new build configuration, Clean the project. This will remove all the folders/files associated with a particular build configuration. Once the project is built with the new build configuration, click Generate Launches in the Quick Panel to regenerate the launch configurations targeting the new build configuration.

In an Eclipse IDE, a build configuration is a collection of all the project properties and build settings. Because ModusToolbox™ uses a makefile to specify build options, changing the Eclipse build configuration has no effect on how the ModusToolbox™ application builds.

Where do I specify compiler symbols and defines?

In the makefile that defines the application. See Running ModusToolbox from the Command Line for detailed documentation. You can also go to a community KBA on how to manage the makefile.

How can I tell if a build was successful?

The easy way is to look in the Problems tab of the console pane. The console window shows any errors, but they can be hard to find in the console log.

JamesT_21_9-1690898539891.png

 

How do I terminate a build?

When you start a build, a progress bar appears in the bottom-right corner of the window. There is a little button to the right.

JamesT_21_10-1690898548742.png

 

Click the button; the Progress tab opens in the Console area. It looks like this.

JamesT_21_11-1690898571607.png

 

Click the red terminate button; the build stops.

Advanced Tip: Some builds are very quick, and every time a build ends, focus shifts back to the Console tab, foiling your attempt to cancel the build. You can change that behavior. Go to Window > Preferences > C/C++ > Build > Console and disable Bring console to top when building (if present). The Progress tab will now keep focus when it's open.

I have an error that a symbol (e.g. bool or uint32_t) could not be resolved. What’s going on and what do I do about it?

The odds are this is a false positive. Other symbols defined in the file are fine, but one shows up as an error. The code builds despite this error.

This is a problem with the Eclipse code indexer. You can force a reindexing of the application. Right-click a project in the project explorer and choose Index > Rebuild. The error may persist, even if you rebuild the index.

It is possible that the file that defines the symbol may not be in the #include hierarchy. This is a real problem. In this case you would see many errors, not just one or two, because every symbol in the header file would be unresolved. Make sure the header is included and the problem goes away.

Program/Debug

What are run and debug configurations?

Each of these is a collection of settings that control how the target is programmed and debugged. A run configuration programs the target and begins execution. A debug configuration does the same, but launches the debugger and (typically) stops execution at the first line of main(). A launch configuration can execute a combination of run and debug configurations.

A ModusToolbox™ project uses these configurations. In the Eclipse IDE for ModusToolbox™, an application typically includes configurations named Attach, Erase, Program, and Debug. For details on how to program or debug, see the “Program and Debug” chapter in the Eclipse IDE for ModusToolbox User Guide.

Where can I view the run and debug configurations?

All the available configurations can be found by clicking Run Configurations or Debug Configurations in the Run menu. You can edit the existing configurations or add new configurations. The easiest option when creating a new configuration is to duplicate an existing one so that some of the common settings can be preserved. To do this, right click on the closest matching existing configuration and then click Duplicate.

JamesT_21_12-1690898661865.png

 

Note: On Windows, after importing an Mbed project, creating a new or opening any existing PyOCD Run/Debug configuration causes the system to hang for 15-30 seconds. This is a known problem with Eclipse PyOCD plugin as it tries to enumerate the connected PyOCD compatible devices. The suggested workaround is to unplug the kit before opening the Eclipse Run/Debug configuration window and reconnecting the kit back once all modifications are complete.

My launch configurations disappeared, what do I do?

This happens when a project gets a new name, either when importing or by renaming. There are two ways to solve this problem.

The easy way: in the Quick Panel, click the Generate Launches command to regenerate launch configurations. This creates a new set of default launch configurations linked to your project.

If you have custom launch configurations, you can re-link the project to existing launch configurations. This is a classic example of well-hidden functionality in the Eclipse IDE. Here’s how to get it done. In the screenshots that follow, we renamed MyCoolApp to MyHelloWorld, so launch configurations vanished.

In the Run menu, choose Debug Configurations. In the dialog, open the Filter menu and uncheck Filter Deleted/Unavailable Projects. This allows you to see the launch configurations for the original project.

JamesT_21_13-1690898698785.png

 

Then open one of the folders in the left column that now contains the formerly-filtered configurations. Select the debug configuration you want to associate with the renamed project. On the right side of the window, click Browse, and then select the project you want to use.

JamesT_21_14-1690898723348.png

 

When you are done, the launch configuration appears in the Quick Panel and is available to your project.

JamesT_21_15-1690898740190.png

 

I copied my project, and now it has two sets of launch configurations. How do I fix that?

In the Eclipse Project Explorer you can copy and paste to duplicate a project. When you do, a bug in Eclipse results in your original project having a duplicate set of launch configurations. The new copy (which is renamed in the process) has none.

To solve the problem with the new copy not having any launch configurations, see My launch configurations disappeared, what do I do? That answer also tells you how to connect the new copy to a custom launch configuration, if you have one.

As for the original project, the duplicate configurations appear in the Quick Panel Launches area. They have the same names, and you cannot easily tell which is which.

The simple solution is to go to the Eclipse workspace folder. Open the <new copy name>/.mtbLaunchConfigs folder. Delete the contents. Problem solved. This will wipe out any custom configuration as well, so be careful if you have one.

You can accomplish the same result using the Eclipse UI, but it is more tedious. In the Eclipse Project Explorer, select the original project (with the duplicate launch configurations). Use Run > Debug Configurations to open the Debug Configurations dialog. Select the Common tab. Select a debug configuration on the left of the dialog, the path to that configuration appears. Delete those configurations that exist in the new copy. Do this for each duplicate – select to find out if it is in the new copy, and delete it when it is. Be aware that this process deletes the launch configuration file in the new copy. So be careful if you have a custom launch configuration that you want to keep.

JamesT_21_16-1690898770064.png

 

How do I start a debug session?

The simple way is to scroll to the Launches section of the Quick Panel. Then click the desired configuration.  See the Program and Debug” chapter in the Eclipse IDE for ModusToolbox User Guide for details.

When I try to program or debug I get a connection error. What do I do?

Sometimes the error is self-explanatory, sometimes not. Here’s a fairly common error where you might need a little help understanding what’s going on.

Error: unable to find CMSIS-DAP device
Error: No Valid JTAG Interface Configured

The most common cause, you don’t have a board connected, or the board doesn’t have power. Connect or power up the board, and you should be fine.

Another error you may see is:

Error: KitProg firmware is out of date, please update to the latest version using fw-loader tool

Many Infineon boards come from the factory with the older KitProg2 installed. ModusToolbox™ does not work with KitProg2. You need to upgrade the communication firmware on the kit to KitProg3, and the fw-loader tool does that.

In a nutshell, the firmware loader is a command line tool that comes with ModusToolbox™ software. You can use it to determine what KitProg is on your kit, and upgrade to KitProg3. You can also go back to KitProg2 if you need to.

The firmware loader tool is installed with the IDE. You can get the latest directly from the Firmware-loader GitHub repository.

How do I step through assembly code?

The ability to do this is not visible in the ModusToolbox perspective. Use the Debug perspective, which has this capability enabled by default. Perspective icons are at the top right of the IDE’s window. If the icon is not visible, use Window > Perspective > Open Perspective.

JamesT_21_17-1690898848986.png

 

Then, in the Debug perspective’s Debug panel, enable the Instruction Stepping Mode button.

JamesT_21_18-1690898861204.png

 

Pro Tip: You can modify the ModusToolbox™ perspective to make this option visible. Use Window > Perspective > Customize Perspective. Click the Action Set Availability tab. Turn on C/C++ Debug. The Instruction Stepping icon now appears in the ModusToolbox™ perspective

I like the Debug perspective better. How do I use it by default when I debug?

Use Window > Preferences > Run/Debug > Perspectives. In that panel, locate the GDB OpenOCD Debugging launcher, and change to the Debug perspective.

JamesT_21_19-1690898906494.png

 

When debugging, how do I see variables, registers, and memory?

All this information appears in various views within the IDE. In the default ModusToolbox™ perspective:

Variables, Expressions, Breakpoints: near the Quick Panel - 

JamesT_21_20-1690898947477.png

Registers: near the Project Explorer -

JamesT_21_21-1690898957894.png

Memory: near the Console -

JamesT_21_22-1690898984644.png

 

If a view is not visible, select Window > Show View, and pick the view that you want. You can drag views to new locations, maximize or minimize, and manage the arrangement of views as you wish.

How do I see local variables?

The Variables view shows local variables. Any variable that is in scope should appear automatically in this view. This view does not and cannot display global variables.

How do I see global variables?

Use the Expressions view to see global variables. You can drag the variable name into this view or click Add new expression and type in the name. You can also use this view to create and evaluate complex expressions.

How do I see Peripheral registers?

The Peripherals view does not contain any peripherals by default because you must provide the path to the device hardware description .SVD file. The .SVD file is part of the PDL library, so it is available to any project that uses the PDL.

1.    Open the Debug Configurations dialog and select the appropriate OpenOCD debug launch configuration.

2.    Select the SVD Path tab and provide path to the .SVD file. The following .SVD files are available in the project folder, with the path libs/psoc6pdl/devices/svd/

· psoc6_01.svd

·  psoc6_02.svd

·  psoc6_03.svd

·  psoc6_04.svd

If you are unsure which SVD file to use, locate the header file specific for your part number in psoc6pdl>devices>include. Find the line of code that includes the general header file for the part. It will be similar to this, #include "psoc6_01_config.h”,  and will include one of these files:

·        psoc6_01_config.h

·        psoc6_02_config.h

·        psoc6_03_config.h

·        psoc6_04_config.h

      Use the corresponding SVD file.

JamesT_21_23-1690899126510.png

 

3. Click Apply and then click Debug. When the debugger halts, notice that the Peripherals view contains various peripherals to select, depending on the application. Select any peripheral and you should be able to see the corresponding registers in the Memory window. You can edit the values of these registers if needed.

JamesT_21_24-1690899154706.png

 

How do I edit the values of the variables?

In the Memory window, add the address of the variable to monitor as shown below:

JamesT_21_25-1690899181523.png

 

Once added, the address of the variable will be rendered and highlighted with its value. You can now edit this value to whatever needed.

JamesT_21_26-1690899198795.png

 

You cannot use this method to edit the addresses corresponding to peripherals. For editing peripheral registers, see How do I see Peripheral registers?

Note: On Linux, the updated values may take some time to render because of an Eclipse bug. There is no workaround available at the moment.

When I start a debug session, an editor window appears that tells me there is a break at an address with no debug information available. But the debug session starts fine. What's going on and what do I do about it?

Here's a typical warning with this "error." The address mentioned will vary.

JamesT_21_27-1690899222742.png


This is the warning that appears when a source file can't be found. Sometimes that's an actual problem, although in this case (the debug session starts fine) it isn't.

You can configure Eclipse preferences to show this warning less frequently. Click the Preferences button in this window. That takes you to the general debug settings panel in Eclipse preferences, as shown below. The default is to show this window all the time.

Enable the Only if source file name is known but not found option. Then the warning appears when, in fact, a source file can't be found.

JamesT_21_28-1690899244045.png

 

When I terminate a debug session, the processor stops. How do I stop debugging but leave the processor running?

In the Debug view, right-click the openocd process, and select Terminate. This shuts down the debug connection and leaves the processor running.

JamesT_21_29-1690899380642.png


You can also select the openocd thread, and then click the Terminate button in the toolbar.

How do I remove terminated debug sessions from the Debug view?

A terminated debug session remains visible in the Debug view.

JamesT_21_30-1690899406292.png


You don't need to do anything. It is removed automatically when you start the next debug session. However, if you want to remove terminated debug sessions manually:

  • Select one or more and press the Delete
  • Right-click and choose Remove All Terminated

How do I start debugging without downloading the executable again?

In Run > Debug Configurations, choose an Attach configuration.

Author: JamesT_21    Version: *O

14190 Views
Comments
JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

If you have a question that isn't answered here, or a suggestion for improving the information, add a comment! I'll see it and act. You can also attract my attention with a ping, like this: jett​.

JoHu_1258451
Level 1
Level 1
First like received

I think it's a great guide that will probably get ripped-off widely

But, the last three images are broken for me, they point to confluence.cypress.com instead of community.cypress.com.

JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

Thanks! I'll fix that. Copy and paste error. I develop this internally and then promote to the community. I copied some images, and they came as links, not images. I'll review and fix.

BTW, glad you like it

MarkA_91
Employee
Employee
25 replies posted 10 replies posted 5 replies posted

Today I tried to do assembler-level debugging. That is, I tried to step through instructions in a disassembly window. But the debugger wouldn't do that, it kept jumping ahead to the next line in the corresponding C file. Any suggestions on how to step through disassembly instructions?

JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

Good question! I think I'll add that to the guide, because like so many things in Eclipse, it is EASY, but only if you know where the cheese is hiding.

There is an "instruction stepping" mode. In the default implementation of the ModusToolbox perspective, that control is not included on the toolbar. So, the task becomes two parts.

1) make it visible

2) click it

Here's the EASY way to make it visible. Switch from the default ModusToolbox perspective to the default Debug perspective. Window > Perspective > Open Perspective > Other,  and then locate and choose Debug.

In the default Debug perspective, the icon is included and looks like this.

InstructionStep.png

When enabled, you are good to go. The disassembly view shows up automagically.

The slightly more complicated way is to modify the toolbar in the ModusToolbox perspective, to make this visible. Then you always have it when starting a debug session.

With the ModusToolbox perspective active, use Window > Perspective > Customize Perspective.

In the dialog, click the Action Set Availability tab. Turn on C/C++ Debug.

TurnOnActionSet.png

The Instruction Stepping icon will now appear in the ModusToolbox perspective. When you start a debug session, click the icon to enable instruction stepping. The Disassembly view shows up automagically, and you are good to go.

NOTE: This saves this preference in THIS WORKSPACE. If you switch to a new workspace, you can use these preferences to set up the new workspace. That's discussed elsewhere in the Survival Guide.

And,  see Assembly Instruction Stepping | MCU on Eclipse for more cool assembly stepping tips and tricks.

JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

I added the assembly instruction stepping information into the document itself, now at Rev *E. Added a couple of tips on how to share applications as well. Have fun folks!

JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

Now at Rev *G, updated for ModusToolbox 1.1, which has a simplified project management experience. I also updated info on debugging (local and global variables) and how to set up dependencies between projects (so one builds when you build another).

JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

Now at Rev *H. I added a link to the KBA on how to start a debug session without downloading a new executable. It's the very last question in the Eclipse Survival Guide, as of today.

JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

Hi everybody! We have updated this document to revision *I for ModusToolbox 2.0. The major changes are:

  • add information about the new application wizard process and Project Creator
  • add information about the new Library Manager
  • remove information that is specific to the older versions of ModusToolbox IDE (quite a bit actually)

In addition, I added a couple of Eclipse-specific questions that came up from feedback, about linked files: what they are, how to link to a file rather than copy it locally into a project.

The IDE is not all that different (it is Eclipse after all). In ModusToolbox 2.0, what we include for software and how you get it has completely changed. If you want a high-level look at how it all works, check out the ModusToolbox Software Overview.

As always, let me know if you see any issues. I already have a few typos lined up for fixing.

Cheers! - Jim

JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

ModusToolbox 2.1 is out the door, so an update for this to Rev *K.  Most ModusToolbox IDE-specific project management info has been removed, and you're pointed to the documentation as the "single source of truth". This is ModusToolbox-specific info, not Eclipse-specific. We're working to make this document, as much as possible, generally useful for any Eclipse IDE. There are still a few ModusToolbox-specific tidbits in here.

For example, how to rename an application has been updated and I added a question on how to deal with launch configurations changing if you rename. These are consistent with changes for ModusToolbox 2.1.

I also updated some very general guidance on using a version control system with an Eclipse IDE.

JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

Hey folks! I try to keep updates here on what changed. The document is pretty stable at this point.

Rev *L made a couple of idiot grammatical level changes, no new information.

Rev *M (current as I type this) added a new question. Someone ran into an Eclipse bug where launch configurations get duplicated. So I addressed how to resolve that issue.

I copied my project, and now it has two sets of launch configurations. How do I fix that?

I have another question in my queue - how to display the content of peripheral registers. This is another "Eclipse is Obscure" issue, which is what this document tries to help with. So stay tuned, that update may happen fairly soon. I need to do a little digging to make sure I find the easiest way to get this done.

Cheers, and thanks for the feedback.