Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: ExtendeD on August 31, 2010, 06:34:45 am
-
Ncubate is a custom version of Goplat's nspire_emu (released with his permission) enhanced with features I personally needed for my own use and I'd like to share.
This version mainly adds calculator state save and reload, useful debugger commands and support for the GDB debugger.
-> Ncubate v032b (http://www.omnimaga.org/index.php?action=downloads;sa=downfile&id=595)
Help for the GDB support is available on Hackspire (http://hackspire.unsads.com/wiki/index.php/Debugging_programs).
Ncubate adds the following features to nspire_emu v032:
GUI:
- NEW: 'File -> Save State' let you save the whole emulator state to a file
named <flash_image>.sav. The file is loaded on startup if it exists. You can
request a state reload with 'File -> Reload State'
Caution, newer versions of Ncubate may fail to read .sav files produced by
previous versions. Delete these files when upgrading.
- NEW: 'File -> Save Flash As...' suggests the current flash image name
- NEW: several keyboard shortcuts added
Debugger:
- NEW: Supports the GNU Debugger GDB. You can debug at source-level programs
built with Ndless. More information available at http://hackspire.unsads.com
- NEW: The register PC can be changed with the command 'rs
- NEW: Command 'j' to jump to the next instruction. This is useful for example
to jump over an halt() call in an Ndless program.
- NEW: Command 'ww' to write a word to an address
- NEW: Command 'ss' to search a string in memory
- NEW: "+x" is the default flag for the breakpoint command 'k'
- NEW: Command 'wf' to load a file to memory
- NEW: Command-line option /R=cmdfile can be used to automatically run debugger
commands on startup. Use a single line for each command. At the end of the file,
the debugger switches to the standard input. You can use 'c' as the last
command to continue the emulation.
- CHG: The breakpoint command 'k' takes as parameter a virtual address instead
of a physical address
- CHG: Debugger command 'w' renamed to 'wm'
- CHG: The command 'wm' takes as parameter a virtual address instead of a
physical address
- CHG: Read/write breakpoint logs display a virtual address instead of a
physical address
- FIX: Command 'd' doesn't crash if the parameter is missing
- FIX: Broken 'w' command
CPU/Ports:
- ADD: (internal) ARM loader for arbitrary ARM snippet execution by the emulator
- FIX: no more 'bad read word' on auto power down, but still hangs
Flash:
- FIX: Flash image closed when synced to disk, for external edition
Build:
- NEW: Makefile.config for custom compilation flags
- NEW: make clean
- FIX: compilation warnings
-
good work ExtendeD! :)
-
Yep, great work! The new features are pretty useful. And nice job on the name, as usual :D
-
Great work ExtendeD. Those features should be pretty useful, especially programmers :)
-
Looks nice ExtendeD!
/me replaces his Nspire emulator with this
:)
-
Yes, save states are pro :D
-
Nice job! Now only if you could add the GUI to that...
-
wow, this is great, awsome job extended
-
New version (http://ourl.ca/6877/113599) available:
* v032a - 2010/09/21
- Migrate to nspire_emu v032
- ADD: Debugger command 'ss'
- ADD: Debugger command 'wf'
- CHG: Debugger command 'w' renamed to 'wm'
- FIX: Debugger command 'j' supports thumb state
- FIX: Broken debugger command 'w' (now 'wm')
-
Nice! Keep up the good work on this :)
-
I'm currently working on the integration of the GNU Debugger GDB in Ncubate. It should greatly improve the C and ARM development experience for the TI-Nspire.
Ncubate is going to implement the GDB remote protocol, so any debugger compatible with it will be able to plug into the emulator for source level debugging.
Here are a few screenshots which give an idea of this feature:
With the Eclipse CDT debugger:
(http://lh5.ggpht.com/_7VztOkmAAfE/TK-XpZ20_5I/AAAAAAAABg4/AtNi3HZ6tdk/s128/Capture%20plein%20%C3%A9cran%2009102010%20001304.jpg) (http://picasaweb.google.fr/olivier.armand/TINspire#5525802005378170770)
An older one with Insight (RedHat's GUI for GDB):
(http://lh4.ggpht.com/_7VztOkmAAfE/S1tvgq3CCvI/AAAAAAAABOU/rFzj7twErww/s128/Capture%20plein%20%C3%A9cran%2023012010%20224947.jpg) (http://picasaweb.google.fr/olivier.armand/TINspire#5430056382776871666)
An other one also quite old, with the debugger of the disassembler IDA, which would allow OS live analysis with all its symbols:
(http://lh4.ggpht.com/_7VztOkmAAfE/S1xdLk01xRI/AAAAAAAABOw/ttbRi0lxYVc/s128/IDA%20-%20CDocuments%20and%20SettingsOlivierMes%20documentsDocumentsDeveloppementTInspireboot2boot2_decomp.idb%20%28boot2_decomp.bin%29%2024012010%20154522.jpg) (http://picasaweb.google.fr/olivier.armand/TINspire#5430317704147223826)
Integration of GDB (through Ncubate) with Ndless's program loader still needs to be implemented. Currently programs to debug are transfered manually with GDB's load command (as you can see on the first screenshot) at a fixed addressed define at compile time (for example in the middle of the TI-Nspire screen as you can also see).
-
Nice! Would we need to install extra stuff for it to work, though?
-
Nice!
-
Deep Thought: YAGARTO brings the command line version of GDB, you could use it directly but, well, it's command-line. Insight isn't distributed with it anymore, anyway I saw strange behaviors when using it.
At the moment I find that Eclipse CDT (http://www.eclipse.org/cdt/) is the most pleasant to use. You need to download a zip and enter a few setup values.
-
Oh, I see, so the UI changes depending on what you have installed.
-
Providing a gdbstub gives users the choice of tools they want to use, and reduces maintenance of the emulator (as it removes the _need_ for bundling a user interface for the debugger).
-
Now the GDB support of Ncubate collaborates with the program loader of Ndless v1.7. This mean you just have to start your debug session from you GDB front-end, set a breakpoint on the main() function (or anywhere else) and run the program you want to debug from the documents screen of the emulator as usual :)
I'm excited to share this with you as soon as possible. There are still a few things to fix up before a release.
-
Nice :D
-
Nice :D
Exactly!
-
ndless 1.7 is out? man im behind the times now. anyway nice new features for ncubate! what version is it now?
-
Ndless 1.7 isn't officially out yet, an alpha version is available for developers (and anyone who cares enough to compile the program himself).
-
yeah i just read the topic on it, it's not stable yet.
-
I am also thinking of adding RLE compression to the saved state files. I don't know how it runs on your side, but my laptop is quite old and restoring a 32MB file to memory is painful for its slow hard drive.
-
Sounds good. Even with Vista it took quite a while.
-
Even with Vista?
/me shudders at the use of vista for programming
I can't get it compiled on linux. Is this windows only? :( Make throws a whole bunch of errors, but it might just be that I'm doing it wrong. :P
-
Yes, this is Windows only.
To emulate the TI-Nspire on Linux you will need Xspire (http://hackspire.unsads.com/wiki/index.php/Emulators#Xspire), but it doesn't include the improvements brought by Ncubate.
-
/me wonders if someone plans to port Ncubate to Linux at one point
-
just happening to stumble upon this forum and downloading its contents... :)