> -----Original Message-----
> From: Radu Rendec [mailto:radu.ren...@cloudbit.ro]
> Sent: Monday, September 19, 2011 05:49
> To: Alessandro Triglia
> Cc: mspgcc-users@lists.sourceforge.net
> Subject: Re: [Mspgcc-users] memory.x not found and debugger crashing
> 
> On Fri, 2011-09-16 at 22:06 -0400, Alessandro Triglia wrote:
> > Then I tried to debug the program using msp430-gdb (with "target sim"
> > followed by "load" and "file") but the debugger crashes as soon as I
> give
> > the "start" command.  I also tried with mspsim, but it returns an
> error that
> 
> Try looking at the resulting elf image, with a command like this:
> msp430-objdump -h build\x4.firmware
> 
> Check against the model-specific datasheet that all sections begin at
> the right address.
> 
> I have no experience with mspsim, but I know that mspdebug "sim" target
> is not perfect. Some things may happen differently that the real
> hardware, causing your program to crash.
> 
> Also try using "step" directly from mspdebug, because it steps at asm
> instruction level. Probably you'll be able to see what causes it to
> crash.


Thanks for your answer.

Eventually, I was able to run my program in MSPSIM without any errors.

msp430-gdb still crashes (under Windows Vista, at least).  There is no way
for me to use "step" as you say, since the debugger crashes as soon as I
give a command.  Fortunately, MSPSIM worked for me.

The reason my program did not work in MSPSIM initially was that the linker
had not inserted the start-up code and the vector table.  The MSPGCC online
manual says that the linker adds that stuff automatically based on the type
of device specified in the mmcu parameter, but in my case the linker does
not add anything at all. I solved that problem by adding the individual
libraries and the crt* file to the linker's command line.

So my problem is now solved, but the reason the linker does not find the
"memory.x" file and does not automatically add the start-up code as the
manual says is still a mystery to me.

Alessandro



------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry® mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to