Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-25-2012, 02:51 AM
|
#1
|
Member
Registered: Feb 2007
Location: So. Cal.
Distribution: Slackware
Posts: 56
Rep:
|
How to interact with the processor from within linux, read a GPIO port, use timers...
Greetings,
I am trying to decide if it will be a simple thing to interact with the TI processor of the beaglebone from within linux. Will it require kernel modifications, or the does the standard kernel expose the processor peripherals? Can I get code to run on the chip at the same time linux is running?
I haven't done a kernel before, would that be the best way to expose the peripherals to the linux environment? Would it be similar to writing RTOS routines?
This is a bit outside my comfort zone I'm trying to get the benefit of linux with the control of an RTOS. :-)
|
|
|
07-27-2012, 10:12 AM
|
#2
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
The Linux kernel code runs on the CPU. Userspace applications also run on the CPU. A CPU capable of supporting Linux has the facility to partition the kernel code and data space from userspace code and data, and also to ensure that each userspace process is confined within boundaries prescribed by the OS (kernel). CPUs often include peripherals built onto the CPU silicon, and/or there are external peripheral chips. Accessing those is usually the domain of kernelspace code. The kernel provides a means of access to the peripherals by userspace code through device drivers. It is also possible to create userspace access to peripherals, commonly called userspace drivers. This always requires root privileges, and is commonly done as application-specific code, not intended for any kind of shared access by other applications. Some developers use it as a step in the learning process while developing a full and proper kernel mode driver for a particular peripheral device.
There are extensions to Linux that provide real-time functionality, but otherwise Linux is not a RTOS. It sounds like you may be familiar with something like vxWorks, which is a realtime OS, but does not use protected mode on the CPU, and therefore does not embody the concept of kernel-mode vs usermode. That is done for performance reasons, as the use of protected mode imposes some significant overhead in CPU cycles.
--- rod.
|
|
1 members found this post helpful.
|
07-27-2012, 11:01 AM
|
#3
|
Member
Registered: Feb 2007
Location: So. Cal.
Distribution: Slackware
Posts: 56
Original Poster
Rep:
|
Thanks B-)
I thank you for the reply.
Your correct I'm an embedded guy but I tend to use an RTOS (currently sysBIOS) for task management only. I prefer to manage memory on my own as I get a bit better code size and I can tune performance where needed. That said its a lot of work to do anything. So I am looking to start using an OS and prepackaged hardware to provide a richer user interface. But I have some routines that need to be fast so I need access to processor itself.
|
|
|
All times are GMT -5. The time now is 08:27 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|