Page 1 sur 2

Compilation deps Khicas

Message non luPosté: 05 Mar 2021, 17:02
de legmask
Bonjour M. parisse

J'essaie depuis hier de compiler khicas, et j'y suis presque :D
Le seul problème c'est que dès que j'ai besoin de compiler la deps micropython j'obtient une erreur que j'ai pas réussi a résoudre ....

Code: Tout sélectionner
/home//gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: error: build/py/mpstate.o uses VFP register arguments, micropython does not
/home//gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file build/py/mpstate.o
/home//gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: error: build/py/nlr.o uses VFP register arguments, micropython does not
/home//gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file build/py/nlr.o
/home//gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: error: build/py/nlrx86.o uses VFP register arguments, micropython does not
/home//gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file build/py/nlrx86.o
/home//gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: error: build/py/nlrx64.o uses VFP register arguments, micropython does not
/home//gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file build/py/nlrx64.o
/home//gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: error: build/py/nlrthumb.o uses VFP register arguments, micropython does not
/home//gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file build/py/nlrthumb.o
/home//gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: error: build/py/nlrpowerpc.o uses VFP register arguments, micropython does not
/home//gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file build/py/nlrpowerpc.o
/home//gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: error: build/py/nlrxtensa.o uses VFP register arguments, micropython does not
/home//gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file build/py/nlrxtensa.o
/home//gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: error: build/py/nlrsetjmp.o uses VFP register arguments, micropython does not
...


Si vous pouvez m'aider ...
Merci d'avance
Gmask

Re: Compilation deps Khicas

Message non luPosté: 05 Mar 2021, 17:16
de parisse
C'est pour quelle plateforme? Numworks ou Nspire?

Re: Compilation deps Khicas

Message non luPosté: 05 Mar 2021, 17:28
de legmask
parisse a écrit:C'est pour quelle plateforme? Numworks ou Nspire?


Comme pour la catégorie du forum :p Numworks

Re: Compilation deps Khicas

Message non luPosté: 05 Mar 2021, 17:31
de parisse
Bon, c'est pour Numworks, je n'avais pas vu le forum.
Alors dans le repertoire micropython-1.12/numworks du repertoire giac-1.6.0, le plus simple c'est d'editer l'avant-derniere ligne du fichier mklib pour mettre le bon chemin pour copier la libmicropython.a. Ensuite il suffit de faire ./mklib.
(C'est surement possible de faire ca bien proprement dans le Makefile, mais je n'ai pas le temps ni l'envie de comprendre comment il est construit pour le modifier.)
Une fois libmicropython.a dans le bon repertoire, giac devrait linker.

Re: Compilation deps Khicas

Message non luPosté: 05 Mar 2021, 17:36
de Adriweb
Ben en fait ca veut surtout dire qu'il faut compiler toutes les parties de la meme facon (avec les memes flags gcc etc. au moins pour cette histoire de VFP arguments. peut etre un rapport avec le support soft/hard floats, je sais pas :P)

Re: Compilation deps Khicas

Message non luPosté: 05 Mar 2021, 17:41
de legmask
parisse a écrit:Bon, c'est pour Numworks, je n'avais pas vu le forum.
Alors dans le repertoire micropython-1.12/numworks du repertoire giac-1.6.0, le plus simple c'est d'editer l'avant-derniere ligne du fichier mklib pour mettre le bon chemin pour copier la libmicropython.a. Ensuite il suffit de faire ./mklib.
(C'est surement possible de faire ca bien proprement dans le Makefile, mais je n'ai pas le temps ni l'envie de comprendre comment il est construit pour le modifier.)
Une fois libmicropython.a dans le bon repertoire, giac devrait linker.


Bah elle est deja dans le bon dossier, ... pourtant ca ne marche toujours pas j'ai toujours la même erreur du début lors du build avec en entry point make -f Makefile.numworks

Re: Compilation deps Khicas

Message non luPosté: 05 Mar 2021, 18:08
de parisse
Bon, si on suit la suggestion d'Adriweb qui correspond au message d'erreur, il faut verifier que les flags de compilation sont a -mfloat-abi=hard -m
cpu=cortex-m7 -mfpu=fpv5-sp-d16 partout quand on compile. Il me semble qu'ils y sont dans le Makefile.numworks de micropython-1.12 et aussi dans les Makefile.numworks du repertoire src de giac. Un make clean et un make -f Makefile.numworks V=1 devrait permettre de verifier.

Re: Compilation deps Khicas

Message non luPosté: 06 Mar 2021, 16:34
de legmask
Il me semble bien qu'il y ait les bons flags
Code: Tout sélectionner
CC ../py/modmath.c
arm-none-eabi-gcc -DNUMWORKS -DMICROPY_LIB -I. -I.. -I../py -Ibuild -Wall -Werror -Wno-error=cpp -Wno-error=format -ansi -std=gnu99 -DFFCONF_H=\"lib/oofatfs/ffconf.h\" -Ofast -g   -mthumb -march=armv7e-m -mfloat-abi=hard  -mcpu=cortex-m7 -mfpu=fpv5-sp-d16  -fdata-sections -ffunction-sections -fno-strict-aliasing -fno-exceptions  -c -MD -o build/py/modmath.o ../py/modmath.c
CC ../py/modcmath.c
arm-none-eabi-gcc -DNUMWORKS -DMICROPY_LIB -I. -I.. -I../py -Ibuild -Wall -Werror -Wno-error=cpp -Wno-error=format -ansi -std=gnu99 -DFFCONF_H=\"lib/oofatfs/ffconf.h\" -Ofast -g   -mthumb -march=armv7e-m -mfloat-abi=hard  -mcpu=cortex-m7 -mfpu=fpv5-sp-d16  -fdata-sections -ffunction-sections -fno-strict-aliasing -fno-exceptions  -c -MD -o build/py/modcmath.o ../py/modcmath.c
CC ../py/modmicropython.c
arm-none-eabi-gcc -DNUMWORKS -DMICROPY_LIB -I. -I.. -I../py -Ibuild -Wall -Werror -Wno-error=cpp -Wno-error=format -ansi -std=gnu99 -DFFCONF_H=\"lib/oofatfs/ffconf.h\" -Ofast -g   -mthumb -march=armv7e-m -mfloat-abi=hard  -mcpu=cortex-m7 -mfpu=fpv5-sp-d16  -fdata-sections -ffunction-sections -fno-strict-aliasing -fno-exceptions  -c -MD -o build/py/modmicropython.o ../py/modmicropython.c
CC ../py/modstruct.c
arm-none-eabi-gcc -DNUMWORKS -DMICROPY_LIB -I. -I.. -I../py -Ibuild -Wall -Werror -Wno-error=cpp -Wno-error=format -ansi -std=gnu99 -DFFCONF_H=\"lib/oofatfs/ffconf.h\" -Ofast -g   -mthumb -march=armv7e-m -mfloat-abi=hard  -mcpu=cortex-m7 -mfpu=fpv5-sp-d16  -fdata-sections -ffunction-sections -fno-strict-aliasing -fno-exceptions  -c -MD -o build/py/modstruct.o ../py/modstruct.c
CC ../py/modsys.c
arm-none-eabi-gcc -DNUMWORKS -DMICROPY_LIB -I. -I.. -I../py -Ibuild -Wall -Werror -Wno-error=cpp -Wno-error=format -ansi -std=gnu99 -DFFCONF_H=\"lib/oofatfs/ffconf.h\" -Ofast -g   -mthumb -march=armv7e-m -mfloat-abi=hard  -mcpu=cortex-m7 -mfpu=fpv5-sp-d16  -fdata-sections -ffunction-sections -fno-strict-aliasing -fno-exceptions  -c -MD -o build/py/modsys.o ../py/modsys.c
CC ../py/moduerrno.c
arm-none-eabi-gcc -DNUMWORKS -DMICROPY_LIB -I. -I.. -I../py -Ibuild -Wall -Werror -Wno-error=cpp -Wno-error=format -ansi -std=gnu99 -DFFCONF_H=\"lib/oofatfs/ffconf.h\" -Ofast -g   -mthumb -march=armv7e-m -mfloat-abi=hard  -mcpu=cortex-m7 -mfpu=fpv5-sp-d16  -fdata-sections -ffunction-sections -fno-strict-aliasing -fno-exceptions  -c -MD -o build/py/moduerrno.o ../py/moduerrno.c
CC ../py/modthread.c
arm-none-eabi-gcc -DNUMWORKS -DMICROPY_LIB -I. -I.. -I../py -Ibuild -Wall -Werror -Wno-error=cpp -Wno-error=format -ansi -std=gnu99 -DFFCONF_H=\"lib/oofatfs/ffconf.h\" -Ofast -g   -mthumb -march=armv7e-m -mfloat-abi=hard  -mcpu=cortex-m7 -mfpu=fpv5-sp-d16  -fdata-sections -ffunction-sections -fno-strict-aliasing -fno-exceptions  -c -MD -o build/py/modthread.o ../py/modthread.c

Re: Compilation deps Khicas

Message non luPosté: 06 Mar 2021, 16:39
de legmask
Je souligne que j'ai toujours la même erreur ...

Re: Compilation deps Khicas

Message non luPosté: 06 Mar 2021, 19:43
de parisse
Pour micropython les flags paraissent bons, il faut juste verifier que libmicropython.a est bien genere (on ne genere pas d'executable independant micropython donc ce n'est pas grave si ca linke mal) et il faut recopier libmicropython.a au bon endroit (... -> nw-external-apps/apps/KhiCAS chez moi).
Ensuite il faut regarder si la compilation de giac se fait avec les bons flags, chez moi c'est par make -f Makefile.numworks.n0110, puis il faut recopier libgiac.a au meme endroit que libmicropython.a, dans le repertoire ou il y a le Makefile final qui va creer les extensions.