To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.nxt.nxthackingOpen lugnet.robotics.nxt.nxthacking in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / NXT / NXT Firmware Hacking / 63
62  |  64
Subject: 
Custom firmware crashing on boot
Newsgroups: 
lugnet.robotics.nxt.nxthacking
Date: 
Wed, 27 Jun 2007 21:36:57 GMT
Viewed: 
15875 times
  
Hey, I'm new here, so if I seem like a n00b, it's probably because I am.  Hopefully my question won't be too annoying.

I'm trying to use the NXTGCC 0.0.9 package as a starting point for custom firmware.  The main point of my custom firmware is to swap out the virtual machine for a custom one.  I can compile the NXTGCC firmware fine, and it loads with SAM-BA and works.

My modifications to the firmware so far are disabling a few parts of the NXT-G virtual machine (by commenting out some parts of c_cmd.c), and inserting a new file containing the implementation of the new virtual machine.  I inserted into c_cmd.c some code which (hopefully) is supposed to translate calls to the NXT-G VM into calls to the new VM.  It now compiles fine, however, when I load the firmware with SAM-BA and type "go 0x100000", the NXT crashes with a blank screen, and I have to put it back in SAM-BA mode and load a working firmware to make it function again.

Very little of my changed code executes on boot, all of which I am relatively confident is not likely to cause a crash.  Is the VM normally called during boot?  I don't believe so, but if someone can contradict me, that would be helpful information.

My hypothesis (which is likely wrong, but it's the only one I have -- help would be appreciated here) is that maybe parts of the firmware are being overwritten by the file system or something, since the new firmware is around 10KB larger than the NXTGCC firmware.

The address table thingy (not sure what it's called -- again, I'm a n00b) outputted when I make the new firmware is as follows:

Size after:
m_sched.elf  :
section             size      addr
.text             126572   1048576
.text2             23072   1279744
.data               6180   2097152
.bss               46604   2103332
.comment            2970         0
.debug_aranges       592         0
.debug_pubnames       95         0
.debug_info         4366         0
.debug_abbrev       1012         0
.debug_line         3349         0
.debug_frame         276         0
.debug_str           353         0
.debug_loc          3214         0
.debug_ranges        456         0
Total             219111

Not sure if this helps in diagnosing the problem or not; if there's any more detail I need to provide for people to get an idea of what could be wrong, just ask.

Any help would be greatly appreciated.

Thanks in advance.

-Jeremy Rand

PS: I attempted to post this message two days ago, but I believe it got eaten by my client.  If anyone receives a duplicate, I apologize.


--------------=  Posted using GrabIt  =----------------
------=  Binary Usenet downloading made easy =---------
-=  Get GrabIt for free from http://www.shemes.com/  =-



Message has 2 Replies:
  RE: Custom firmware crashing on boot
 
Here's two things to try since you've only swapped out the VM hich I assume is a replacement for the "c_cmd.c" file. 1. First there is a "#define" that specifies the start address of the file system. If you're 10K larger you're going to need to (...) (17 years ago, 27-Jun-07, to lugnet.robotics.nxt.nxthacking)
  Re: Custom firmware crashing on boot
 
(...) It is nice with some action. (...) OK, that is very good. (...) A quick question: Are you running binsert after you compile? It may be worthwhile to look at lines 50-55 in "Makefile". With some effort and a hex file editor you can check if (...) (17 years ago, 28-Jun-07, to lugnet.robotics.nxt.nxthacking)

5 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