Have you experimented at all with VisualGDB for Visual Studio? It installs a full GCC compilation and GDB debugging setup into Visual Studio and works with J-Link and STLINKv2 debugging. If you haven’t tried this already, I will write something up. It’s $99 for a license but the time and aggravation savings will pay that off in the first day of use. It certainly felt that way for me. Theoretically, you could even include VGDB and TinyCLR projects in the same solution, though I have not tried that.
I installed Ubuntu, and GCC also. But I don’t know how I can compile my c++ code for TinyCLR, and I don’t know what the make file is. Please help me a little bit, because I am very interested in this hybrid solution, but I can not solve this alone.
The question for “how do I build code in GCC using make” requires a long answer and a tutorial is needed. I am sure there are many examples online but we plan on documenting this better. I hear the guys are experimenting with ideas to even automate this for you. Sorry, there is no short answer to your question. The option @mcalsyn pointed out maybe an alternative as well.
If you want to use Linux, the easiest way I’ve found to get make is to use the Windows Subsystem for Linux. Install WSL | Microsoft Learn walks you through getting that setup.
Once you have it working, open the shell for your distro and install make and gcc. There are a few different packages you could choose. If you’re on ubuntu, two choices are build-essentials and make. sudo apt-get install [package] is the command to install a package.
Since the Windows filesystem is available from the Linux shell, you can browse to your folder that has the native code in it, like cd /mnt/c/Users/john/Desktop for example.
@mcalsyn - Based on your experience, would you be willing to share some pros and cons of C/C++ with Visual GDB vs C#/.Net Micro or TinyCLR with Visual Studio? I’d be happy to move this question to a different thread is that would be more appropriate.
Yeah - we can have a longer discussion on another thread. But it’s not an either/or decision. You can have the best of both worlds with native (C/C++) code as a performance/capability enhancer for TInyCLR.
As mentioned above, I’ll do an article that covers TinyCLR augmented with VisualGDB native code (potentially in the same sln file) likely before next Monday (and if I can pull it off ). But if you want to discuss the tradeoffs between native, managed, and hybrid apps, happy to do that on another thread.
I put that aside because Gus did an excellent series on doing it natively in VS without VisualGDB. I haven’t tried those instructions yet, so I don’t know if they are easier or harder in the long-run. VGDB is $99, but I do like the fact that I don’t have to maintain my own tool-chain and all the plumbing.
I’ll consider whipping up some instructions this coming weekend if Gus’s instructions aren’t what you’re looking for.
Thank you, it would be appreciated but only at your convenience. No rush or expectation, I know you are working on an exciting project. I would like to explore VisualGDB, as you pointed out it looks after the tool-chain allowing a focus on the code and hardware. It has been some time since I programmed at that level and I am looking for tutorials, etc. to ease back. I haven’t had the chance to try Gus’s tutorial, it is also on my list. Thanks.