LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
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


Reply
  Search this Thread
Old 07-25-2012, 02:51 AM   #1
nickboarder27
Member
 
Registered: Feb 2007
Location: So. Cal.
Distribution: Slackware
Posts: 56

Rep: Reputation: 15
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. :-)
 
Old 07-27-2012, 10:12 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.
Old 07-27-2012, 11:01 AM   #3
nickboarder27
Member
 
Registered: Feb 2007
Location: So. Cal.
Distribution: Slackware
Posts: 56

Original Poster
Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
GPIO access on a Fujitsu Mini-ITX Industrial Mainboard, PCI Driver for GPIO mechatrix Linux - Embedded & Single-board computer 3 11-20-2011 03:57 PM
implementing matrix based keypad on x86 processor using GPIO's nathan Programming 1 02-06-2010 11:32 AM
Using GPIO (from kernel GPIO support) in MY application DannyGilbert Linux - Kernel 2 03-16-2009 07:52 AM
Timers SIGRTMIN is causing Socket Read to error on EINTR wkhoo Programming 1 07-04-2008 11:05 PM
Graphical Firewall for Linux with alerts to port scans, etc + interact with IPTABLES doraimom Linux - Security 7 04-15-2007 07:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 08:27 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