
|
SystemWorkbench for STM32
Known errors and various questions
|
See below some known errors and the solution or the workaround.
Why did the IDE complains that SysTick_IRQn can't be resolved when my project compile cleanly?
The problem is due to the fact that, in the HAL files, this symbol (and others) are defined by a lot of files (one per supported MCU), only one of them being effectively used in the project (the one describing the MCU selected).
When trying to resolve this symbol (to be able to display its value) System Workbench then do not know which one to choose, as these files content are not conditionnaly compiled; the file is rather conditionnaly included by other files.
Thus this symbol cannot be resolved, not because the indexer do not find it, but because it find too many versions of this symbol, in several files...
To solve this error, request that System Workbench do not parse files that are not used by the project, by opening the indexer properties dialog (project > Properties > C/C++ General > Indexer) then check the Enable project specific settings checkbox and uncheck the Index unused headers checkbox.
Suppress also indexing of unused headers for all projects that do not have project-specific indexer settings by modifying the workspace settings at Window > Preferences > C/C++ > Indexer.
Note that when the user creates projects using the System Workbench for STM32 wizard, this option is automatically set for the firmware library projects; however CubeMX currently do not set it in its generated projects.
Why do I have a VFP register error while building my project?
The project probably has been created which use a static library. If an error like "error: ./source.o uses VFP register arguments, myproject.elf does not" is displayed, it means that the project and the static library have not been built with the same floating-point options (-mfloat-abi and -mfpu).
Please, ensure the build options between the executable project and the libraries are consistent in Properties > C/C++ Build > Settings > Tools Settings > MCU Settings.
Why can't I connect to the board, with error "Error in final launch sequence / Failed to execute MI command: / -target-select remote localhost:3333"?
If this error happens, first check the USB cable; some cables, like those delivered with some USB chargers, will only transfer power, but not data.
Open the Windows device manager; if the cable is correct, see if the board appears as a STLink dongle (under Universal Serial Bus devices).
Depending on the board (Nucleo boards as well as recent disco or eval boards) a Mbed Microcontroller device appear under Disk Drives
If any of these don't be seen, try another cable, as this may be the problem.
I can't access the ST-Link dongle from System Workbench for STM32
If libusb-win32 (libusb-0.1) is installed on the PC, a Windows driver for the ST-Link debug interface may be installed .
In this case the ST-Link utilities and OpenOCD in System Workbench will not be able to access the device, as they use libusb-1.0, that can only work on unclaimed USB devices (devices for which there is no Windows driver attached).
In this case this Windows driver must be uninstalled by following the instructions in the entry How to uninstall a third-party driver using the ST-Link dongle below.
How to uninstall a third-party driver using the ST-Link dongle?
In some cases it is not possible to access an ST-Link dongle from System Workbench for STM32, due to an error when starting openocd, like for example:
- Error: 176 1031 libusb1_common.c:67 jtag_libusb_open(): libusb_open() failed with LIBUSB_ERROR_ACCESS
- Error: 177 1031 stlink_usb.c:1601 stlink_usb_open(): open failed
This is usually due to some third-party driver (for example installed by libusb-win32) being installed on the device.
To uninstall it:
- Ensures the ST-Link debug interface is plugged on the PC
- Start the Device Manager (right click on the computer then select "Manage" then "Device Manager")
- Search for the "STMicroelectronics ST-Link dongle" device (it should be in the libusb-xxx category)
- Uninstall the device, checking the "Suppress the driver for this device" box
- Unplug the ST-Link debug interface
- Download and install the ST-Link driver if needed
- Plug the St-Link debug interface
Now, in the Device manager, the STMicroelectronics ST-Link dongle should again appear, but in category Universal Serial Bus devices or USB controller
Why does the IDE freeze when accessing to the build settings (Properties > C/C++ Build > Setting) on Linux ?
This is a known troubleshooting Eclipse bug with the graphical library on Linux distribution (Ubuntu, Mint...).
Eclipse is running with GTK3 by default. To force, Eclipse to use the older GTK2 version, an environment variable must be set to SWT_GTK3=0 before running Eclipse.
I installed System Workbench for STM32 on Fedora 64bit version, but I can't compile any project.
Most compiler tools are 32 bit programs; check =the 32 bit C library is installed.
On recent Fedora distribution, this is in the libc.i686 package, so it should be installed, for example by dnf install glibc.i686 or using the favorite package installation system.
Why System Workbench proposes to load firmware in a library project?
When the firmware is placed in a library project, it is compiled independently of the application, then linked with the application. This setup informs the linker of what code is really required (the application) and what code should only be included when used by some "required" code. This selection can then be done on a function by function level on the external static library.
On the opposite, if the code is included from the firmware into the application project, then all the code from the firmware will be included in the final object code, as the linked does not know how to choose what is really needed.
Note that if the user develops middleware code, he should also deploy it as a static library, so that only the relevant part of the code (at function granularity) is included in the final system.
Why is there an error "Program "arm-none-eabi-gcc" not found in PATH" while my project can be built?
When creating the project, the low-level drivers as static library has been probably selected to import it. This error does not really exists and should not affect the usage. This is a known bug, we are working on it not to display the error message.
If it's an inconvenient, remove this message. Go to the Problems view (Windows > Show views > Problems) then select the errors and delete them. Unlike real problems, these errors won't appear again. The error could also disappear when System Workbench is restarted.
How can I import a project created by STM32CubeMX (Micro Explorer)?
Basically there is currently three possibilities:
- Importing the CubeMX-generated project in an existing workspace without copying it; the code will then remain in the generation directory, out of the workspace
- Direct CubeMX to generate code in the workspace, then import the project from there
- Select the base directory where CubeMX generated the source code as the workspace when starting System Workbench for STM32, then import the project; the workspace will then include only this project
In all cases CubeMX may be used to re-generate code and will keep the modifications if they are placed between the code generation "User Code begin/end" comments.
It is usually advisable to use one of the first two possibilities, as the third one will impair the ability to place the generated code under source-code-management systems like GIT or SVN.
Detailed instructions are provided in the System Workbench for STM32 documentation at Importing a STCubeMX generated project
I got plenty of "could not be resolved" errors in a newly created/imported project
These errors are sometimes reported by eclipse when it access some source file before its index was fully built. To solve this rebuild the index by right-clicking on the project (or any file in the project) in the Project Explorer then selecting Index > Rebuild. Then, if they do not disapear automatically after a while, delete the errors (in the Problems view) and they should no more appear.
For more information about C/C++ development tools in Eclipse, please see C/C++ Development User Guide.