This page is your go-to destination for quick and practical advice across various Tips and Tricks related to STM32CubeIDE.
1. STM32CubeIDE Tips & Tricks
1.1. Authentication issue
If you have encountered an authentication problem while using STM32CubeIDE, do not worry. You simply need to set your connection parameters.
For more details see this link: https://community.st.com/t5/stm32-mcus/how-to-set-the-network-connection-parameters-for-stm32cubeide/ta-p/585694
1.2. Perspectives
1.2.1. Reset perspectives
The user can reset the perspective back to the default configuration using the menu Window > Perspective > Reset Perspective…
1.2.2. Customize perspectives
The user can customize the perspectives using the menu Window > Perspective > Customize Perspective… and choosing which toolbars and menus visibilities and action set and shortcuts availabilities.
1.2.3. Create an own perspective
The user can create a customized perspective after selecting or moving some views and using the menu Window > Perspective > Save Perspective As…, and then choosing a name to save it.
A quick-access menu is available to search for views, menus, and preferences by clicking on the magnifying glass at the top right and type the name of the view on the dialog.
1.4. Key bindings
Select the menu Window > Preferences then select the category General > Keys
Choose between three different key binding schemes: Eclipse®, GNU Emacs, Microsoft Visual Studio®.
Use the search filter to find a command and learn or configure its specific key binding.
For example, use Ctrl+B to Build All:
1.5. Shortcuts
1.5.1. Shortcuts to debug
Use shortcuts to run, debug and control code execution.
- CTRL+F11 to run the last application launched.
- F11 to debug the last application launched.
- F5 to step into.
- F6 to step over, i.e. go to next line.
- F7 to step return to caller.
- F8 to resume until next breakpoint.
1.5.2. Shortcuts to code
Use shortcuts to code.
- CTRL+SPACE to auto complete.
- CTRL+H to search workspace resources with useful filters.
- ALT+SHIFT+A to select blocks. It is very useful to modify several lines at a time. For example, change all selected vars from uint32_t to uint16_t.
- CTRL+O to open the quick outline. Useful for content navigation in file.
- CTRL+SHIFT+R to open resources.
- CTRL+SHIFT+T to open elements.
1.6. Dark theme
The dark theme is a very popular preference. A restart is needed for the theme change to come into effect. Select the menu Window > Preferences then select the category General > Appearance and turn the theme to dark.
1.7. Workspace path
STM32CubeIDE is always launched inside a workspace. A workspace contains projects. It is easy to open a file explorer inside the workspace folder. Select a project inside the Project Explorer, click right to open the menu and then select Properties.
1.8. Link with editor
To know where a file is located, activate the link with editor feature. By default, this feature is toggled off. The link with editor feature is very convenient to find a file inside a large folder hierarchy. It is recommended to toggle it on only when needed.
1.9. Task tags
Define your own task tags to keep track of your selections. Select the menu Window > Preferences then select the category C/C++ > Task Tags and click on the New button. Enter a tag name and a priority (High/Normal/Low). Tags may contain any character string.
Add several tags into the code. Open the Tasks view: Window > Show views > Tasks to have access and to navigate it your list of tags.
1.10. Code templates
To simplify and standardize the source files, the usage of code templates is very useful. Select the menu File > New > Source File' and select the template or configure a new default template or modify an existing one by clicking on ""Configure…"".
1.11. Include browser
Open the Include Browser view with the menu Window > Show View > Include Browser to visualize the include dependencies between files. Drag and drop a file into the view.
1.12. Eclipse Marketplace
The Eclipse Marketplace is an interface for browsing and installing some additional tools or features. Open the menu Help > Eclipse Marketplace. Search for a keyword. For example, enter egit for the related solutions available in the marketplace.