Author Topic: Easy and small Linux ARM platform?  (Read 11237 times)

0 Members and 1 Guest are viewing this topic.

Offline SirNick

  • Frequent Contributor
  • **
  • Posts: 589
Re: Easy and small Linux ARM platform?
« Reply #25 on: August 26, 2014, 07:15:01 pm »
The processor has registers that can be written to and read from.  Doing this requires low-level access to the CPU, which, in a Linux environment usually means you need a kernel driver (which should be already present in your chosen distribution), and then you need an interface library for your language of choice.

For Python on RaspPi, this is "RPi.GPIO", as seen here:

http://www.raspberrypi.org/learning/quick-reaction-game/

I didn't read much of the Adafruit tutorial when I found the link (because I prefer languages that allow arbitrary white space) and it appears the link is dead now, so I can only assume there wasn't anything Adafruit-specific in the previous tutorial.  Sometimes they write their own libraries when there's no other or better option, but generally they're not big on reinventing wheels.  Regardless, the Raspberry Pi Foundation's tutorial ought to be as official as it gets.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Easy and small Linux ARM platform?
« Reply #26 on: August 26, 2014, 08:31:42 pm »
The processor has registers that can be written to and read from.  Doing this requires low-level access to the CPU, which, in a Linux environment usually means you need a kernel driver (which should be already present in your chosen distribution),
Actually you don't have to that. With the mmap function (C) you can access the physical memory space (and thus registers) from an application.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline SirNick

  • Frequent Contributor
  • **
  • Posts: 589
Re: Easy and small Linux ARM platform?
« Reply #27 on: August 26, 2014, 10:41:53 pm »
Hm, I thought those regions were already mapped to files in like /sys or something..?  Are they concurrently accessible?  (Haven't done much with mmap at this stage in my dealings with C.)
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Easy and small Linux ARM platform?
« Reply #28 on: August 27, 2014, 12:34:21 am »
AFAIK you can write the entire memory using mmap() without any limitations. I have used it before to read some registers in a SoC but my memory is not serving me well at this moment.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline RoadRunner

  • Frequent Contributor
  • **
  • Posts: 378
  • Country: de
Re: Easy and small Linux ARM platform?
« Reply #29 on: August 27, 2014, 06:31:56 am »
i was at same position as you are currently few months back.

and what i learnt , you need
1. community support , it should be huge.
2. open hardware
3. already running distributions. 
4. lots of expansion headers.

so i suggest you to go raspberrypi b+ or beaglebone black.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Easy and small Linux ARM platform?
« Reply #30 on: August 27, 2014, 08:41:43 am »
 
Quote
ARM + Linux territory. ...
  :
 get some hands on experience with low-level systems programming.

Arguably, once you have linux, you no longer do "low-level systems programming"; you mostly do "linux systems administration."  (And I've been amused to watch beginning arduino users who asked basic programming questions move to Raspberry Pi and start asking basic linux admin questions.)

I guess there are things that are comparatively low-level: writing network daemons or middleware that speaks to sockets and /dev/etc instead of being off in the GUI stratosphere, but it's a lot different than programming an arduino.  (Given an I2C device driver provided to you, you'd still have some effort required to be able to interface a 9DoF sensor array to your high-level SW.)

There COULD be a community of people writing device-driver level firmware for the small linux boards, which is more what I'd consider to be really low level.  But I'm not aware of anything.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Easy and small Linux ARM platform?
« Reply #31 on: August 27, 2014, 11:41:16 am »
Unless it is your goal it is quite tedious work to write devices drivers and put a working Linux distribution together. I went through this process several times. So if you can get a board which already has a good kernel available and a complete Linux environment it is a big plus because you can start doing interesting work.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Easy and small Linux ARM platform?
« Reply #32 on: August 27, 2014, 04:43:40 pm »
Unless it is your goal it is quite tedious work to write devices drivers and put a working Linux distribution together. I went through this process several times.
Yup. In eons past I used to write kernel drivers for projects, but that is indeed quite time consuming. With the introduction of modules development became easier but still took up a nice chunk of time. Implementing it in user space is so much easier. And since there's user space hooks for quite a lot of things these days, user space it is. :)
 

Offline SirNick

  • Frequent Contributor
  • **
  • Posts: 589
Re: Easy and small Linux ARM platform?
« Reply #33 on: August 27, 2014, 09:13:26 pm »
There COULD be a community of people writing device-driver level firmware for the small linux boards, which is more what I'd consider to be really low level.  But I'm not aware of anything.

Well, it's not exactly a buzzing community, but it does exist.  Examples:

I've lurked in a few threads where people discussed hacking device drivers for (e.g.) the BBB to get some peripheral working.  A lot of the peripherals on the CPU require other stuff (e.g., audio, HDMI, etc.) so you have to be willing to hack at the kernel driver level.  Ditto with specialty projects like the community Squeezbox player, or OpenElec.  Even the RasPi forums have a few people moving the X Windows drivers along and whatnot.

Certainly not the bulk of that space though!
 

Offline salfter

  • Contributor
  • Posts: 25
  • Country: us
    • My Blog
Re: Easy and small Linux ARM platform?
« Reply #34 on: September 02, 2014, 05:17:45 am »
There COULD be a community of people writing device-driver level firmware for the small linux boards, which is more what I'd consider to be really low level.  But I'm not aware of anything.

Not all driver development is necessarily tied to embedded systems.  I recently designed and built this 1-Wire/I2C breakout board for the Raspberry Pi, for instance.  To switch a solid-state relay on and off, I included a DS2406 1-Wire addressable switch on-board.  When it came time to write the software for my intended application (a temperature controller for my brewing fridge), I found that there was no driver for the DS2406 in the kernel 1-Wire stack.  (It's supported by owfs, but owfs doesn't support bit-banged 1-Wire on the Raspberry Pi...it's intended to be used with USB 1-Wire interfaces and such.)  I started with another 1-Wire driver (think it was for the DS2413) and modified it to work with the DS2406.  I submitted it for inclusion in the kernel, and it's slated to appear in Linux 3.17.  It'll work not just on the Raspberry Pi, but on every system that can use the kernel 1-Wire stack (which is nearly everything that can run Linux).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf