Loading...
 
Skip to main content

System Workbench for STM32


Re: SW4STM32 or CubeMX to init STM32 device

Hi,

I wanted to jump on this thread because I feel like I'm missing something important and hope someone can help me out:

I downloaded STM32CubeMX and spent a while with its fancy and actually helpful GUI setting up my particular environment: chip, timers, clock, peripherals, and so on. I selected "SW4STM32" as my IDE, and hit Generate Code and it generated a significant amount of stuff: 23MB of stuff to be exact; 546 files in 71 folders of C code, header files, eclipse metatdata, etc. This got me pretty excited.

But when I go to System Workbench, I can't figure out how to cleanly pull it in. Things I've tried:

1) Creating a new workspace in the folder that CubeMX created
2) Creating a new project with Cube HAL
3) Creating a new project with no init code, then importing the CubeMX directory as an existing project

I feel like #3 got me the closest, but what it did is created a directory structure, claimed to import the source files (but didn't), and I get a source tree that looks complete except that none of the files exist (in the Project Explorer I can see all of the files, each with a little exclamation point because the directory exists but is empty), and the directory layout is different than what CubeMX actually created. There's also a list of Includes that almost, but doesn't quite, correspond to what System Workbench would have created if it actually copied the source files over (the overall directory structure looks right except that it's missing a chunk out of the middle; e.g. a directory says "D:/sw/sw4stm32/Drivers/STM32F4xx_HAL_Driver/Inc" but should be "D:/sw/sw4stm32/workspace/cubemx project name/Drivers/STM32F4xx_HAL_Driver/Inc").

It's incredibly frustrating that it gets this close without actually working. I feel like given half a day of no distractions, I could manually copy things and correct the locations of all of these files and directories but I'm hoping that I just failed at googling this and there's really a simple explanation as to how to make the two applications play nice with each other. The fact that CubeMX lists SW4STM32 as a compatible development environment leads me to believe that it's possible I'm just not following the instructions somewhere.


Any hints?

Thanks,
--
Elliott

 
Collapse/expand modules below