XC8 Compiler setup on CLion for PIC Development - clion

I am new to the embedded systems development space.
My problem is I can't find a way to setup my CLion for development with the XC8 compiler on the PIC16f1779. I have limited knowledge on compilers and CMake also its my first time using C/C++.
The IntelliJ IDE is amazing and I would love to use CLion instead of MPLab X IDE for development.
The school I am at use MPLAB for teaching but its just terrible.
I am using Mac M1 and I am trying to migrate development from MPlab to CLion.
Any help would be appreciated
I have already tried to configure another compiler as XC8 but don't know what exactly to change in the toolchain config in CLion.

As you being a newbie, I strongly recommend that you stick with MPLAB X IDE. Creating PIC projects in other IDEs really require a good knowledge of make build system. Also you will need to integrate the debugger bridge (it is MDB in your case) in order to debug your programs within the IDE.
In my case I tried to develop an existing project both in KDevelop IDE and Eclipse CDT IDE using the make files generated by MPLAB X IDE. Eventually I managed to get the both IDEs compiling the code. But I couldn't go further and integrate symbol recognition and debug bridge.
As a matter of fact the Microchip provides the IDEs as open source for those who want to integrate them into their desired environment. However as I said before, it requires a good knowledge to be able to manage and integrate all those apps in one environment.
If you are interested to learn more about the open source SDK of Microchip go ahead and have a look at ---> openSource4Pic.
But as per my experience on developing application for PIC micros, you will get the best experience in MPLAB X since it is well integrated and featured nearly all needed tools.

Related

Setting up QtCreator cross compiler for ARM on Windows

I need to develop Qt and command line software for the BeagleBone Black and Raspberry Pi-2. Ideally I wish to use QtCreator as I am accustomed to it, but in any case I need to use QtDesigner for GUI work.
I have spent days trawling through articles, going around in circles and getting nowhere.
The Raspberry Pi-2 has Raspbian/Jessie installed together with Qt 5.2.3. I can design, compile and run Qt desktop applications on this. Of course compilation is slow and not really usable for development work.
To try and keep matters simple, I downloaded qt-opensource-windows-x86-android-5.3.2.exe and installed that on my Windows 7 (64-bit) system. My belief is that this Qt install is the same version as the Qt on the Pi-2 and already contains the ARM7 library files required for cross-compiling. All that should be needed is a cross-compiler for Windows/ARM?
Windows/QtCreator complained in Tools > Options > Qt Versions about the Qt 5.3 for Android armv7 stating "No compiler can produce code for this Qt version...".
For a Windows/ARM cross-compiler I downloaded and installed Yagarto (yagarto-bu-2.23.1_gcc-4.7.2-c-c++_nl-1.20.0_gdb-7.5.1_eabi_20121222.exe). I figured I then just need to set the QtCreator compiler path in Tools > Options > Compilers and then things would start working. This is not the case.
Clearly I am missing something important and have managed to become confused by the number of not-quite-relevant articles I have read.
Is Yagarto the cross-compiler I need in this situation?
How do I define the compiler in QtCreator and get rid of the error?
Is there an easier way to set-up this stuff?
Thank you.
Details:
QtCreator 3.2.1 (Qt 5.3.2)
Windows 7 64-bit service pack 1
Edit:
I have just tried again using the GCC ARM Embedded ToolChain and GNU Make for Windows. The result is the same in that I cannot seem to configure the settings for QtCreator ARM7 and make it happy.

Cuda compilation issue in Visual Studio

I have to port a crowd simulation application onto GPU using CUDA. For that I have this work done by Simon Boots who has ported C++ opensteer library onto CUDA successfully. But I am unable to run the CUDA version on my PC. I am attaching the link for the CUDA code but when i run it on visual studio it does not show any cuda files in solution explorer. Instead it runs the CPU version. Thanks.
Code link:
https://github.com/simonboots/OpenSteerCUDA
In short, my question is, help me compile this CUDA code. I need to use it for my learning. I am still a beginner. thanks.
Try looking for a tutorial or ReadMe that describes how to do what you are trying to do. There is probably a Preprocessor flag (#define) or script that you need to enable to tell the compiler to build the GPU version.

What prevent Cocotron to be crosscompiled on Visual Studio instead of Mac OS X?

Seems like Cocotron is a good choice:
http://macdaddyworld.com/2008/10/27/adventures-in-cocotron/
But crosscompilation is on Mac / XCode. What prevents to be able to do the other way round ?
Update: just stumbled upon this news When would Visual Studio for Mac OS X /Objective C finally released as announced by Steve Ballmer?
I guess it is technically possible but out of Cocotron's scope. Cocotron works by having code developed for the Mac be compiled targeting Windows. As Apple don't provide SDKs and cross-compilers for Windows, the Cocotron project is writing another SDK whose API is compatible with Apple's and uses underlying Windows (or Linux, or Solaris) and auxiliary APIs as needed. The project also provides the cross-compilation toolchain.
Notice that the original intent of Cocotron is to provide a way for Mac developers to target their projects at Windows and/or some other Unix-based operating systems.
You want it the other way around. As such, someone would have to provide a suitable cross-compiler toolchain and somehow tell Visual Studio to use that, and link against Cocotron. I can see this happening in two ways: either Windows developers make the effort of adapting toolchains/Cocotron to Visual Studio, or Chris Lloyd is hired to do it. You can always ask him. ;-)
Also, I'm not sure if nib loading works in Cocotron but if (or when) it does, Windows developers would probably want a UI design tool similar to Interface Builder.

How to start Qt development on Windows, but targeting Maemo 5?

I've recently heard about Qt and read about how fun it is to develop with. By the way, I'm also buying a Nokia N900 and I heard that its operating system, Maemo 5, supports Qt quite nicely, so I thought I'll give it a shot.
I'm a .NET developer, so I'd prefer to develop on Windows, and if it is possible, using Visual Studio.
I downloaded the latest Qt SDK. I started up the Qt Creator and created a simple "Qt4 Gui Application". It was working fine, however, I couldn't find any options to compile for Maemo 5 anywhere.
Then, I downloaded the Visual Studio plugin and tried to create a "Qt Application" with that, however, no matter which Qt project type I chose, after clicking the OK button, the dialog just kept popping up again, so it couldn't create anything.
I also read about the Maemo 5 SDK, however, it only seems to work on Linux. (Every walkthrough for Windows started with setting up a virtual machine with Linux.) However, I'm not experienced with Linux at all, so I'd prefer to stay on Windows.
So my question is: is it possible to create Qt applications that will run on Maemo 5 while developing on Windows, or this is impossible?
Thank you in advance for any answers.
EDIT (Solution):
Since the time I started this question, a very nice development tool, the Nokia Qt SDK solves this problem very well. It is cross-platform and can be used to develop Symbian and Maemo apps alike. For the Maemo toolchain, it uses MADDE, which is exactly the tool recommended by the answer. (Note that it is no longer a technical preview anymore.)
Here is a very nice introduction video about the Nokia Qt SDK.
I would suggest getting used to Linux; after all, Maemo (or MeeGo, now) is really Linux underneath, and the official SDK is the Linux-based scratchbox.
That being said, there exists an unofficial community project MADDE:
This is a TECHNICAL PREVIEW of a new development tool for Maemo. MADDE stands for Maemo Application Development and Debugging Environment and offers the following features:
Command-line cross-compiling
Multi-platform support (Linux (32-bit/64-bit), Windows, Mac OS X)
Configurable for different targets & toolchains
Client for the device to simplify the development process
Simplicity
You are welcome to test the tool in your development process. But keep in mind that this is a technical preview. We highly appreciate your feedback in talk, the developer list and especially in bugzilla (Developer Platform -> MADDE).

