π
<-

KhiCAS, le moteur formel Giac/Xcas pour toutes TI-Nspire

:32tins: :32tinsktpb: :32tinsktpn: :32tinscas: :32tinstpkc: :32tinstpktpb: :32tinstp: :32tinscastp: :32tinscmc: :32tinscx: :32tinscxcas:

Re: KhiCAS, le moteur formel Giac/Xcas pour toutes TI-Nspire

Unread postby Adriweb » 13 Apr 2016, 10:51

I confirm I've successfully built the toolchain recently on Mac OS X 10.11, so it's definitely feasible.

In my Luna makefile (I just built it, works fine), I have this:
Code: Select all
CFLAGS:= -Wall -DUSE_FILE32API -Wno-unused-parameter -I/usr/local/opt/openssl/include -I/usr/include/
LDFLAGS:= -lssl -lz -lcrypto -L/usr/local/opt/openssl/lib -L/usr/local/Cellar/zlib/1.2.8/lib/
VPATH := minizip-1.1

You may need to install openssl (I have it installed with brew (brew install openssl))

________

Edit: In theory, I could provide a mac prebuilt luna, if you need that. (I'd also want to look if it's possible to build it with the mac's openssl)

Edit2: technically, you probably don't even need to install brew and openssl, you might only just need its header... which is in the Mac SDK anyway if you have installed Xcode, for instance (for me it's in /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-migrator/sdk/MacOSX.sdk/usr/include/openssl/opensslconf.h)

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
My calculator programs
Mes programmes pour calculatrices
User avatar
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 78.9%
 
Posts: 14744
Images: 1119
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Twitter: adriweb
GitHub: adriweb

Re: KhiCAS, le moteur formel Giac/Xcas pour toutes TI-Nspire

Unread postby parisse » 13 Apr 2016, 11:44

I've fixed the problem for luna (it was CC incorrectly set to nspire-gcc which is required later for building gmp and mpfr/mpfi).
But now
g++ -Wall -Wextra -std=c++11 -I elfio-2.2 genzehn.cpp -lboost_program_options -lz -o ../../bin/genzehn || g++ -Wall -Wextra -std=c++11 -I elfio-2.2 genzehn.cpp -lboost_program_options-mt -lz -o ../../bin/genzehn
genzehn.cpp:8:10: fatal error: 'boost/program_options.hpp' file not found
#include <boost/program_options.hpp>
^

Ok, adding -I/usr/local/include -L/usr/local/lib fixes it.
User avatar
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 86%
 
Posts: 3663
Joined: 13 Dec 2013, 16:35
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: KhiCAS, le moteur formel Giac/Xcas pour toutes TI-Nspire

Unread postby parisse » 13 Apr 2016, 11:45

