[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE : [Tsp-devel] Alignment error on VxWorks
From: |
Arquer Stephane |
Subject: |
RE : [Tsp-devel] Alignment error on VxWorks |
Date: |
Thu, 27 Nov 2008 15:50:27 +0100 |
I met
the same problem during TSP Rtems port in using BB Tsp. I use a Leon
microprocessor based on Sparc, I think your are on the same
architecture.
The problem occur when you want to access
unaligned variables. With a sparc architechture you need to have data aligned on
32 bits adresses understand terminating by 0,4,8 or C. But the
variables greater than 32 bits coded on at least 64 bits (doubles
int64 ...) need to be aligned on adresses aligned by 64 bits ( terminating by 0
or 8 only).
The
solution is to modify the BB to copy the data byte by byte to avoid this
problem.
sa
Hi TSP,
I have a list of differents
kind of symbols (char ,int8, int16, double ....) to publish in the BB (under
vxworks).Everything works fine until I want to access the pointers returned by
bb_simple_publish and especially in a config like this (tab is an array of
pointer on void):
*(double*) tab[i] = a
*(double*)
tab[i+1]=b
*(int16*) tab[i+2]= c
*(double*) tab[i+3]= d
<--- here is the line which throw "alignment error"
No
problem when there is an even number of int16 pointer .
I remember
(when I check the tsp-devel archive) , during the Rtems port , there was a
memory alignment probem.
Do you think this is the same problem ?
I
solved the issue in using only 32 or 64 bits symbols but this is not
optimal.Any idea to make it better ?
RE : [Tsp-devel] Alignment error on VxWorks,
Arquer Stephane <=