π
<-
Chat plein-écran
[^]

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

Message non lude Adriweb » 13 Avr 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: Tout sélectionner
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)
Image

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...)
Avatar de l’utilisateur
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 80.2%
 
Messages: 14616
Images: 1218
Inscription: 01 Juin 2007, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Twitter/X: adriweb
GitHub: adriweb

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

Message non lude parisse » 13 Avr 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.
Avatar de l’utilisateur
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 78%
 
Messages: 3511
Inscription: 13 Déc 2013, 16:35
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

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

Message non lude parisse » 13 Avr 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.
Avatar de l’utilisateur
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 78%
 
Messages: 3511
Inscription: 13 Déc 2013, 16:35
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

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

Message non lude Vogtinator » 13 Avr 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.
Avatar de l’utilisateur
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Prochain niv.: 1.6%
 
Messages: 217
Inscription: 29 Mar 2014, 15:55
Genre: Homme
Calculatrice(s):
MyCalcs profile

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

Message non lude parisse » 13 Avr 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...).
Avatar de l’utilisateur
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 78%
 
Messages: 3511
Inscription: 13 Déc 2013, 16:35
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

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

Message non lude parisse » 13 Avr 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?
Avatar de l’utilisateur
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 78%
 
Messages: 3511
Inscription: 13 Déc 2013, 16:35
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

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

Message non lude Vogtinator » 13 Avr 2016, 12:42

parisse a écrit: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*.
Avatar de l’utilisateur
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Prochain niv.: 1.6%
 
Messages: 217
Inscription: 29 Mar 2014, 15:55
Genre: Homme
Calculatrice(s):
MyCalcs profile

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

Message non lude parisse » 13 Avr 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
Avatar de l’utilisateur
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 78%
 
Messages: 3511
Inscription: 13 Déc 2013, 16:35
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

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

Message non lude Vogtinator » 13 Avr 2016, 13:14

parisse a écrit: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!
Fichiers joints
ndless_resources.tns
12MiB emu debug size
(307.71 Kio) Téléchargé 91 fois
Avatar de l’utilisateur
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Prochain niv.: 1.6%
 
Messages: 217
Inscription: 29 Mar 2014, 15:55
Genre: Homme
Calculatrice(s):
MyCalcs profile

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

Message non lude parisse » 13 Avr 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.
Avatar de l’utilisateur
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 78%
 
Messages: 3511
Inscription: 13 Déc 2013, 16:35
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

PrécédenteSuivante

Retourner vers News TI-Nspire

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 132 invités

-
Rechercher
-
Social TI-Planet
-
Sujets à la une
Comparaisons des meilleurs prix pour acheter sa calculatrice !
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
Phi NumWorks jailbreak
123
-
Faire un don / Premium
Pour plus de concours, de lots, de tests, nous aider à payer le serveur et les domaines...
Faire un don
Découvrez les avantages d'un compte donateur !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partenaires et pub
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
1305 utilisateurs:
>1276 invités
>24 membres
>5 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Autres sites intéressants
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)