How to add the missing os libraries to TI compiler - c

I am using Code Composer Studio to build application for the target EK-TM4C1294XL TI board.
The TI boards come with their own compiler and the compiler is missing os libraries like wsock.lib and ws2_32.lib which are socket libraries used for connecting to internet. I am trying to build a open62541 application which require the mentioned libraries. I could build the applications in visual studio without any errors by linking wsock.lib and ws2_32.lib. How to proceed in this case? Is anyone able to build an open62541 application using TI compiler?

Related

Installing linux library in C

I am a beginner with linux and C and wanted to learn how to successfully install external libraries.
Therefore, I have a recent project to aid my understanding of my MacOS usb ports, I am taking steps into: The Linux-USB Host Side API. This mentions the package is the the following:
<linux/usb/ch9.h>
I found this on the linux github: linux-usb.
How do I successfully install this onto my MacOS to use within Visual Studio Code?

Remote cross-platform project in Eclipse

I would like to make a C/C++ app for OrangePi zero. As orpi zero is a pretty low power running Eclipse on it is pain.
I would prefer to run Eclipse on Windows machine and remotely build and run/debug the app on orpi. I tried to achieve this by using RSE. After setting up RSE connection I can make a remote project. Edit files but without auto-completion, showing declarations(missing headers) and so on. Also, I cannot compile or run the app.
Is there any other way than cross-compiling on Windows and deploying to remote orpi? Some way to have autocompletion and compiling directly using orpi toolchain? Or at least have auto-completion working. My biggest concern about using cross-compile toolchain is dependency hell for external libraries.
Orpi is running Armbian. Developing in Eclipse 4.9

Build C executable for Raspberry Pi on Windows or Linux

I have to design a C executable (no GUI) that is supposed to run on Raspberry PI. I'm familiar with design using IDE like Visual Studio or Eclipse (with CDT plugin). If i use Raspberry PI as a design machine, I think I have no chance to use a standard IDE. I should use makefiles and gcc compiler only.
Is there any chance to develop Raspberry PI executable using Visual Studio (for Windows) or Eclipse (for both Windows and Linux).
You can specify to eclipse projects with Makefiles. You can also specify a compilation toolchain.
So yes, you can develop and compile for Raspberry Pi or for other plateforms using Eclipse.
For getting toolchain and other tools for Rasp Pi you can find things here.
In Eclipse, you create a new or import a project choosing Makefile Project with Existing Code then add your toolchain.
If you have a newer Pi like the 4, you should be able to run eclipse directly from the Pi desktop. You can download via:
sudo apt-get install eclipse
This will be a stripped-down version and will likely run quite slow, so I agree compiling on a more powerful remote machine is better...
Is there any chance to develop Raspberry PI executable using Visual Studio (for Windows) or Eclipse (for both Windows and Linux).
Yes, this is called cross-compiling. You can set up a cross-compile toolchain for the raspberry pi on windows or linux and configure your Eclipse CDT project to build with the toolchain. You can even set up remote debugging.
This website has good information and a step-by-step guide for windows using cygwin.
This looks like a good guide for linux.
Edit:
Just realized you asked for Visual Studio on Windows. I don't think there is Visual Studio support for this. The example I pointed to sets up cygwin so you have an emulated linux environment. You could also set up a VM using free VM software and install a linux environment that way, and run eclipse CDT from there. This is what I did when setting up a cross compiling environment for the Raspi.

Cannot find -lpthread?

I am new to C programming.
I was trying to use the pthread API to write some concurrent program.
I downloaded eclipse IDE for C/C++ Developers, MinGW. I have put all the library, header files into the corresponding location of the MinGW file.
When I tried to build the project, there is always an error "cannot find -lpthread", what happened?
I have added the "-pthread" to the GCC compiler.
I have searched a lot in Google but seems no one have similar problem as me.
The answer to this question by someone who is also missing MinGW pthread library should help you out! Essentially the issue is that the MinGW installer script might not download the lpthread library upon installation. Quoted from link:
Just run and open MinGW Installation Manager, which should be pre-installed with MinGW, select "All Packages" on the left panel, and on the right panel, search for "mingw32-pthreads-w32" packages and install them.
I downloaded eclipse IDE for C/C++ Developers, MinGW.
MingGW uses the Windows API. The Windows API does not provide PThreads.
You need to install PThreads for Win32 to have PThreads available under Windows, and with this available under MinGW.
Eclipse is not configured to put the -pthread argument in the gcc compilation. To solve this, go to the Menu:
view sourceprint?
1.Project -> Properties
From the bar on the left:
view sourceprint?
1.c/c++ build -> GCC C Compiler -> Miscellaneous
Add the “-pthread” argument into the beginning of the “Other Flags” Also go to:
view sourceprint?
1.c/c++ build -> Settings -> GCC C Linker -> Libraries
And include the “pthread”library into the other libraries. Click Apply and rebuild the project. Pthreads must work now.
See the question on mingw.org. I ended up with adding 'C:/cygwin/lib' to the settings for the "Library search path (-L)" at properties >> c/c++ build >> settings >> MinGW C Linker >> Libraries.

How to integrate DynamicC compiler(Rabbit Microcontroller/C ) with the Eclipse IDE

I would like to integrate the Dynamic C compiler which is compiler for the RABBIT microcontroller into the Eclipse IDE. I really like eclipse environment and its features.
Is there any method I can use to integrate such external compiler into the Eclipse Environment. Any detailed writeup of howto would be very helpful.
I don't know that compiler, but Eclipse can be configured to use various compilers.
You should create a C project, right-click it and select "Properties". Then take a look at C/C++ Build -> Settings and C/C++ Build -> Tool Chain Editor.
If your compiler is properly installed (i.e. you can build things with it on the command line or through another tool), then you should be able to get the right things set in the "C/C++ Build" options.
Here's the eclipse documentation on managing those settings: Eclipse C/C++ Build

Resources