Quantcast

request for help on direct mapping access - Overo Water

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

request for help on direct mapping access - Overo Water

Nicola
Hi Gumstix people.
I've working on my Gumstix Overo serie Water trying to control by direct meory
register
access the SPI1 and McBSP1, and also GPIO6.
After having successflly installed the stable armstrong release on an SD card,
the gcc copiler
and all the needed libraries, when I try to access SPI1 or McBSP1 register by
my
C code, I obtain a bus error message as an alignment traps occurred into the
memory.
My aim is to obtain a fast control of above peripherals and I need to use the
register access.
I tried to disable existing linux drivers but the command  "make menuconfig"
does'nt work.
Can anyone help me? Thanks in advance.
Nicola

Here is the code I used:

/****************************************************************************************
 *    Filename: main.c
 *   Copyright:
 *  Created on: 04/08/2012
 *      Author: Nicola
 
****************************************************************************************/
/*
 * Note:
 *
 */

/****************************************************************************************
                             LOCAL INCLUDES DEFINITION
 
****************************************************************************************/
#include <stdio.h>  // for lprint instruction
#include "init_mem.h"
#include "init_SPI_1.h"
#include <fcntl.h>      //ok for mmap param
#include <sys/mman.h>   //ok for mmap


/****************************************************************************************
                             LOCAL PARAMETERS DEFINITION
 
****************************************************************************************/
#define GPIO1_BASE 0x48310000
#define UART1_BASE 0x4806A000
#define McSPI1_BASE 0x48098000
#define McSPI2_BASE 0x4809A000
#define McBSP1_BASE 0x48074000

/****************************************************************************************
                             COMMON VARIABLES DEFINITION
 
****************************************************************************************/


/****************************************************************************************
                             LOCAL FUNCTIONS DEFINITION
 
****************************************************************************************/


/****************************************************************************************
  Function name:     int main(void)
  Last modification: 04/08/2012
  Version:           1.00
  Notes:
 
****************************************************************************************/

int main(void){
volatile unsigned long *A;
int fd = open("/dev/mem", O_RDWR | O_SYNC);  // | O_SYNC
if (fd < 0) {printf("Could not open file\n"); return;}

printf("\n\n\n\n\n\n\n");
printf("\n\n");
printf("   ------------------------------------------\n");
printf("   |               SPI Sample                |\n");
printf("   ------------------------------------------\n");
printf("   |   Direct Register Access SPI Sample     |\n");
printf("   ------------------------------------------\n");
printf("Base address McSPI1: 0x%04x\n",(McSPI1_BASE & -4095UL));
printf("Base address McSPI2: 0x%04x\n",(McSPI2_BASE & -4095UL));
printf("Base address McBSP1: 0x%04x\n",(McBSP1_BASE & -4095UL));
printf("Base address  GPIO1: 0x%04x\n",(GPIO1_BASE & -4095UL));// OK
printf("Base address  UART1: 0x%04x\n",(UART1_BASE & -4095UL));// OK
UART1_BASE 0x4806A000
printf("\n");

A = (unsigned long*) mmap(NULL, 4096UL, PROT_READ | PROT_WRITE, MAP_SHARED,
fd, (unsigned long) McSPI1_BASE & ~4096UL); // COM1 0x4806A000
if (A == MAP_FAILED) {printf("Mapping failed    value 0x%04x\n",A); close(fd);
return;} // %d.\n
if (A<=0) {printf("Mapping failed\n"); close(fd); return;}
//close(fd);
printf("Base address: 0x%04x\n",(McSPI1_BASE & -4095UL));
if (A) printf("Pointer: 0x%04x\n",A);
printf("Pointer address: 0x%04x\n",&A);
printf("Contenuto Puntatore: 0x%04x\n",(*A));
//printf("Pointed value: 0x%04x\n",*(unsigned long*)A);
printf("pointers to memory are ok\n");
return(0);
}

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: request for help on direct mapping access - Overo Water

Keane, Ben (STRX)
Hi,

I'm not that familiar with what you are trying to do, but I can suggest you could try and access the registers via the command 'devmem' or 'devmem2' and if it works with that application then you know it's your code, and if it doesn't then it's a system problem?

HTH,
Ben

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: Saturday, 11 August 2012 12:02 AM
To: [hidden email]
Subject: [Gumstix-users] request for help on direct mapping access - Overo Water

Hi Gumstix people.
I've working on my Gumstix Overo serie Water trying to control by direct meory register access the SPI1 and McBSP1, and also GPIO6.
After having successflly installed the stable armstrong release on an SD card, the gcc copiler and all the needed libraries, when I try to access SPI1 or McBSP1 register by my C code, I obtain a bus error message as an alignment traps occurred into the memory.
My aim is to obtain a fast control of above peripherals and I need to use the register access.
I tried to disable existing linux drivers but the command  "make menuconfig"
does'nt work.
Can anyone help me? Thanks in advance.
Nicola

Here is the code I used:

/****************************************************************************************
 *    Filename: main.c
 *   Copyright:
 *  Created on: 04/08/2012
 *      Author: Nicola
 
****************************************************************************************/
/*
 * Note:
 *
 */

/****************************************************************************************
                             LOCAL INCLUDES DEFINITION
 
****************************************************************************************/
#include <stdio.h>  // for lprint instruction #include "init_mem.h"
#include "init_SPI_1.h"
#include <fcntl.h>      //ok for mmap param
#include <sys/mman.h>   //ok for mmap


/****************************************************************************************
                             LOCAL PARAMETERS DEFINITION
 
****************************************************************************************/
#define GPIO1_BASE 0x48310000
#define UART1_BASE 0x4806A000
#define McSPI1_BASE 0x48098000
#define McSPI2_BASE 0x4809A000
#define McBSP1_BASE 0x48074000

/****************************************************************************************
                             COMMON VARIABLES DEFINITION
 
****************************************************************************************/


/****************************************************************************************
                             LOCAL FUNCTIONS DEFINITION
 
****************************************************************************************/


/****************************************************************************************
  Function name:     int main(void)
  Last modification: 04/08/2012
  Version:           1.00
  Notes:
 
****************************************************************************************/

int main(void){
volatile unsigned long *A;
int fd = open("/dev/mem", O_RDWR | O_SYNC);  // | O_SYNC if (fd < 0) {printf("Could not open file\n"); return;}

printf("\n\n\n\n\n\n\n");
printf("\n\n");
printf("   ------------------------------------------\n");
printf("   |               SPI Sample                |\n");
printf("   ------------------------------------------\n");
printf("   |   Direct Register Access SPI Sample     |\n");
printf("   ------------------------------------------\n");
printf("Base address McSPI1: 0x%04x\n",(McSPI1_BASE & -4095UL)); printf("Base address McSPI2: 0x%04x\n",(McSPI2_BASE & -4095UL)); printf("Base address McBSP1: 0x%04x\n",(McBSP1_BASE & -4095UL)); printf("Base address  GPIO1: 0x%04x\n",(GPIO1_BASE & -4095UL));// OK printf("Base address  UART1: 0x%04x\n",(UART1_BASE & -4095UL));// OK UART1_BASE 0x4806A000 printf("\n");

A = (unsigned long*) mmap(NULL, 4096UL, PROT_READ | PROT_WRITE, MAP_SHARED, fd, (unsigned long) McSPI1_BASE & ~4096UL); // COM1 0x4806A000
if (A == MAP_FAILED) {printf("Mapping failed    value 0x%04x\n",A); close(fd);
return;} // %d.\n
if (A<=0) {printf("Mapping failed\n"); close(fd); return;} //close(fd); printf("Base address: 0x%04x\n",(McSPI1_BASE & -4095UL)); if (A) printf("Pointer: 0x%04x\n",A); printf("Pointer address: 0x%04x\n",&A); printf("Contenuto Puntatore: 0x%04x\n",(*A)); //printf("Pointed value: 0x%04x\n",*(unsigned long*)A); printf("pointers to memory are ok\n"); return(0); }

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users

______________________________________________________________________
CAUTION: This message was sent via the Public Internet and its authenticity cannot be guaranteed.

PROPRIETARY: This e-mail contains proprietary information some or all of which may be legally privileged.  It is intended for the recipient only.  If an addressing or transmission error has misdirected this e-mail, please notify the authority by replying to this e-mail.  If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: request for help on direct mapping access - Overo Water

Dave Hylands
In reply to this post by Nicola
Hi Nicola,

On Fri, Aug 10, 2012 at 7:02 AM, [hidden email] <[hidden email]> wrote:

> Hi Gumstix people.
> I've working on my Gumstix Overo serie Water trying to control by direct meory
> register
> access the SPI1 and McBSP1, and also GPIO6.
> After having successflly installed the stable armstrong release on an SD card,
> the gcc copiler
> and all the needed libraries, when I try to access SPI1 or McBSP1 register by
> my
> C code, I obtain a bus error message as an alignment traps occurred into the
> memory.
> My aim is to obtain a fast control of above peripherals and I need to use the
> register access.
> I tried to disable existing linux drivers but the command  "make menuconfig"
> does'nt work.

make menuconfig will try to create an x86 config. You need to use:

make ARCH=arm menuconfig

> Can anyone help me? Thanks in advance.

I threw in some comments below.

> Here is the code I used:
>
> /****************************************************************************************
>  *    Filename: main.c
>  *   Copyright:
>  *  Created on: 04/08/2012
>  *      Author: Nicola
>
> ****************************************************************************************/
> /*
>  * Note:
>  *
>  */
>
> /****************************************************************************************
>                              LOCAL INCLUDES DEFINITION
>
> ****************************************************************************************/
> #include <stdio.h>  // for lprint instruction
> #include "init_mem.h"
> #include "init_SPI_1.h"
> #include <fcntl.h>      //ok for mmap param
> #include <sys/mman.h>   //ok for mmap
>
>
> /****************************************************************************************
>                              LOCAL PARAMETERS DEFINITION
>
> ****************************************************************************************/
> #define GPIO1_BASE 0x48310000
> #define UART1_BASE 0x4806A000
> #define McSPI1_BASE 0x48098000
> #define McSPI2_BASE 0x4809A000
> #define McBSP1_BASE 0x48074000
>
> /****************************************************************************************
>                              COMMON VARIABLES DEFINITION
>
> ****************************************************************************************/
>
>
> /****************************************************************************************
>                              LOCAL FUNCTIONS DEFINITION
>
> ****************************************************************************************/
>
>
> /****************************************************************************************
>   Function name:     int main(void)
>   Last modification: 04/08/2012
>   Version:           1.00
>   Notes:
>
> ****************************************************************************************/
>
> int main(void){
> volatile unsigned long *A;
> int fd = open("/dev/mem", O_RDWR | O_SYNC);  // | O_SYNC
> if (fd < 0) {printf("Could not open file\n"); return;}
>
> printf("\n\n\n\n\n\n\n");
> printf("\n\n");
> printf("   ------------------------------------------\n");
> printf("   |               SPI Sample                |\n");
> printf("   ------------------------------------------\n");
> printf("   |   Direct Register Access SPI Sample     |\n");
> printf("   ------------------------------------------\n");
> printf("Base address McSPI1: 0x%04x\n",(McSPI1_BASE & -4095UL));
> printf("Base address McSPI2: 0x%04x\n",(McSPI2_BASE & -4095UL));
> printf("Base address McBSP1: 0x%04x\n",(McBSP1_BASE & -4095UL));
> printf("Base address  GPIO1: 0x%04x\n",(GPIO1_BASE & -4095UL));// OK
> printf("Base address  UART1: 0x%04x\n",(UART1_BASE & -4095UL));// OK
> UART1_BASE 0x4806A000
> printf("\n");
>
> A = (unsigned long*) mmap(NULL, 4096UL, PROT_READ | PROT_WRITE, MAP_SHARED,
> fd, (unsigned long) McSPI1_BASE & ~4096UL); // COM1 0x4806A000

You used ~4095UL everywhere else (correctly), but here you seem to
incorrectly be using 4096, Now since McSPI1_BASE ends in 8000 this
won't make any difference, but in general, it's incorrect.

> if (A == MAP_FAILED) {printf("Mapping failed    value 0x%04x\n",A); close(fd);
> return;} // %d.\n
> if (A<=0) {printf("Mapping failed\n"); close(fd); return;}
> //close(fd);
> printf("Base address: 0x%04x\n",(McSPI1_BASE & -4095UL));
> if (A) printf("Pointer: 0x%04x\n",A);
> printf("Pointer address: 0x%04x\n",&A);
> printf("Contenuto Puntatore: 0x%04x\n",(*A));
> //printf("Pointed value: 0x%04x\n",*(unsigned long*)A);

Note that dereferencing A in general won't be correct. You should add
the offset within the 4K block.

Looking at the register map for McSPI, I don't see any registers
mapped at offset 0, which is why you might be having problems.

The first register appears to be at offset 0x10

> printf("pointers to memory are ok\n");
> return(0);
> }

--
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: request for help on direct mapping access - Overo Water

Nicola
Hi Dave.
I'm still trying to change the the starting driver setup.....
Where is the   menuconfig  file located?
Using the    updatedb     command followed by     locate menuconfig     I obtain no response.
Consider please that I'm new on arm architectures linux based!

To everybody info, the last version of my code is further as well as the error message it gives when executed:
a memory alignment trapping problem seems to occurr!

#include <stdio.h>  // for lprint instruction
#include "init_mem.h"
#include "init_SPI_1.h"
#include <fcntl.h>      //ok for mmap param
#include <sys/mman.h>   //ok for mmap

/****************************************************************************************
                             LOCAL PARAMETERS DEFINITION
 ****************************************************************************************/
#define GPIO1_BASE 0x48310000
#define GPIO5_BASE 0x49056000
#define GPIO6_BASE 0x49058000
#define GPIO6_CLEARDATAOUT_OFFSET 0x90
#define GPIO6_SETDATAOUT_OFFSET 0x94
#define GPIO6_OE_OFFSET 0x34
#define GPIO6_CTRL_OFFSET 0x30

#define UART1_BASE 0x4806A000
#define McSPI1_BASE 0x48098000
#define McSPI1_SYSCONFIG_OFFSET 0x10
#define McSPI1_SYSSTATUS_OFFSET 0x14
#define McSPI1_MODULCTRL_OFFSET 0x28
#define McSPI1_CH0CONF_OFFSET 0x2C
#define McSPI1_CH3CONF_OFFSET 0x68
#define McSPI1_CH0CTRL_OFFSET 0x34
#define McSPI1_CH3CTRL_OFFSET 0x70
#define McSPI1_RX0_OFFSET 0x3C
#define McSPI1_RX3_OFFSET 0x78

#define McSPI2_BASE 0x4809A000
#define McBSP1_BASE 0x48074000
/****************************************************************************************
                             COMMON VARIABLES DEFINITION
 ****************************************************************************************/

/****************************************************************************************
                             LOCAL FUNCTIONS DEFINITION
 ****************************************************************************************/

/****************************************************************************************
  Function name:     int main(void)
  Last modification: 04/08/2012
  Version:           1.00
  Notes:
 ****************************************************************************************/

#define MAP_SIZE (volatile unsigned long) 4*1024
#define MAP_MASK (unsigned long)( MAP_SIZE - 1 )

int main(void){
unsigned long i;
//volatile unsigned long *A;
unsigned int* A;
int fd = open("/dev/mem", O_RDWR | O_SYNC);
if (fd < 0) {printf("Could not open file\n"); return;}

printf("\n\n\n\n\n\n\n");
printf("\n\n");
printf("   ------------------------------------------\n");
printf("   |               SPI Sample                |\n");
printf("   ------------------------------------------\n");
printf("   |   Direct Register Access SPI Sample     |\n");
printf("   ------------------------------------------\n");
printf("Base address McSPI1: 0x%04x\n",(McSPI1_BASE & ~MAP_MASK ));
printf("Base address McSPI2: 0x%04x\n",(McSPI2_BASE ));
printf("Base address McBSP1: 0x%04x\n",(McBSP1_BASE ));
printf("Base address  GPIO1: 0x%04x\n",(GPIO1_BASE ));// OK
printf("Base address  GPIO6: 0x%04x\n",(GPIO6_BASE ));// OK
printf("Base address  UART1: 0x%04x\n",(UART1_BASE));// OK UART1_BASE 0x4806A000
printf("\n");

A = (unsigned int*) mmap(NULL, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, McSPI1_BASE & ~MAP_MASK); // COM1 0x4806A000
if (A == MAP_FAILED) {printf("Mapping failed    value 0x%04x\n",A); close(fd); return;} // %d.\n
if (A<=0) {printf("Mapping failed\n"); close(fd); return;}
//close(fd);
printf("Base address: 0x%04x\n",(McSPI1_BASE & ~MAP_MASK));
printf("Base address: 0x%04x\n",(McSPI1_BASE +McSPI1_SYSSTATUS_OFFSET));
printf("Pointer: 0x%04x\n",A+McSPI1_SYSSTATUS_OFFSET);
printf("Pointer address: 0x%04x\n",&A);
printf("Pointer content: 0x%04x\n",*(A+McSPI1_SYSSTATUS_OFFSET));
printf("pointers to memory are ok\n") ;
return(0);
}




------------[ cut here ]------------
WARNING: at arch/arm/mach-omap2/omap_l3_smx.c:162 omap3_l3_app_irq+0x230/0x2d0()
In-band Error Error seen by MPU  at address 0
Modules linked in:
[<c0042fd8>] (unwind_backtrace+0x0/0xec) from [<c0065964>] (warn_slowpath_common+0x4c/0x64)
[<c0065964>] (warn_slowpath_common+0x4c/0x64) from [<c0065a10>] (warn_slowpath_fmt+0x30/0x40)
[<c0065a10>] (warn_slowpath_fmt+0x30/0x40) from [<c0054dbc>] (omap3_l3_app_irq+0x230/0x2d0)
[<c0054dbc>] (omap3_l3_app_irq+0x230/0x2d0) from [<c0094944>] (handle_irq_event_percpu+0x34/0x18c)
[<c0094944>] (handle_irq_event_percpu+0x34/0x18c) from [<c0094ac4>] (handle_irq_event+0x28/0x38)
[<c0094ac4>] (handle_irq_event+0x28/0x38) from [<c00969f8>] (handle_level_irq+0xb8/0xe0)
[<c00969f8>] (handle_level_irq+0xb8/0xe0) from [<c0039078>] (asm_do_IRQ+0x78/0xa0)
[<c0039078>] (asm_do_IRQ+0x78/0xa0) from [<c003e4f4>] (__irq_svc+0x34/0xa0)
Exception stack(0xdd9b3f68 to 0xdd9b3fb0)
3f60:                   40099050 00001018 dd9b3fb0 60000010 ffffffff 00000000
3f80: 000083bc 00000000 00000000 00000000 40102000 beca1c64 402bb010 dd9b3fb0
3fa0: c003e690 c003e698 60000113 ffffffff
[<c003e4f4>] (__irq_svc+0x34/0xa0) from [<c003e698>] (__dabt_usr+0x38/0x40)
---[ end trace 90d84272248ca0aa ]---
   -------------Unhandled fault: external abort on non-linefetch (0x1018) at 0x40099050
-----------------------------
   |               SPI Sample                |
   ------------------------------------------
   |   Direct Register Access SPI Sample     |
   ------------------------------------------
Base address McSPI1: 0x48098000
Base address McSPI2: 0x4809a000
Base address McBSP1: 0x48074000
Base address  GPIO1: 0x48310000
Base address  GPIO6: 0x49058000
Base address  UART1: 0x4806a000

Base address: 0x48098000
Base address: 0x48098014
Pointer: 0x40099050
Pointer address: 0xbeca1c4c
Bus error
root@overo:~#


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: request for help on direct mapping access - Overo Water

Dave Hylands
Hi Nicola,

On Mon, Aug 13, 2012 at 4:00 AM, Nicola <[hidden email]> wrote:
> Hi Dave.
> I'm still trying to change the the starting driver setup.....
> Where is the   menuconfig  file located?
> Using the    updatedb     command followed by     locate menuconfig     I
> obtain no response.
> Consider please that I'm new on arm architectures linux based!

So the linux configuration file is called .config
When building the kernel, you may also need to be aware of the source
tree and the build tree. The kernel makefile is located in the root of
the source tree. The .config is located in the root of the build tree.
Sometimes, the build tree and the source tree are the same, and
sometimes they're split.

For my OE tree (which is quite old), they seem to be the same, and in
./tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.39-r102/git/

So you need to cd into that directory (if you have a newer tree, then
the path will almost certainly be at least slightly different), and
run the "make ARCH=arm menuconfig" from that directory.

> To everybody info, the last version of my code is further as well as the
> error message it gives when executed:
> a memory alignment trapping problem seems to occurr!

Some peripherals also have to be enabled (i.e. have their  clocks
turned  on) before their registers show up. I'm not familiar enough
with the McSPI to know if that's the case.

Turning clocks on/off is typically something you want to do from
kernel space, and not from user space. The type of stuff you're trying
to do should probably be done from within a driver.

--
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: request for help on direct mapping access - Overo Water

Nicola
Hi Dave. Sincerely, since two months ago I've been working on an ATMEL ARM9 processor with his embedded linux on and I was able to control all registers of the processor....unfortunately it was not enough powerful for my aims.
I switched to Gumstix thinking to find all support I would have needed but Gumstix doesn't offer any software consulence.
The file you suggested my to find doesn't exist on the Angstrom linux stable version that Gumstix supplies..... I don't know how to procede. Before giving up with this (not well supported) electronics I'd like to find a simplified linux version that simply allows me to "see" the processor register. I'm working on an expensive project and I have
no time to "play" .
Thank you however for your advices.
Nicola
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: request for help on direct mapping access - Overo Water

Dave Hylands
Hi Nicola,

On Mon, Aug 13, 2012 at 9:17 AM, Nicola <[hidden email]> wrote:

> Hi Dave. Sincerely, since two months ago I've been working on an ATMEL ARM9
> processor with his embedded linux on and I was able to control all registers
> of the processor....unfortunately it was not enough powerful for my aims.
> I switched to Gumstix thinking to find all support I would have needed but
> Gumstix doesn't offer any software consulence.
> The file you suggested my to find doesn't exist on the Angstrom linux stable
> version that Gumstix supplies..... I don't know how to procede. Before
> giving up with this (not well supported) electronics I'd like to find a
> simplified linux version that simply allows me to "see" the processor
> register. I'm working on an expensive project and I have
> no time to "play" .

I've been assuming that you have a fully-built open-embedded tree. If
you don't, I suggest you build one. If you just download the sources,
then no you won't have a .config file. You need to actually build the
tree.

Once you do, you can find your kernel .config file by using the find command.

Something like

cd overo-oe
find . -name .config

This will also find some other .config files. You can find the
directory where the kernel is built by doing something like

find . -name do_mount.o

The do_mount.c file is normally located in the init directory, so
strip that off and you

You are accessing registers, youprobably just aren't following all of
the rules properly (which has nothing to do with the linux kernel).
You probably need to familiarize yourself with the appropriate OMAP
Technical Reference Manual.

Turning off the clocks is done to save power and is a common technique
used in most newer processors (the ARM926 is relatively ancient). So
you'll run across similar problems regardless of which platform you
choose, if it uses a relatively new processor.

So, to summarize, "seeing the register" has almost nothing to do with
linux, or which version of linux you're using. It has everything to do
with the underlying SoC and what it requires to make the registers
visible. Normally this work is done by the appropriate device driver,
sometimes by the platform code.

--
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: request for help on direct mapping access - Overo Water

Don Anderson
In reply to this post by Nicola
Hi Nicola

While Gumstix does not offer direct software consulting services to our customers, Gumstix engineers are part of the Gumstix community via this technical mailing list.

To assist customers seeking further technical assistance from engineers with knowledge and experience on Gumstix hardware and software, a list of companies called Verified Design Consultants (VDC) has been posted here:
https://www.gumstix.com/consultants.html

Each of these VDCs has confirmed to Gumstix that they've already completed one or more Gumstix-based consulting contracts with their own customers.


HTH


Don Anderson
@ Gumstix
=======================

On Mon, Aug 13, 2012 at 9:17 AM, Nicola <[hidden email]> wrote:
Hi Dave. Sincerely, since two months ago I've been working on an ATMEL ARM9
processor with his embedded linux on and I was able to control all registers
of the processor....unfortunately it was not enough powerful for my aims.
I switched to Gumstix thinking to find all support I would have needed but
Gumstix doesn't offer any software consulence.

...................

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: request for help on direct mapping access - Overo Water

Keane, Ben (STRX)
In reply to this post by Dave Hylands
I believe once you get the source and get your own OE system building - you may be able to edit the board file under the Linux Kernel to remove turning on the SPI Clocks so then your application can have access.

I use Android on the Gumstix platform and not OE, so a rough guess once you have all that setup the file would be in ./tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.39-r102/git/arch/arm/mach-omap2/board-overo.c   - of course this directory is just a guess.

Ben

-----Original Message-----
From: Dave Hylands [mailto:[hidden email]]
Sent: Tuesday, 14 August 2012 2:41 AM
To: General mailing list for gumstix users.
Subject: Re: [Gumstix-users] request for help on direct mapping access - Overo Water

Hi Nicola,

On Mon, Aug 13, 2012 at 9:17 AM, Nicola <[hidden email]> wrote:

> Hi Dave. Sincerely, since two months ago I've been working on an ATMEL
> ARM9 processor with his embedded linux on and I was able to control
> all registers of the processor....unfortunately it was not enough powerful for my aims.
> I switched to Gumstix thinking to find all support I would have needed
> but Gumstix doesn't offer any software consulence.
> The file you suggested my to find doesn't exist on the Angstrom linux
> stable version that Gumstix supplies..... I don't know how to procede.
> Before giving up with this (not well supported) electronics I'd like
> to find a simplified linux version that simply allows me to "see" the
> processor register. I'm working on an expensive project and I have no
> time to "play" .

I've been assuming that you have a fully-built open-embedded tree. If you don't, I suggest you build one. If you just download the sources, then no you won't have a .config file. You need to actually build the tree.

Once you do, you can find your kernel .config file by using the find command.

Something like

cd overo-oe
find . -name .config

This will also find some other .config files. You can find the directory where the kernel is built by doing something like

find . -name do_mount.o

The do_mount.c file is normally located in the init directory, so strip that off and you

You are accessing registers, youprobably just aren't following all of the rules properly (which has nothing to do with the linux kernel).
You probably need to familiarize yourself with the appropriate OMAP Technical Reference Manual.

Turning off the clocks is done to save power and is a common technique used in most newer processors (the ARM926 is relatively ancient). So you'll run across similar problems regardless of which platform you choose, if it uses a relatively new processor.

So, to summarize, "seeing the register" has almost nothing to do with linux, or which version of linux you're using. It has everything to do with the underlying SoC and what it requires to make the registers visible. Normally this work is done by the appropriate device driver, sometimes by the platform code.

--
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users

______________________________________________________________________
CAUTION: This message was sent via the Public Internet and its authenticity cannot be guaranteed.

PROPRIETARY: This e-mail contains proprietary information some or all of which may be legally privileged.  It is intended for the recipient only.  If an addressing or transmission error has misdirected this e-mail, please notify the authority by replying to this e-mail.  If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Loading...