2
\$\begingroup\$

I am aware that is has been looked at / done in the past, but I was wondering if there is anyone who has experience / understands how I could use Visual Studio 2015 Professional to develop mbed code in C/C++. As VS can already handle C++, I think the two main barriers are getting the mbed platform's libraries into and working with VS and getting an ARM enabled build engine.

Mbed now has a range of offline export options, so I wonder if any of those can be utilised? I have downloaded my project as a .zip and added main.cpp to a new blank C++ project in VS, but of course it is riddled with errors and I am not having much luck getting the libraries into the project. All thoughts are much appreciated. Many Thanks.

\$\endgroup\$
3
  • \$\begingroup\$ For one you would need an embed compatible compiler integrated into VS. e.g. visualgdb.com/toolchains/embedded though that isn't free. \$\endgroup\$ Commented Oct 28, 2015 at 18:03
  • \$\begingroup\$ Thanks @TomCarpenter with this linked to VS, how do I manage the libraries and other dependencies? \$\endgroup\$ Commented Oct 28, 2015 at 18:09
  • \$\begingroup\$ No idea. All I know is MSVC++ won't compile for mBed, so you need some other compiler. If you google mBed + gcc embedded you get some results. \$\endgroup\$ Commented Oct 28, 2015 at 18:18

2 Answers 2

3
\$\begingroup\$

There are two things here, one is the compilation itself, and the other is the IDE and debugger. For the compilation, Visual Studio does not have a compiler for ARM Cortex-M, so you're probably best using ARM embedded gcc instead. mbed and mbed OS already support gcc very well. Using Visual Studio as an IDE over ARM embedded gcc is probably doable. First you'd need to make Visual Studio aware of the build system, which is provided by yotta in mbed OS. You may find valinor and pgen useful there. These don't currently support Visual Studio though, so you'd have to implement that in pgen first.

Finally, for debugging, Microsoft recently released MIEngine, an open source plugin that enables Visual Studio to interface to gdb, which should provide most of what you need to get debugging working.

(disclaimer: I work in the mbed team at ARM. If you're interesting in contributing Visual Studio support to mbed (which would be awesome), come and discus with us over at forums.mbed.com and we can provide guidance).

\$\endgroup\$
2
0
\$\begingroup\$

http://visualgdb.com/ IS very good for STM32f24 boards for example It supports debugging the embedded code like a desktop application (no limit for code/ram size)

\$\endgroup\$
2
  • \$\begingroup\$ Have you done this your self, if so, what export did you use from the mbed platform and did it work "out of the box", or did you need to do some manual configuration etc. ? \$\endgroup\$ Commented Dec 4, 2015 at 12:45
  • \$\begingroup\$ VisualGDB automatically installs all necessary tools and code libraries to get your first project working with just a few mouse clicks. It supports STM32, Freescale Kinetis, NXP LPC, TIVA, MSP430, ESP8266 and many other devices. Simply select your device in the wizard, connect the debug probe and you can start stepping through your first project. \$\endgroup\$
    – TraceKira
    Commented Dec 7, 2015 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.