MSP430 simulator in gdb
Mark Rages <[email protected]> Tue, 3 Jun 2014 10:40:39 -0600
| Newsgroups | gmane.comp.hardware.texas-instruments.msp430.gcc.user |
|---|---|
| Message-ID | <CAASrBQ=O_4zLCOS==AGWA-d1whvT4xsTHsOJ-regdca8MT+z+Q@mail.gmail.com> |
This is a follow-on to a previous discussion, which discussion quickly drifted into language-lawyering: https://www.mail-archive.com/[email protected]/msg10619.html I am trying to use the msp430 simulator built into gdb and am having trouble getting anywhere. I'm using Ubuntu 12.04 and the msp430 tools from the repository. (I think they're actually from Debian.) I've made the following test program: volatile int a=0; int main(void) { while (1) a++; } Now I want to load it into the simulator, and watch "a" change. I compile it like so; $ msp430-gcc --version msp430-gcc (GNU GCC patched mspgcc-20110716) 4.5.3 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ msp430-gcc -o test.elf test.c And load it into gdb like so: $ msp430-gdb test.elf GNU gdb (GDB) 7.2 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html > This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i486-linux-gnu --target=msp430". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/markrages/hello_msp/test.elf...done. (gdb) target sim Connected to the simulator. (gdb) load (gdb) run Starting program: /home/markrages/hello_msp/test.elf Segmentation fault (core dumped) Well, that is unhelpful. Maybe I'll try with an older version of msp430-gdb. $ /usr/local/msp430/bin/msp430-gdb test.elf GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html > This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=msp430"... (gdb) target sim Connected to the simulator. (gdb) load (gdb) run Starting program: /home/markrages/hello_msp/test.elf Segmentation fault (core dumped) OK, how about the Java MSP430 simulator "mspsim"? $ make run java -classpath "build/:lib/jcommon-1.0.14.jar:lib/jfreechart-1.0.11.jar:lib/jipv6.jar:lib/json-simple-1.1.1.jar" se.sics.mspsim.Main Usage: se.sics.mspsim.platform.sky.SkyNode <firmware> make: *** [run] Error 1 No problem, I'll just run the thing myself and supply the executable as argument. $ java -classpath "build/:lib/jcommon-1.0.14.jar:lib/jfreechart-1.0.11.jar:lib/jipv6.jar:lib/json-simple-1.1.1.jar" se.sics.mspsim.Main ~/hello_msp/test.elf MSPSim does not currently support the platform 'elf'. Ah, that's going to be a problem. Does anyone have other ideas for me to try? Regards, Mark markrages@gmail ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Mspgcc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mspgcc-users