How to compile firmware v1.29 with IAR-cc?

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
mrblp
Posts: 82
Joined: 02 Oct 2010, 14:33

How to compile firmware v1.29 with IAR-cc?

Post by mrblp »

Hello,

LEGO distributes the NXT firmware as binary also as source code. I installed the free IAR compiler toolchain (v4.42) and tried to compile this source code.

There are two workbench-files (LMS-ARM and LMS-V02) which produce slightly different binaries. Even worse none of those binaries is equal to the binary delivered by LEGO. I know the file system is added at the original firmware - I already cut that part of. It still differs.

Why are they different? How can I get exactly the LEGO binary? What compiler is LEGO using? Really the "old" 4.42 or did they upgrade to 6.??

Thank you for the answers :-)

Bye marvin
Bye Marvin

- "I think you ought to know I'm feeling very depressed." - (Android Marvin in "The Hitchhiker's Guide to the Galaxy" by Douglas Adams, 1978)
nikzagvit
Posts: 16
Joined: 31 Oct 2010, 10:33

Re: How to compile firmware v1.29 with IAR-cc?

Post by nikzagvit »

Me as this question interests. Experts help us to understand!
mrblp
Posts: 82
Joined: 02 Oct 2010, 14:33

Re: How to compile firmware v1.29 with IAR-cc?

Post by mrblp »

Hello everybody,

I tried to compile the source code with different options and found things out:

v1.29: Compiled by LEGO (delivered version) = 0x22050 bytes binary
Compiled by LEGO (LMS_V02.rfw file in source) = 0x21164 bytes binary
Compiled by me with the delivered lib = 0x21114 bytes binary
Compiled by me with the 4.42 lib = 0x21684 bytes binary

The difference is about 3900 bytes which is a bit much for a little difference...

v1.05: Compiled by LEGO = 0x20BB4 bytes binary
Compiled by me with v1.29-delivered lib = 0x1DA40 bytes binary
Compiled by me with the 4.42 lib = 0x1DE04 bytes binary

The difference is about 12000 bytes here!!!

v1.28 Enhanced:
No difference. Only some bytes are changed - I think date and time based bytes.

Did anyone use a self-compiled version?
If yes - is there any different behaviour to the "original" version?

A question to John: Do you know why there is this difference?

Bye - marvin
Bye Marvin

- "I think you ought to know I'm feeling very depressed." - (Android Marvin in "The Hitchhiker's Guide to the Galaxy" by Douglas Adams, 1978)
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: How to compile firmware v1.29 with IAR-cc?

Post by afanofosc »

Unfortunately I do not know the reason for the differences you are seeing.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 2 guests