gnupic: Re: [gnupic] my .hex files don't work in gpsim-cvs


Previous by date: 14 Mar 2006 05:00:17 +0000 my .hex files don't work in gpsim-cvs, bill sack
Next by date: 14 Mar 2006 05:00:17 +0000 Re: [gnupic] Beginner, Gibaud Alain
Previous in thread:
Next in thread:

Subject: Re: [gnupic] my .hex files don't work in gpsim-cvs
From: "Scott Dattalo" ####@####.####
Date: 14 Mar 2006 05:00:17 +0000
Message-Id: <60422.71.139.31.153.1142309509.squirrel@71.139.31.153>

On Mon, 2006-03-13 at 21:30 -0500, bill sack wrote:
> hi again,
> i finally got the cvs version of gpsim on 031206 and ran some of the new
> usart_gui examples ... very cool. however, when i try some of my own hex
> files, they don't work anymore.

My bad. I broke the hex file loading code when I introduced preliminary
support for the dsPics. I found and fixed the problem. Here's a patch if
you don't feel like waiting for CVS:


RCS file: /cvsroot/gpsim/src/processor.cc,v
retrieving revision 1.151
diff -u -r1.151 processor.cc
--- processor.cc        27 Feb 2006 17:12:57 -0000      1.151
+++ processor.cc        14 Mar 2006 04:06:30 -0000
@@ -487,8 +487,8 @@
                                             const unsigned char *bytes,
int nBytes)
 {

-  for (int i =0; i<nBytes; i+=2)
-    init_program_memory_at_index(uIndex+i, (((unsigned
int)bytes[i+1])<<8)  | bytes[i]);
+  for (int i =0; i<nBytes/2; i++)
+    init_program_memory_at_index(uIndex+i, (((unsigned
int)bytes[2*i+1])<<8)  | bytes[2*i]);

 }



> ps - does anyone have any experience with getting the CCS .cod files to
> work in gpsim for more of a symbolic debugging approach?
>
> **gpsim> load c "***ERROR: syntax error, unexpected $undefined while
> parsing:

try a "load s" instead of "load c". This still confuses me too, but the
's' stands for symbol files and the 'c' stands for command files. However,
symbol file extensions begin with 'c' (.cod) and command file extensions
begin with s (.stc). Sigh. But, to make things simpler, gpsim tries to
figure this out for you. So if you type:

load "blink-876.cod"

gpsim will figure out that this is a .cod file and load it as such.
Similarly if the extension is .hex or .stc, it will do the right thing.

Scott

Previous by date: 14 Mar 2006 05:00:17 +0000 my .hex files don't work in gpsim-cvs, bill sack
Next by date: 14 Mar 2006 05:00:17 +0000 Re: [gnupic] Beginner, Gibaud Alain
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.