Now it's
tail --bytes=+4 ndless_installer.lua.tpl > ndless_installer.lua.nobom.tpl.tmp
tail: illegal option -- -
usage: tail [-F | -f | -r] [-q] [-b # | -c # | -n #] [file ...]
make[3]: *** [ndless_installer.lua] Error 1
make[2]: *** [build-installer-3.6] Error 2
make[1]: *** [build-src] Error 2
make: *** [build-ndless] Error 2

But the sdk seems to be built so I think I can leave it.
User avatar
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 86%
 
Posts: 3663
Joined: 13 Dec 2013, 16:35
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: KhiCAS, le moteur formel Giac/Xcas pour toutes TI-Nspire

Unread postby Vogtinator » 13 Apr 2016, 12:03

You need to install the openssl development headers. Read http://stackoverflow.com/questions/3296 ... nt-headers if you're using El Capitan.
User avatar
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Level up: 1.6%
 
Posts: 217
Joined: 29 Mar 2014, 15:55
Gender: Male
Calculator(s):
MyCalcs profile

Re: KhiCAS, le moteur formel Giac/Xcas pour toutes TI-Nspire

Unread postby parisse » 13 Apr 2016, 12:10

Now, I made a first try with gdb arm, and it seems I can trace, it's a nice progress to debug. But printing variables inside the nspire console rebooted the emulator. I'll try with the console version of giac, once I can build it again (clrscr seems to have disappeared...).
User avatar
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 86%
 
Posts: 3663
Joined: 13 Dec 2013, 16:35
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: KhiCAS, le moteur formel Giac/Xcas pour toutes TI-Nspire

Unread postby parisse » 13 Apr 2016, 12:25

Unfortunately it also reboots if I run from the debugger
p g.dbgprint()
where dbgprint() is a method of the class gen (g is of type gen) that does a call to print on the nspire console.
Is there a way to make the dbgprint() method to print on the gdb console?
User avatar
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 86%
 
Posts: 3663
Joined: 13 Dec 2013, 16:35
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: KhiCAS, le moteur formel Giac/Xcas pour toutes TI-Nspire

Unread postby Vogtinator » 13 Apr 2016, 12:42

parisse wrote:Now, I made a first try with gdb arm, and it seems I can trace, it's a nice progress to debug. But printing variables inside the nspire console rebooted the emulator. I'll try with the console version of giac, once I can build it again (clrscr seems to have disappeared...).


You need to define OLD_SCREEN_API in the Makefile.

Now, I made a first try with gdb arm, and it seems I can trace, it's a nice progress to debug. But printing variables inside the nspire console rebooted the emulator.

Unfortunately it also reboots if I run from the debugger
p g.dbgprint()
where dbgprint() is a method of the class gen (g is of type gen) that does a call to print on the nspire console.

Ok, I'll have a look at that. Could you upload your .elf and .tns and state your GDB version so I can easily reproduce?

Is there a way to make the dbgprint() method to print on the gdb console?

Not directly, no. You can use the calc's serial console or return the output as char*.
User avatar
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Level up: 1.6%
 
Posts: 217
Joined: 29 Mar 2014, 15:55
Gender: Male
Calculator(s):
MyCalcs profile

Re: KhiCAS, le moteur formel Giac/Xcas pour toutes TI-Nspire

Unread postby parisse » 13 Apr 2016, 13:06

Excellent, I'll try to return a char *.
I have recompiled the module without -Os flag, (otherwise tracing with gdb is difficult) but this time genzehn reports
genzehn --info --input luagiac.luax.tns
Zehn header starts at byte 0x3b24
49125 relocations
8 flags
8 bytes extra data
10813120 bytes needed to load this file
3663763 bytes Zehn executable file
Entry point: 0
This file is compressed (type 0)

Therefore can you raise the limit to debug a program?

You can get the -Os binaries at http://www-fourier.ujf-grenoble.fr/~parisse/calc/nspiregiac.tgz
gdb is GNU gdb (GDB) 7.10
User avatar
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 86%
 
Posts: 3663
Joined: 13 Dec 2013, 16:35
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: KhiCAS, le moteur formel Giac/Xcas pour toutes TI-Nspire

Unread postby Vogtinator » 13 Apr 2016, 13:14

parisse wrote:Excellent, I'll try to return a char *.
I have recompiled the module without -Os flag, (otherwise tracing with gdb is difficult) but this time genzehn reports
genzehn --info --input luagiac.luax.tns
Zehn header starts at byte 0x3b24
49125 relocations
8 flags
8 bytes extra data
10813120 bytes needed to load this file
3663763 bytes Zehn executable file
Entry point: 0
This file is compressed (type 0)

Therefore can you raise the limit to debug a program?

I raised it to 12MiB, untested ndless_resources.tns attached. It's in ndless/src/resources/ndless.h (emu_debug_alloc_size), so you can change it yourself as well.

You can get the -Os binaries at http://www-fourier.ujf-grenoble.fr/~parisse/calc/nspiregiac.tgz
gdb is GNU gdb (GDB) 7.10

I'll have a look at it later, thanks!
You do not have the required permissions to view the files attached to this post.
User avatar
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Level up: 1.6%
 
Posts: 217
Joined: 29 Mar 2014, 15:55
Gender: Male
Calculator(s):
MyCalcs profile

Re: KhiCAS, le moteur formel Giac/Xcas pour toutes TI-Nspire

Unread postby parisse » 13 Apr 2016, 15:04

It does not work, the emulator reboots as soon as I run khicas.
I think the best at this time is to keep -Os for all files except for 2 or 3 that are traced.
dbgprint() now returns a const char *, therefore I can see an answer in the gdb console, but it's very unstable, I mean I get one time an answer, then the next time the emulator reboots, and if I run c (continue) then at the end it reboots. It's better than adding cout and recompile, but it's too unstable to make effective debugging sessions.
Perhaps it's more stable inside the console giac.tns, I did not try.
If you want to try it yourself, I did the following:
1/ transfer luagiac.luax.tns and khicas.tns to emulator
2/ run arm gdb, run the macro (from my .gdbinit file)
echo Defining v as print command for giac types\n
define v
print ($arg0).dbgprint()
end
3/ target remote :3333
3/ b giac::_factor
4/ c
5/ run khicas on emulator, enter factor(x^4-1)
6/ this raises the breakpoint
p args
displays the gen structure
v args
displays the value of args
try a few n
try again to v some gens
the v args command sometimes work, sometimes reboots the emulator. Sometimes firebird does not close nicely and you loose some keystrokes and the emulator reboots (I had to reboot the mac to avoid that).
If you run c (continue) and you have run one v the emulator reboots, otherwise you are back in the khicas history.
User avatar
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 86%
 
Posts: 3663
Joined: 13 Dec 2013, 16:35
Gender: Not specified
Calculator(s):
MyCalcs profile

PreviousNext

Return to News TI-Nspire

Who is online

Users browsing this forum: ClaudeBot [spider] and 18 guests

-
Search
-
Social TI-Planet
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
847 utilisateurs:
>833 invités
>7 membres
>7 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)