Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Getting started with at91lib
PostPosted: Wed Jan 30, 2008 10:16 pm 
Offline

Joined: Fri Oct 12, 2007 4:56 am
Posts: 12
My board is an Atmel AT91SAM9263-EK.

I am trying to run the "getting started" application from the Atmel software package. I am getting it to cross-compile correctly but I get a "segmentation fault" error when I run it on the target (Linux 2.6.22.9).

The error occurs when accessing any of the board's registers, for instance:

fprintf(stdout, ", Chip ID : 0x%08X\n\r", AT91C_BASE_DBGU->DBGU_CIDR); //this bombs out

AT91C_BASE_PITC->PITC_PIMR = period? (period * pit_frequency + 8) >> 4 : 0; //this bombs out as well




What am I missing?

Thanks,

Carlos


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 01, 2008 9:26 pm 
Offline

Joined: Fri Oct 12, 2007 4:56 am
Posts: 12
I don't like answering my own post, but I am pretty sure now that those examples are not Linux compatibles, as they access memory and interrupts registers directly.

Have to work on Linux kernel drivers to obtain the same functionality.

Someone correct me if I'm wrong, though!

Carlos


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 11:58 am 
Offline

Joined: Mon May 28, 2007 5:02 pm
Posts: 50
Location: Walton-on-Thames, UK
It looks like you are correct. Because of the MMU hardware registers can't be accessed directly from user space.
If you look at http://www.simtec.co.uk/appnotes/AN0014/ there is a decription of how to write to hardware from user space. This saves having to write Linux drivers which can be time consuming if you are not familiar with them.


Top
 Profile  
 
 Post subject: Wearing the charming IDee jewelry
PostPosted: Sun Jul 27, 2008 2:47 am 
Imagethe charming IDee jewelry, your mood will be bright everyday. The IDee jewelry is worth possessing!

Please view our website athttp://www.ideewomen.com/ to get a better idea of our products. We will be happy to give you a quotation upon receipt of your detailed requirements.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: