working with rtems
Jan Sommer
soja-lists at aries.uberspace.de
Sun Dec 18 16:12:51 UTC 2016
Hello Yaron,
On Sonntag, 18. Dezember 2016 11:17:35 CET yaron o wrote:
> Hello There,
>
> I have two of questions that i hope you could help me with.
>
> First , i'm using a serial communication that is UART , i get a massage in
> binary (from RX) and need to parse it , i'm using a string to save the
> binary massage and with pointers save relevant fields in massage in
> correct variables, the problem is when i need to parse to double , every
> time i'm taring to put the binary massage part directly in to double
> variables i'm getting an error that say "IU in error mode (tt = 0X07 mem
> address not aligned), so i tries to split the binary to two long variables
> and concat between them with bit-wise operators still no successful and
> same error as above . any idea to anyone?
>
IIRC doubles need to be 8 byte aligned in sparcv8 architectures and it seems that is not the case because you use a simple byte array which has no alignment constraints. An easy fix might be using memcpy:
double myNumber
memcpy(&myNumber, &message[offset], sizeof(myNumber) );
> Second question : i want to put some function and add new interrupts when
> the OS is first initialize , in witch file i finding the OS initialization
> process?
>
>
Maybe you could do that in a custom bsp_pretasking_hook-function for your bsp?
Cheers,
Jan
> im using rtems 4.10 , leon 3 processor ,
> hope everything is clear thank to helpers
> Yaron
>
More information about the users
mailing list