Suggestion: Setup Guides C++ for CubeIDE and PlatformIO

Just a thought - in addition to the make-based C++ setup found in the wiki it would be lovely to have setup tutorials for the STM Cube IDE

and PlatformIO

I think it would help us and others to move from Arduino to C++. From Arduino to C++, the “heart” of the programs doesn’t look that different - it would be easy to make the switch if the setup in an IDE was there.

2 Likes

Oooh just found this at PlatformIO!

https://docs.platformio.org/en/latest/boards/ststm32/electrosmith_daisy.html

Will give it a whirl!

1 Like

There’s another thread where a bunch of people have tried to get this working:

Doesn’t seem like anyone succeeded getting it to compile directly in the IDE yet though.

1 Like

@pigatron awesome thank you. Had not read that because I’m on Windows. It seems I need to update my STM boards to include electrosmith_daisy (hope 7.1.1 will do the trick) before I can create any new projects.

Correct you are, but I’m SO CLOSE! My hunch is that something with the PlatformIO config isn’t quite right. I can create a new PIO project with the seed, get VS Code to play nicely with the libs, but when attempting to build/debug, things fall apart. Full details in that thread, would absolutely love a few more eyes on it.

The dream is to get PlatformIO, VS Code, and a SEGGER J-LINK hardware debugger all playing nicely.

1 Like

@flavius Using PlatformIO on Atom, I’ve gotten as far as creating a new project for Daisy (Platform: STM Cube IDE) and then failing to compile it.

(I tried to compile Blink from the Daisy Examples)

I can get DaisySP, libDaisy and the FatFs library to connect, but Platformio really doesn’t seem to like how the STM32 USB Devices library is structured (.h files in inc folders, .cpp in src folders).

The only way I can get the compiler to find the USB Device files is to throw them all into the main src folder … then I start to get errors about Constants in that library being undefined.

So this library is currently giving me some grief. I’ll pick up there another day, it seems indeed somewhat close to working.

Meanwhile I have the Arduino Environment set up and working and had fun trying the existing examples.

Hi, I’ve spent a few (too many) days on STM32CubeIDE. Tried Platformio as I’d had success with that for AVR but seemed to be too many hidden issues. On the IDE I thought I was near to getting the whole suite to build only to gain another basket of errors once one sorted. I found various C files using namespace which was easily solved by renaming CPP. FatFs a bit more fiddly. Set a few flags for ARM MCU and FPU to allow arm_math to compile. USB, couldn’t link. I made the mistake of touching the configuration tool to try to get the USB Middleware to link but that altered so many files I was back at square one. Clearly the tool isn’t needed to set up MCU as the library and examples do work via plain GCC toolchain.

Now I’m trying to build libraries as ‘libraries’ and then link in to my source. The plan lib and DSPlib compiled without errors into archives but not had time to see if they can be used.

I’m on Catalina which was one reason for going this route so I had a way of doing SWD flashing. I have got that to work via IDE using clone STLink dongle after updating its firmware on a (work) PC - Catalina stops a few STM tools from working but seemingly IDE can be tweaked through malware detection system.