RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Sat May 25, 2013 12:08 am

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: RR Definition - Float point endian problem
PostPosted: Wed Feb 03, 2010 8:55 am 
Offline
Experienced

Joined: Mon Jan 19, 2009 2:31 pm
Posts: 974
Location: Saratov, Russia
It appears that RR editor ignores float point numbers endian.

It uses "big endian" any time.

Endian="little", endian="big" statements within ecu_defs.htm are completely ignored.

Is there any workaround?


Top
 Profile  
 
 Post subject: Re: RR Definition - Float point endian problem
PostPosted: Wed Feb 03, 2010 10:07 am 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 3667
Location: Canada eh!
If the float data/values are always big endian then does it matter?
Are you seeing a problem somewhere or are you just pointing out a bug?


Top
 Profile  
 
 Post subject: Re: RR Definition - Float point endian problem
PostPosted: Wed Feb 03, 2010 10:36 am 
Offline
Experienced

Joined: Mon Jan 19, 2009 2:31 pm
Posts: 974
Location: Saratov, Russia
I would like to have "little endian" working as promised. Besides 4 byte float 4 byte integer numbers may also be useful.

The reason is that not any microcontroller uses big endians.

Currently I am trying to provide porting ecu and diagnostic tool firmware onto non-Freescale\Hitachi\NXP platform as well.

The idea is to provide ECU realtime tuning capability.

OpenSource software could be very helpful for the project.

Edited:
I have all needed with ecuEdit and ecuFlash. The first one is a commercial project and to be true the second one could not be thought as free without Tactrix cable payed.


Top
 Profile  
 
 Post subject: Re: RR Definition - Float point endian problem
PostPosted: Thu Dec 09, 2010 3:20 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 3667
Location: Canada eh!
I looked at this and found that the "bytes to float" conversion routine is always forced to big endian in the RomRaider code. I could fix this quite easily but current ECU Editor defs would all become invalid. The current defs incorrectly identify float as being little endian.
So there's two solutions:
    1) fix this AND release a corrected version of ALL the defs ever created
    2) fix this AND add a version attribute to the defs that if set uses the endian as defined in the def, if not set assume an old def and force float to be big endian
Any other suggestions?


Top
 Profile  
 
 Post subject: Re: RR Definition - Float point endian problem
PostPosted: Fri Dec 10, 2010 12:28 am 
Offline
Experienced

Joined: Mon Jan 19, 2009 2:31 pm
Posts: 974
Location: Saratov, Russia
You are quite correct about wrong RR definitions.

I think it will reasonable to add a switch (probably a version of the xml format used inside new defs) that force RR to interpret new defs correctly and ignore float conversion settings inside old defs that does not have this switch.

It is also desirable to add new setting to interpret singed integers and long signed \unsigned ones.


Top
 Profile  
 
 Post subject: Re: RR Definition - Float point endian problem
PostPosted: Fri Dec 10, 2010 12:43 am 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 3667
Location: Canada eh!
Sasha_A80 wrote:
I think it will reasonable to add a switch ...
I agree that's probably easiest.

Sasha_A80 wrote:
It is also desirable to add new setting to interpret singed integers and long signed \unsigned ones.
I already have modified code for this. It can support int8, int16, uint8 & unit16.
Is there a need for int32 & uint32? This will require more code changes to support.


Top
 Profile  
 
 Post subject: Re: RR Definition - Float point endian problem
PostPosted: Fri Dec 10, 2010 5:11 am 
Offline
Experienced

Joined: Mon Jan 19, 2009 2:31 pm
Posts: 974
Location: Saratov, Russia
dschultz wrote:
can support int8, int16, uint8 & unit16.
Is there a need for int32 & uint32? This will require more code changes to support.


Who knows what the future holds?
I hope RR can be useful not for only Subaru ecu's.

Another question is related to the support for big\little endian integers/float for ROM editor and logger.


Top
 Profile  
 
 Post subject: Re: RR Definition - Float point endian problem
PostPosted: Fri Dec 10, 2010 10:55 am 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 3667
Location: Canada eh!
Sasha_A80 wrote:
Another question is related to the support for big\little endian integers/float for ROM editor and logger.
This is supported in the Editor already, not sure about the logger. The logger would need to know the format of the ECU's response to a query. That's not defined anywhere that I can think of, so I assume it assumes big endian right now.


Top
 Profile  
 
 Post subject: Re: RR Definition - Float point endian problem
PostPosted: Sat Dec 11, 2010 1:12 am 
Offline
Experienced

Joined: Mon Jan 19, 2009 2:31 pm
Posts: 974
Location: Saratov, Russia
ECU init string specifies parameter availabitlity. For Subaru 2 byte values are big endian.

But.
Extended parameters depend on processor architecture and are big endian for Hitachi\Renesas.
Hardcoded "big endian" for logger may become a restriction for other makes or DIY ecu's.


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

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: ancho and 0 guests


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

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl