• TI-Nspire emulator 5 1
Currently:  

Author Topic: TI-Nspire emulator  (Read 329417 times)

0 Members and 1 Guest are viewing this topic.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: TI-Nspire emulator
« Reply #210 on: June 03, 2013, 12:12:14 pm »
The boot1 dump is clear-binary, directly executable.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: TI-Nspire emulator
« Reply #211 on: June 03, 2013, 12:13:09 pm »
You probably don't have to do anything with the boot1.img.tns, it's not compressed. You can just rename it to boot1.raw

Offline CompSystems

  • LV3 Member (Next: 100)
  • ***
  • Posts: 68
  • Rating: +7/-4
  • HP48GX,HP50G and TInspireCAS Calculator Programmer
    • View Profile
    • HP48GX,HP50G and TInspireCAS Calculator Programmer
Re: TI-Nspire emulator
« Reply #212 on: June 25, 2013, 04:59:22 pm »
Sorry for my bad English

If you hold down a key on the PC for a short time (for example down key), very fast response emulator, you must wait ...

as you can fix it?

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: TI-Nspire emulator
« Reply #213 on: June 28, 2013, 08:21:51 pm »
Is it possible to use GDB with nspire_emu on GNU/Linux?
Nspire_emu just crashes right after entering "target remote localhost:8000" in the GDB prompt when I try to follow the directions here. (I'm using 8000 because the /G=1000 switch gives an error message when running nspire_emu.exe)
« Last Edit: June 28, 2013, 08:23:34 pm by Legimet »

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: TI-Nspire emulator
« Reply #214 on: June 29, 2013, 01:46:26 am »
Being under 1024, 1000 is a privileged port, so you cannot bind to it as easily as ports above 1024 (needs more privileges) :)
And yup, I use nspire_emu and its GDBstub exclusively under Wine under Linux, even if it's not very stable - crashes do occur, as you're experiencing.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: TI-Nspire emulator
« Reply #215 on: June 29, 2013, 12:54:13 pm »
Now I'm having some success, the nspire_emu doesn't crash, but it freezes after entering "target remote localhost:1024" (I'm trying port 1024 now), so I can't start the program in the emulator (using nTxt as an example)
I compiled it with "-O0 -g" in the GCCFLAGS.

This is the output of nspire_emu:
Spoiler For Spoiler:
(I have a bash alias called nspire_cxcas)
Code: [Select]
$ nspire_cxcas /G=1024



Boot Loader Stage 1 (3.00.99)
Build: 2010/9/9, 17:29:13
Copyright (c) 2006-2010 Texas Instruments Incorporated
Using production keys

Last boot progress: 65

Available system memory: 33196
Checking for NAND: NAND Flash ID: ST Micro NAND256R3A
SDRAM size: 64 MB
Wakeup Event: ON.
SDRAM memory test:   Pass
Clearing SDRAM...Done.
Clocks:  CPU = 132MHz   AHB = 66MHz   APB = 33MHz   
Clearing SDRAM...Done.
Clearing SDRAM...Done.
Boot option: Normal

Loading DIAGS software...

Error reading/validating DIAGS image

Error loading DIAGS. Switching to BOOT2.

Loading BOOT2 software...

99%
BOOT1: loading complete (177 ticks), launching image.



Boot Loader Stage 2 (3.10.16)
Build: 2011/7/6, 14:38:40
Copyright (c) 2006-2010 Texas Instruments Incorporated
Using production keys

Clocks:  CPU = 132MHz   AHB = 66MHz   APB = 33MHz
Checking for NAND: NAND Flash ID: ST Micro NAND256R3A


Initializing graphics subsystem.
Boot option: Normal


Initializing filesystem.
Datalight Reliance v2.10.1150
Copyright (c) 2003-2006 Datalight, Inc.
Datalight FlashFX Pro v3.00 Build 1358
Nucleus Edition for ARM9
Copyright (c) 1993-2006 Datalight, Inc.
Patents: US#5860082, US#6260156.
Filesystem ready.
Purging temporary files...
Deleting file [/tmp/TI-Nspire.tno]

Loading Operating System...

100%

BOOT2: loading complete (822 ticks), launching image.


Beginning system initialization.
Clocks:  CPU = 132 MHz AHB = 66 MHz APB = 33 MHz

Preparing file system. This takes a while...
   POSIX layer initialized.
   POSIX "NULL" device initialized.
   POSIX "CONSOLE" device initialized.
Datalight Reliance v2.10.1150
Copyright (c) 2003-2006 Datalight, Inc.
Datalight FlashFX Pro v3.00 Build 1358
Nucleus Edition for ARM9
Copyright (c) 1993-2006 Datalight, Inc.
Patents: US#5860082, US#6260156.

   POSIX file system initialized.
File system ready.
* No battery door detection
System build date: Aug 14 2011, 10:21:21
Available memory: 48294372 bytes
Purging temporary files...
Launching system...
WLAN Module detached!
------------------ Module is Gone!!
TouchPad Firmware Revision : 01060000

Created Execution Context
RET - Echo UDP: TI_Echo_UDP_Init called +++
RET - ECHO UDP: EchoUDPListenerThread. Inside Thread +++
NavNet Ready.
autodim_power_callback
GDB connected.
Reset

And this is my GDB prompt:
Code: [Select]
$ arm-none-eabi-gdb
GNU gdb (GDB) 7.6
Copyright (C) 2013 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=x86_64-unknown-linux-gnu --target=arm-none-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) file ~/nTxt15/src/nTxt15.elf
Reading symbols from /home/Legimet/nTxt15/src/nTxt15.elf...done.
(gdb) target remote localhost:1024
Remote debugging using localhost:1024
0x00000000 in _nspire_start ()
(gdb) break main
Breakpoint 1 at 0xad0: file texteditor.c, line 62.
(gdb)
« Last Edit: June 29, 2013, 01:00:50 pm by Legimet »

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: TI-Nspire emulator
« Reply #216 on: June 29, 2013, 01:21:31 pm »
Ah, so you actually want to debug a C / C++ program through GDB, not just use the GDBstub to benefit from an external GDB-interoperable debugger instead of the built-in debugger...
I've never done that, and from my work on forward-porting the GDBstub from Ncubate to nspire_emu, I'm not quite sure it's supposed to work (it requires extra support in the debugger, which wasn't updated for Ndless 3.1, IIRC).

ExtendeD (/ Goplat) ?
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: TI-Nspire emulator
« Reply #217 on: June 29, 2013, 01:34:01 pm »
Well, http://hackspire.unsads.com/wiki/index.php/Debugging_programs says that Ncubate had support for GDB, so I assumed it would work in Nspire_emu.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: TI-Nspire emulator
« Reply #218 on: June 29, 2013, 01:38:59 pm »
It worked at some point and in some conditions, but the page indicates:
Quote
This page was last modified on 7 November 2010, at 19:56.
That was in the time of the second generation of Ndless, long before the release of OS 3.1 and the later release of Ndless 3.1.
I'm not authoritative enough on the matter for stating that it definitely does not work with Ndless 3.1, but I'd expect it not to... Sorry.
« Last Edit: June 29, 2013, 01:40:16 pm by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: TI-Nspire emulator
« Reply #219 on: June 29, 2013, 05:44:25 pm »
The GDB stub should work well, but the integration with the Ndless loader seems indeed to have been broken at some point, I'm sorry about that. I'll see what has gone wrong.
Ndless.me with the finest TI-Nspire programs

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: TI-Nspire emulator
« Reply #220 on: July 18, 2013, 03:39:11 pm »
Legimet, everything has been fixed in the latest Ndless/SDK: http://ndlessly.wordpress.com/2013/07/18/gdb-debugging-now-available/
I'm not able to test in on Linux though.
Ndless.me with the finest TI-Nspire programs

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: TI-Nspire emulator
« Reply #221 on: July 19, 2013, 03:24:34 pm »
I will soon install Ndless r848 in nspire_emu, and the Ndless SDK to see if it works.

EDIT: What commands have to be run in GDB?? Nspire_emu gives a segmentation fault, but I might be doing something wrong
« Last Edit: July 19, 2013, 06:01:55 pm by Legimet »

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: TI-Nspire emulator
« Reply #222 on: July 23, 2013, 01:21:49 pm »
Yes, it works now in r866 using the included nspire_emu.exe. :D

And this is unrelated, but in the nspire-gcc, nspire-g++, nspire-ld, and nspire-ld-bflt scripts, could you change $USERPROFILE in the last line (where gcc or g++ is called) to $home so Linux users can put static libraries in .ndless too?

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: TI-Nspire emulator
« Reply #223 on: July 23, 2013, 04:41:32 pm »
Sure, sorry about that. It's commited to the SVN trunk.
Ndless.me with the finest TI-Nspire programs

Offline Boot1

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +1/-0
    • View Profile
Re: TI-Nspire emulator
« Reply #224 on: October 11, 2013, 10:09:02 am »
This message is for Goplat and SpiroH, my humble contribution to these great emulators.

Testing nSpire_emu and kArmTI with some different ROMs I have found a problem emulating the CX prototype. Boot1CX-3.0.0.DEVBUILD rises a warning in the emulator and it breaks:
Code: [Select]
Boot Loader Stage 1 (3.00.DEVBUILD)
Build: 2010/9/14, 16:30:29
Copyright (c) 2006-2010 Texas Instruments Incorporated
Using developer keys

Last boot progress: 65
Warning at PC=00007718: Bad write_byte: 0001c634 00
debug> c

 I have to press c for continue the execution as a workaround.

Last night user fortytwo, in the IRC channel, helped on solving this issue. He changed line 47 of emu.c initializing the boolean break_on_warn flag as false in order to run smoothly. Maybe the emulator could include another command line argument such as /W in order to activate break_on_warn flag from the command line.

fortytwo compiled a test version and it runs smoothly.

The other issue I have is related to the Diags ROM. It can be executed using the following command line:

Code: [Select]
nspire_emu.exe /1=boot1cx.tns  /MX /PD=diagscx.tns
I can not go down and test other systems than memory. And when testing memory it reports a failure in the emulated flash. Is it a failure of the emulator or am I not configuring it correctly?

Thanks

Boot1
« Last Edit: October 11, 2013, 10:13:18 am by Boot1 »