What's the best setup for Mono development on Windows? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed last year.
Improve this question
I started trying to play with Mono, mostly for fun at the moment. I first tried to use the Visual Studio plugin that will convert a csproj into a makefile, but there seemed to be no version available for Visual Studio 2005. I also read about the MonoDevelop IDE, which sounded nice. Unfortunately, there's no pre-fab Windows package for it. I tried to follow some instructions to build it by combining dependencies from other semi-related installs. It didn't work, but that's probably because I'm a Windows-oriented guy and can barely spell "makefile".
So, my question is this: What's the lowest-energy way to get up and running to try some Mono-based development on Windows?
I'd recommend getting VMWare Player and using the free Mono development platform image that is provided on the website.
Download Mono
Setup time for this will be minimal, and it will also allow you to get your code working in .NET and then focus on porting issues without a massive hassle of switching machines and the like. the VMWare Player tools will allow you to simply drag and drop the files over to copy them.
I'm looking to take a couple of my .NET apps and make them Mono compliant, and this is the path I'm going to take here shortly.
A year later and the answer to this has change greatly. You can now use MonoDevelop on Windows, or if you are more comfortable in Visual Studio you can use the Visual Studio Tools to write everything and then debug on in VM to make sure it is working on Linux.
#Chris I have found that Visual Studio is the best IDE for developing against .NET -- I think the best way to target Mono is really just to develop and build in Visual Studio under Windows then just run those binaries directly on Linux (or whatever other Mono platform you are using). There are free versions of Visual Studio if licensing is a concern. If you are developing under Linux, the best software is probably Eclipse with a Mono plugin (see The Mono Handbook - Eclipse for installation instructions) but keep in mind it doesn't have near the amount of features or language integration Visual Studio has.
#modesty Mono is a 3rd party open source implementation of the .NET framework which allows you to run .NET applications on platforms other than Windows.
One of the best things you can do if developing with Visual Studio for Mono is to get MoMA http://www.mono-project.com/MoMA. This will inspect any number of assemblies that you build and generate a report showing potential Mono problems (e.g., methods not implemented in the mono library). It can be run from a GUI or the command line for use in automated builds.
Miguel had a post about debugging Mono running on linux with remote debugging on Visual Studio. This may be something you want to look into... Using Visual Studio to debug Mono. There is also a new project called CloverLeaf whose goal is enabling debugging Mono on Windows in Visual Studio.
There's just no reason to build your app using Mono; the whole point of the .Net CLR is that the compiled output is cross-platform.
So you can simply build it using your favourite IDE (and if you like IDEs, Microsoft's is the best one to use) and then test it on Mono. Even if you get Mono working on Windows, it wouldn't be a very good test of your app's portability: what if your app does silly things like assuming filenames have backslashes in them, or that there's something special about a folder called Program Files? The best way to do portability testing is to actually test your app on the target platform.
And that's pretty easy to do with a Linux VMware player like the one at http://www.go-mono.com/mono-downloads/download.html.
Personally, I'm just compiling in Visual Studio 2008 as if it were for .Net 2.0 and then running in Mono (VS2008 on Windows in a VirtualBox, Mono on OSX). All the problems come up at runtime, anyway, so the system works perfectly.
I just found this very new link, which is amazing and shows you how to set up Visual Studio 2008 for Mono.
At the same time, setting up Mono on OpenSuse or Ubuntu inside a VirtualBox (Sun's product) is easy, painless, and doesn't force you to abandon whatever platform you normally live in.
This is not relevant to your question, but I might note that I just got into Mono and I'm amazed at how much of .Net is implemented, including much of the Winforms stuff.
My first instinct would be the rather unhelpful "Install Linux". You are somewhat swimming against the current to try and develop in mono under windows. Installing GTK and everything is a bit of a bother in my experience.
If you do feel like using linux, then you could Try Ubuntu
Otherwise:
There's some information here: http://www.mono-project.com/Mono:Windows and it seems the cygwin toolchain might be your best bet. I don't think you're going to be able to avoid makefiles, sadly. I found a slightly more explicit tutorial from O'Reilly.
#modesty: Mono provides the necessary software to develop and run .NET client and server applications on Linux, Solaris, Mac OS X, Windows, and Unix. Sponsored by Novell (http://www.novell.com), the Mono open source project has an active and enthusiastic contributing community and is positioned to become the leading choice for development of Linux applications. -- From the Mono site.
Eclipse plugin for Mono is dead. On Linux use MonoDevelop or X-Develop if you like good commercial support (although MonoDevelop is closing on them fast feature-wise). On Windows SharpDevelop has custom MSBuild targets for compiling the code against Mono.
As Mono and MonoDevelop are changing fast, be sure to use the latest released versions, even if they are not marked as stable yet (e.g. versions shipped with stock Ubuntu are terribly outdated).
The VMWare image is a great way to start testing Windows-developed code on Linux. Don't touch cygwin unless you are already very conformable with it.
I liked the idea of trying to use MonoDevelop mostly just to make sure my stuff would work against the Mono runtimes. I guess it would also be possible to get crazy with msbuild and write some custom targets that tried to build against Mono, but that's basically emulating the now-defunct plug-in's functionality which I assume was non-trivial to build. I do have minor experience with cygwin, and I am happy typing "configure" and "make" all day long, but when a problem occurs in that process, I'm virtually screwed. I'll probably try to play with all this again, but if it takes me more than a couple hours to come up with a way to build comfortably against the Mono runtimes, I'll probably just bail.
I will try the Eclipse idea. I use that for Java, so I might be able to get the c# stuff to work. We shall see...

Resources