STM32-CoPro-MPU is a plugin of System Workbench for STM32 addressing STM32MP1 MPU Family and focusing on its integrated MCU, ARM® Cortex®-M based.
This plugin is part of STMicroelectronics STM32 MPU EcoSystem as described at STMicroelectronics STM32 MPU.
The following features are included in STM32-CoPro-MPU:
- Mcu Project creation for STM32MP1 Familly
- Coding and development by using usual source editors
- Build the Mcu application from the standard Eclipse build mechanism
- Debug the Mcu application in Engineering or Production modes
- Mpu target management via dedicated Target Status Widget and Console Icon
- Import of STM32MP1 project generated by STM32CubeMX
Specific help is available on Eclipse: Help => Help Contents, STM32 MCU USer Guide => Micro Processor Unit (MPU) Family - MCU support.
STM32-CoPro-MPU plugin is available in Linux and Windows 64bits all-in-one from version 2.8.0.
Note that updating a previous version of System Workbench for STM32 via Check for Updates will NOT install this new plugin.
Prefer Install New Software... from Ac6 update site, selecting STM32-CoPro-MPU category.
Creating and building a new project
Creating a new project is done selecting a device in STM32MP1 Family; for this STM32 Family no firmware is provided.
Creating a custom board is possible, SWD is supported.
Configuring build settings and building have nothing specific.
Mpu Target Management
STM32MP1 target can boot in two modes:
- in Engineering Boot mode giving access to Cortex-M via SWD just like standard Mcu
- in Normal Boot mode from various boot devices, typically booting from SD-Card a Linux Kernel.
Please visit STM32 MPU Wiki for more details on boot modes.
The Engineering Boot allows to directly debug the ARM® Cortex®-M without taking care of ARM ®Cortex®-A side, this appears as Engineering Mode in ST’s STM32 MPU Debugging dedicated Debug Configuration.
The Normal Boot is used when debugging in Production Mode; ARM® Cortex®-M firmware is loaded and started from Linux on ARM ®Cortex®-A. For this Debug Mode, the Mpu target must run Linux and be network connected via Ethernet connector or Ethernet-over-USB.
Before using Production Mode it is important to know the status of the Mpu target.
Target Status Widget
This widget probes into found ST Virtual COM Port console to display Mpu target status:
- no target seen from console
- Linux console seen
- target answering to IP address
Discovered IP address is used when creating / updating Debug Configuration in Production Mode, it can be copied.
Opening a console via Console Icon is stopping the widget probe & the IP address update.
Console IconA new Icon
This console is typically the Linux console when Linux is booted on Mpu target, but it can also be used for ARM® Cortex®-M debug purpose in Engineering Mode.
Creating Mpu debug configuration
Creating debug configuration for STM32MP1 Family is made thanks to a dedicated Debug Configuration which follows the same approach but takes into account specificity: on STM32MP1 Family, ARM® Cortex®-A typically runs Linux and ARM® Cortex®-M is seen as a co-processor.
- The “Production Mode” is proposed to debug with a download via network to ARM® Cortex®-A Linux which loads & starts the ARM® Cortex®-M image.
- The “Engineering Mode” is targeting ARM® Cortex®-M preliminary debug, directly loading image via JTAG/SWD to internal memory.
To create a debug configuration, use the following procedure:
Within the Project Explorer, right-click on the project name and select Debug as > Debug Configurations.... from the menu.
Double left-click on ST’s STM32 MPU Debugging to create a new Debug Configuration. Its name (“Simple_Project Debug” in this example) and the path to the executable are provided by the project.
Engineering Mode & Production Mode
In Startup tab, a check box allows to choose in between Engineering Mode & Production Mode.
For Engineering Mode debug, Mpu target is booted in Engineering Mode.
The Production Mode requires the STM32MP1 target to run Linux and accessible through network: IP address is discovered by the Target Status Widget.
Debugging a Mcu project on STM32MP1
Debugging a project in Engineering Mode with STM32MP1 is very similar to standard STM32 MCU.
The Debug in Production Mode adds the cortex-M firmware transfer to the embedded Linux. This means also in case of network usage some specific pop-up appearing:
- the SSH Password is to complete: the default one is root.
- the RSA key is to be approved.
Importing a STM32CubeMX generated project
The STM32MP1 Family is supported in STM32CubeMX from version 5.1.0 selecting MPU.
So from this release, Importing a STCubeMX generated project is possible.
Please refer to ST Wiki Article Develop on Arm® Cortex®-M4 for more information.