Author Topic: Ncubate - nspire_emu enhanced  (Read 21742 times)

0 Members and 1 Guest are viewing this topic.

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Ncubate - nspire_emu enhanced
« 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

Help for the GDB support is available on Hackspire.

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
« Last Edit: November 06, 2010, 12:39:39 pm by ExtendeD »
Ndless.me with the finest TI-Nspire programs

Offline Snake X

  • Ancient Veteran
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 810
  • Rating: +33/-8
    • View Profile
Re: Ncubate - nspire_emu enhanced
« Reply #1 on: August 31, 2010, 07:10:45 am »
good work ExtendeD! :)
Loved this place, still the best producers of power metal, and sparked my dreams of coding.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Ncubate - nspire_emu enhanced
« Reply #2 on: August 31, 2010, 01:36:58 pm »
Yep, great work! The new features are pretty useful. And nice job on the name, as usual :D




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Ncubate - nspire_emu enhanced
« Reply #3 on: August 31, 2010, 01:42:52 pm »
Great work ExtendeD. Those features should be pretty useful, especially programmers :)

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Re: Ncubate - nspire_emu enhanced
« Reply #4 on: August 31, 2010, 03:23:19 pm »
Looks nice ExtendeD!

* apcalc replaces his Nspire emulator with this
:)


Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Ncubate - nspire_emu enhanced
« Reply #5 on: August 31, 2010, 05:04:55 pm »
Yes, save states are pro :D

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Ncubate - nspire_emu enhanced
« Reply #6 on: September 01, 2010, 03:29:04 pm »
Nice job! Now only if you could add the GUI to that...

Offline qazz42

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1130
  • Rating: +30/-12
  • hiiiiiiiii
    • View Profile
Re: Ncubate - nspire_emu enhanced
« Reply #7 on: September 01, 2010, 03:33:54 pm »
wow, this is great, awsome job extended

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: Ncubate - nspire_emu enhanced
« Reply #8 on: September 21, 2010, 04:02:16 am »
New version 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')
« Last Edit: September 21, 2010, 04:05:55 am by ExtendeD »
Ndless.me with the finest TI-Nspire programs

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Ncubate - nspire_emu enhanced
« Reply #9 on: September 21, 2010, 04:13:30 am »
Nice! Keep up the good work on this :)

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: Ncubate - nspire_emu enhanced
« Reply #10 on: October 08, 2010, 06:27:48 pm »
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:


An older one with Insight (RedHat's GUI for GDB):


An other one also quite old, with the debugger of the disassembler IDA, which would allow OS live analysis with all its symbols:


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).
« Last Edit: October 08, 2010, 06:28:34 pm by ExtendeD »
Ndless.me with the finest TI-Nspire programs

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Ncubate - nspire_emu enhanced
« Reply #11 on: October 08, 2010, 07:49:15 pm »
Nice! Would we need to install extra stuff for it to work, though?




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Ncubate - nspire_emu enhanced
« Reply #12 on: October 08, 2010, 10:02:32 pm »
Nice!

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: Ncubate - nspire_emu enhanced
« Reply #13 on: October 09, 2010, 04:11:45 am »
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 is the most pleasant to use. You need to download a zip and enter a few setup values.
Ndless.me with the finest TI-Nspire programs

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Ncubate - nspire_emu enhanced
« Reply #14 on: October 09, 2010, 06:32:06 pm »
Oh, I see, so the UI changes depending on what you have installed.