π
<-
Chat plein-écran
[^]

Dynamic linking of a library on NSpire/Ndless

C, C++, ASM...

Dynamic linking of a library on NSpire/Ndless

Message non lude SlyVTT » 07 Mar 2021, 20:23

Hello,

I am still working on my GUI toolkit but I can see one possible problem in a near future : size of the executable may quickly become sufficiently big to limit the use of the toolkit for numerous projects / applications.

The best would be to be able to create a library containing all the classes and methods and link this library dynamically to the application program(s), so what the "repetitive" part of the code would just be written once on the calculator and hence save a large amount of "disk" space.

I tried to check if it is possible to create dynamically linked libraries with Ndless on TI NSpire, but just found this Github https://github.com/nspiredev500/nspire-dynamic-linking-PoC from nspiredev500 through the codewalr.us page here : https://codewalr.us/index.php?topic=2554.0 ... and to be honnest, it is not cristal clear if the PoC can be transferred to an actual "full size program". It also seems to be based on a replacement OS called OSExt, so no proof it is actually working on a "standard" (I don't think the wording is correct, but I cannot find something better :D ) Ndless program.

Considering the fact that the last update of the GitHub repository is quite old (almost one year and half), maybe is there a better way (or at least better documented way) of making a dynamic library and to link to an application program on NSpire with Ndless.

Does anyone already encountered that issue and managed it ?

Thanks in advance

Sly
Some works in progress :
The GUI Toolkit NF for nSpireMyShmup for fxCG-50Magic Light for Casio Graph 90+E
and
Magic Light for nSpire CX/CX-II
Simple Text Editor for nSpireOutRun for Casio Graph 90+E
95%
50%
100%
75%
100%
And more to come ... stay tuned
Avatar de l’utilisateur
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 42.9%
 
Messages: 481
Images: 31
Inscription: 19 Jan 2021, 09:41
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
GitHub: SlyVTT

Re: Dynamic linking of a library on NSpire/Ndless

Message non lude nspiredev500 » 24 Juil 2021, 20:29

Hi,
I'm the one who made the dynamic linking PoC.
Sorry for replying so late, I had another project and I'm now studying computer science, so I don't have so much free time anymore.
For now the PoC cannot be used easily, but I'm working on something like that. I want to develop a on-calc C toolchain an a part of that is a linker.
When the linker is finished, I will make it a separate program that can open elf files and automatically links in the libraries at runtime.
I actually want to submit some changes to Ndless to make it even more efficient, e.g. sharing the code segment in memory with other programs, so If resident programs depend on the library, only one copy is using up RAM.
I looked at my linker and I think it can already sucessfully link an ELF file to a ZEHN file. At that point I can just include the ZEHN loader and the program can run linked from RAM.
I think I will be finished with it this year, at least the basic version without the optimizations that have to be integrated into Ndless itself.

By the way, I think I will use your widget library for the on-calc IDE :) .

nspiredev500
Avatar de l’utilisateur
nspiredev500
Niveau 4: MC (Membre Confirmé)
Niveau 4: MC (Membre Confirmé)
Prochain niv.: 16%
 
Messages: 17
Inscription: 03 Juil 2020, 12:22
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile
GitHub: nspiredev500

Re: Dynamic linking of a library on NSpire/Ndless

Message non lude SlyVTT » 25 Juil 2021, 11:00

Hi Nspiredev500,

very nice to read you are still working on that.
I had also to pause the development of the GUI Toolkit for 2 months as I was extremely busy at work, but even if my fingers where not hitting the keyboard for some weeks, I am thinking on the new revision (let say rev 1.0+) with rewritten code and introduction of new architecture.
The target is to be more efficient and more versatile. i will try to take benefit of the first revisions mistakes to improve the toolkit.

Please let us know when you have something working, for sure it would be a great enhancement of Ndless.

Sly
Some works in progress :
The GUI Toolkit NF for nSpireMyShmup for fxCG-50Magic Light for Casio Graph 90+E
and
Magic Light for nSpire CX/CX-II
Simple Text Editor for nSpireOutRun for Casio Graph 90+E
95%
50%
100%
75%
100%
And more to come ... stay tuned
Avatar de l’utilisateur
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 42.9%
 
Messages: 481
Images: 31
Inscription: 19 Jan 2021, 09:41
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
GitHub: SlyVTT

Re: Dynamic linking of a library on NSpire/Ndless

Message non lude nspiredev500 » 27 Mar 2022, 21:11

Hey, I'm back to nspire development right now, and started working on the Ndless improvements and dynamic linker.
After looking a bit into dynamic linking I realized that sharing code segments isn't possible when all programs share an address space, but not sharing segments just makes linking easier. I'm rewriting the linker in C++, using proper data structures should make it much easier. But reading my last post here, I'm not making any time gurantees this time :funny: .

But another thing I'm looking into is sort of dynamic static linking: newlib can only be linked statically, so if my linker can also do static linking and you copy libc.a to the calculator, you won't have to include libc in every executable.

nspiredev500
Avatar de l’utilisateur
nspiredev500
Niveau 4: MC (Membre Confirmé)
Niveau 4: MC (Membre Confirmé)
Prochain niv.: 16%
 
Messages: 17
Inscription: 03 Juil 2020, 12:22
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile
GitHub: nspiredev500

Re: Dynamic linking of a library on NSpire/Ndless

Message non lude sadyh » 23 Déc 2023, 20:48

The menu options for the nspire CAS are a bit different: menu>actions(1)>library(7)>refresh library(1)
Avatar de l’utilisateur
sadyh
Niveau 0: MI (Membre Inactif)
Niveau 0: MI (Membre Inactif)
Prochain niv.: 80%
 
Messages: 3
Inscription: 23 Déc 2023, 11:03
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile


Retourner vers Native: Ndless, Linux, ...

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 3 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.
825 utilisateurs:
>805 invités
>15 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)