LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-12-2016, 08:14 AM   #1
greenace92
Member
 
Registered: Nov 2015
Posts: 70

Rep: Reputation: Disabled
Programming for system level on Linux?


Is there any preference between using say a Mac/Windows/Linux to program system level?

I2C, at command, C, etc... in particular plugging in the hardware itself to Linux and assuming the programming software is on Linux nd talks to the board.

I don't have any particular board in mind. But I'd like to work with possibly Arduino, psoc. I know i2c for accelerometers I think and at command for Bluetooth BLE modules.

I'd appreciate any thoughts.
 
Old 07-12-2016, 12:22 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
How, exactly, do you intend to attach an I2C accelerometer directly to a Mac? Or Windows PC? Or a non-embedded Linux machine?

Desktop systems don't expose low level headers for directly attaching I2C/SPI peripherals. You'd need to be using an embedded system (Raspberry Pi, Beagleboard, etc), which 99.9% of the time, if it runs an OS, it will be Linux.

There are adapter boards you can use to translate between I2C and eg: USB, in which case the preference would be whatever OS the adapter board's drivers were written for.


Or am I completely misunderstanding the question?

Last edited by suicidaleggroll; 07-12-2016 at 12:23 PM.
 
Old 07-12-2016, 02:55 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
The definitive language for writing the necessary low-level device drivers (unless they already exist, which is quite likely ...) is "C." The driver normally consists of a loadable module.

User-side application libraries, which provide the first interface layer to the driver, are ordinarily written in "C" or "C++."

Higher-level applications can be written in the language(s) of your choice.

And, I repeat: "usually, it has already been done." If not, there will surely be a set of source-code that you can "merely adapt."
 
Old 07-12-2016, 03:32 PM   #4
greenace92
Member
 
Registered: Nov 2015
Posts: 70

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
How, exactly, do you intend to attach an I2C accelerometer directly to a Mac? Or Windows PC? Or a non-embedded Linux machine?

Desktop systems don't expose low level headers for directly attaching I2C/SPI peripherals. You'd need to be using an embedded system (Raspberry Pi, Beagleboard, etc), which 99.9% of the time, if it runs an OS, it will be Linux.

There are adapter boards you can use to translate between I2C and eg: USB, in which case the preference would be whatever OS the adapter board's drivers were written for.


Or am I completely misunderstanding the question?
Yeah I didn't mean to attach directly to the computer. With Windows you'd have like some program you'd use to program i2c with and then plug the sensor in through USB which I don't think that makes sense what I'm saying (read: I have no experience)


I guess I'll just be sure to have both Linux and windows OS available.
 
Old 07-12-2016, 03:33 PM   #5
greenace92
Member
 
Registered: Nov 2015
Posts: 70

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sundialsvcs View Post
The definitive language for writing the necessary low-level device drivers (unless they already exist, which is quite likely ...) is "C." The driver normally consists of a loadable module.

User-side application libraries, which provide the first interface layer to the driver, are ordinarily written in "C" or "C++."

Higher-level applications can be written in the language(s) of your choice.

And, I repeat: "usually, it has already been done." If not, there will surely be a set of source-code that you can "merely adapt."
Thanks.

I'm working on learning c but I don't use it nearly as often as I do with higher level language/coding so I'm not that great at it.
 
Old 07-15-2016, 06:10 PM   #6
patrick295767
Member
 
Registered: Feb 2006
Distribution: FreeBSD, Linux, Slackware, LFS, Gparted
Posts: 664

Rep: Reputation: 138Reputation: 138
Quote:
Originally Posted by greenace92 View Post
Thanks.

...with higher level language/coding ...
there is no such a thing like "of higher level programming language". C is definitely a complete solution for programming anything you want.


"C is really better and simpler to C++ but any C programmer can convert C++ to C and laugh. – BobRun Oct"
http://stackoverflow.com/questions/4...y-use-c-over-c

Patrick295767:
Code:
C is definitely the best place to start learning a programming language, but also to end and to stay.
It means that there is nothing else better than C !
 
Old 07-16-2016, 03:32 AM   #7
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
There are some programming basics that will be the foundation of everything a programmer does. I see countless multitudes of programmers who skipped the basics and went straight to learning a programming language. They never become really good programmers, unless they get the basics on the job. Programming is something that must be taught. Once you have the basics you can just take off.

C is the defacto standard programming language, because it is an official standard documented as an ANSI publication. It is suitable for almost any task, although a bit laborious.
 
Old 07-16-2016, 05:20 AM   #8
patrick295767
Member
 
Registered: Feb 2006
Distribution: FreeBSD, Linux, Slackware, LFS, Gparted
Posts: 664

Rep: Reputation: 138Reputation: 138
Quote:
Originally Posted by AwesomeMachine View Post
There are some programming basics that will be the foundation of everything a programmer does. I see countless multitudes of programmers who skipped the basics and went straight to learning a programming language. They never become really good programmers, unless they get the basics on the job. Programming is something that must be taught. Once you have the basics you can just take off.

C is the defacto standard programming language, because it is an official standard documented as an ANSI publication. It is suitable for almost any task, although a bit laborious.
C is definitely the best of the best to start programming. You are free to make your own libs, or use existing libs,... you can even use them later in C++ if you have to. If you know C, you can do many things.

Last edited by patrick295767; 07-16-2016 at 05:21 AM.
 
Old 07-18-2016, 02:12 AM   #9
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
It doesn't matter with Arduino boards. You develop with the Arduino editor and download on to the device.
I believe the environment works on Windows and Linux at least.

I have dabbled a little with Arduino, I only use Linux and it works fine.
Arduino uses C.

Buy a starter pack on Amazon and away you go, its great fun and ridiculously inexpensive.

Last edited by bigearsbilly; 07-18-2016 at 02:14 AM.
 
Old 07-18-2016, 02:26 AM   #10
patrick295767
Member
 
Registered: Feb 2006
Distribution: FreeBSD, Linux, Slackware, LFS, Gparted
Posts: 664

Rep: Reputation: 138Reputation: 138
Quote:
Originally Posted by bigearsbilly View Post
It doesn't matter with Arduino boards. You develop with the Arduino editor and download on to the device.
I believe the environment works on Windows and Linux at least.

I have dabbled a little with Arduino, I only use Linux and it works fine.
Arduino uses C.

Buy a starter pack on Amazon and away you go, its great fun and ridiculously inexpensive.
Arduino editor is kinda heavy and bloated. But well, no choice.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Install a non-system-level binary blob as a fake linux system without VM Find Linux - Software 3 09-11-2014 08:08 PM
What happens f your linux system is at run level 5 and you use the command telenit 3? Beandip408 Linux - Newbie 5 10-16-2011 12:11 PM
linux kernel level socket programming yethish Programming 1 07-05-2011 03:05 AM
How to catch system-level exceptions in Linux cyker Programming 2 01-25-2011 06:04 AM
What is the best IDE for system level programming in Linux using C? balajesankar Programming 1 05-24-2010 11:45 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration