Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world.
And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download two short videos (registration required) highlighting:

System Workbench for STM32


Issues Installing System Workbench for STM32 from Eclipse

Over the past few years I’ve been using the System Workbench for STM32 with little to no problems. About a month ago, I tried running some code on an F4 dev board. Strangely enough, nothing seemed to happen. When I attempted to debug, I was hit with an error from OpenOCD. I initially thought I must’ve deleted/moved some important files unknowingly, so I tried reinstalling Eclipse + STM32 software. With this setup, I couldn’t even build a project generated by CubeMX, let alone debug it (building an existing project works, but again cannot debug. I possibly just don’t know how to use the newer versions of cube).
Fast forward to today, I’ve gotten so frustrated downloading, installing, uninstalling, and reinstalling various combinations of software, I decided to completely reinstall Windows on my machine and start from scratch.


What I Did

If that fixed it, I obviously wouldn’t be making this post. At this point, I can only assume that I’m just missing some step in setting this up, so starting from this point, I’ll explicitly list the steps I took to get this running.

  1. Installed Windows 10, and update to current version (as of writing, version 1909)
  2. Installed JDK verion 13.0.1 (link now dead)
  3. Installed Eclipse 2019-12
    1. Downloaded the installer found hereQuestion
    2. After launching the installer, I selected “Eclipse IDE for C/C++ Developers”, selected JDK 13.0.1, and saved to directory D:\Documents\Programming\eclipseC++\program
  4. Installed System Workbench for STM32 from Eclipse
    1. Went to Help -> Install new Software... -> Add
    2. Set ‘Name:’ as ‘System Workbench for STM32 - Bare Machine edition’, set ‘Location:’ as ‘http://ac6-tools.com/Eclipse-updates/org.openstm32.system-workbench.update-site-v2’
    3. Selected and installed ‘External Tools,’ ‘OpenSTM32 Tools,’ and ‘STM32-Copro-MPU’
    4. After installing, I restarted Eclipse when Prompted
  5. Installed ST-Link Driver v009
    1. Downloaded from hereQuestion
    2. Ran stlink_winusb_install.bat
  6. Installed STM32CubeMX 5.5.0
    1. Downloaded from hereQuestion
    2. Ran SetupSTM32CubeMX-5.5.0.exe
  7. Made a project
    1. File -> New Project -> STM32F446RE, downloaded firmware when prompted
    2. Under Project Manager
      1. Project Name: Test
      2. Project Location: D:\Documents\Programming\eclipseC++\projects
      3. Toolchain / IDE: SW4STM32
    3. Generate Code
  8. Once generated, I opened Eclipse and imported the new project



The Problems:

After step 4.4, I get this error upon opening Eclipse:
 ’Initializing External-tools’ has encountered a problem.
 An internal error occurred during: “Initializing External-tools”.
 java.lang.ExceptionInInitializerError


Building my new project after step 8, I get this error:
     C:\Users\aatca\AppData\Local\Temp\ccH0jd0c.s: Assembler messages:
     C:\Users\aatca\AppData\Local\Temp\ccH0jd0c.s:295: Error: selected processor does not support `dsb 0xF’ in Thumb mode
     C:\Users\aatca\AppData\Local\Temp\ccH0jd0c.s:306: Error: selected processor does not support `isb 0xF’ in Thumb mode
     C:\Users\aatca\AppData\Local\Temp\ccH0jd0c.s:350: Error: selected processor does not support `dsb 0xF’ in Thumb mode
     C:\Users\aatca\AppData\Local\Temp\ccH0jd0c.s:371: Error: selected processor does not support `dsb 0xF’ in Thumb mode
     C:\Users\aatca\AppData\Local\Temp\ccH0jd0c.s:492: Error: selected processor does not support `dmb 0xF’ in Thumb mode
     C:\Users\aatca\AppData\Local\Temp\ccH0jd0c.s:555: Error: selected processor does not support `dsb 0xF’ in Thumb mode
     C:\Users\aatca\AppData\Local\Temp\ccH0jd0c.s:566: Error: selected processor does not support `isb 0xF’ in Thumb mode
     Drivers/STM32F4xx_HAL_Driver/Src/subdir.mk:60: recipe for target ‘Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o’ failed
     make: *** Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o Error 1
     ”make all” terminated with exit code 2. Build might be incomplete.


Compiling an existing project works fine. Running it gives this error:
     An error has occurred. See error log for more details.
     Could not initialize class fr.ac6.mcu.externaltools.stlinkserver.win32.WinRegistry
This also occurs when opening its Debug Configurations.

The error log contains:
     java.lang.NoClassDefFoundError: Could not initialize class fr.ac6.mcu.externaltools.stlinkserver.win32.WinRegistry
     


After changing some things I unfortunately no longer remember, running existing projects now gives this error:
     Wrong device detected
     Open On-Chip Debugger 0.10.0+dev-00021-g524e8c8 (2019-04-12-08:48)
     Licensed under GNU GPL v2
     For bug reports, read http://openocd.org/doc/doxygen/bugs.htmlQuestion
     srst_only separate srst_nogate srst_open_drain connect_assert_srst
     Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
     adapter speed: 12000 kHz
     adapter_nsrst_delay: 100
     Info : clock speed 12000 kHz
     Info : STLINK v2.1 JTAG v30 API v2 M19 VID 0x0483 PID 0x374B
     Info : using stlink api v2
     Info : Target voltage: 3.269862
     Error: init mode failed (unable to connect to the target)
     in procedure ‘program’
     in procedure ‘init’ called at file “embedded:startup.tcl”, line 495
     in procedure ‘ocd_bouncer’
     ** OpenOCD init failed **
     shutdown command invoked


Creating a project from scratch:

  1. File -> New -> C/C++ Project -> C Managed Build
  2. Project name “Test2”, Executable Ac6 STM32 MCU Project -> Next
  3. Board NUCLEO-F446RE -> Next

When I select “Hardware Abstraction Layer (Cube HAL)”, I get the warning:
     Target firmware has not been found locally, please install it !
After clicking “Download target firmware” and accepting the agreement, the message “Look for locally installed firmware” is displayed for a few seconds, then it goes back to the same screen.
Clicking “Firmware Installation,” firmware repositiories in “C:\Users\aatca\AppData\Roaming\Ac6\SW4STM32\firmwares” and “C:\Users\aatca\STM32\Repository” are listed. In the AppData repo, there are only empty temp files (generated from clicking “Download target firmware”). In the other, I find a “STM32Cube_FW_F4_V1.24.2” directory with what I assume to be the required firmware.


Using SW4STM32 directly:
After downloading and running the latest installer for SW4STM32 hereQuestion, running that version of eclipse gives this error on startup:
     ’Initializing GNU ARM GCC Compiler...’ has encountered a problem.
     Failed to extract ‘C:\Program Files\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.arm-none.win32_1.17.0.201812190825\tools\st-gnu-arm-gcc-7-2018-q2-update_gdb-5_4-2016q3-win32.zip’ to ‘C:\Program Files\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.arm-none.win32_1.17.0.201812190825\tools\compiler’
I get about a dozen of these if I try to do anything with projects (i.e. build project, check properties, etc.).



Further notes:

  • I’ve tried on multiple F4s, all with the same problem, so faulty hardware isn’t an issue.
  • The section in Properties -> C/C++ Build -> Settings are organized completely differently between existing vs newly generated projects, so I cannot directly compare what I could change there to make building work.
  • New projects do not show up under Debug Configurations, and I’m not sure how to add them.



Any insights as to what I’m missing would be greatly appreciated, as I’ve tried all I could thing of doing, and am completely stuck.