Loading...
 
Skip to main content

System Workbench for STM32


[Beginner] OSX SystemWorkbench won't lauch compiled program on console

Hello everyone,

I'm beginning with system workbench. Currently, I'm just trying to compile&run C programs on my computer (Mac OS X El Capitan).

Build works, launching the binary file produced from the terminal also works.

But when I try to lauch the binary directly from eclipse, using either RightClickOnBinary>Run As>Local C/C++ Application or the green button on the toolbar, nothing happens.

I've included a screenshot of the "right click" menu I'm using :
Image

I don't know what I have done wrong. Any help will be strongly appreciated !

Thanks in advance.

Hi,

It seems that you migh confuse Local application with STM32 application , the 1st aims to launch your app on the local host (your Mac), the 2nd on your STM32 board. Hence I would suggest you to use Run As (or Debug As) > Ac6 STM32 C/C++ Application.

The difference between Run As and Debug As is that in debug your program will break on the main() function, or somewhere else you put breakpoints, and you can check step by step its execution.

Hope this help.

Hello jLn_38,

First of all, thanks for the reply.

I may not have been clear enough in my fordt post.
I was actually trying to target my Mac, not the STM board. This will come after …

Maybe it is an issue with Eclipse, or a setting in MacOS, but as a beginner I really don't know what to do.

Just did a simple try on my side, based on "Hello World ANSI C Project" project type with "MacOSX GCC" toolchain.
Build and Run work perfectly, but no way with Debug.

Image

This OSX toolchain requires XCode to be installed, here my output of "gcc --version" from the Mac Terminal

Copy to clipboard
$ gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1 Apple LLVM version 8.0.0 (clang-800.0.38) Target: x86_64-apple-darwin15.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin


Debug can't work as gdb is not part of XCode, but some tips are available on the Web to get it functionnal.