To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 1860
1859  |  1861
Subject: 
LegOS bug - firmware unlock string not below CC00h in some circumstances
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Sat, 28 Apr 2001 18:35:39 GMT
Viewed: 
1543 times
  
Just thought I'd better report this...

Firmdl3 is unable to download very large statically linked programs
(with a .text segment greater than 4c00h bytes). Unlike previous size
related bugs, this is *not* caused by firmdl, but rather by kmain.c.
Because the firmware unlock string is declared as a string constant, it
is placed in the data segment, which comes after the text segement. As a
result, it may lie after CC00h in RAM and hence will not be found by the
RCX ROM firmware checking routine. A simple fix (which I am using) is to
rewrite kmain.c so that the string is included in a small assembly
routine near the start of the entry point. There is probably a better of
way of solving this problem, but I'm not familiar with gcc compiler
directives + c tricks in general.

Admittedly this bug probably affects very few people apart from myself,
and I've only recently come across it now my program has reached approx
18k in size (too big to dynamically link). I would report it to
sourceforge, but I don't have web access right now.

Kieran Elby



Message has 1 Reply:
  RE: LegOS bug - firmware unlock string not below CC00h in some circumstances
 
(...) Argh! This is so typical of many embedded projects that I have seen go sour over the years. It's due to not using the linker to full advantage. In my firmware, I declare the string in its own .text section (you can do this in inline assembler (...) (24 years ago, 29-Apr-01, to lugnet.robotics.rcx.legos)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR