Les membres ayant 30 points peuvent parler sur les canaux annonces, projets et hs du chat.
La shoutbox n'est pas chargée par défaut pour des raisons de performances. Cliquez pour charger.

Forum Casio - Autres questions


Index du Forum » Autres questions » undefined reference to `_Restart' ?


Dexter87 Invité

undefined reference to `_Restart' ?

Posté le 15/10/2019 15:51

Hi guys, can i ask you a little help for a development problem with my cg50 ?

i'm tried to simply restart the Casio, but i always get undefined reference to '_Restart' error.
Some function give me that error (like PowerOff) some not (like GetMainBatteryVoltage), i really don't understand why.
Sorry for my english and for my noob skill
Thank you!



Fichier joint


Lephenixnoir Hors ligne Administrateur Points: 24670 Défis: 170 Message

Citer : Posté le 15/10/2019 15:57 | #


Hi Dexter, apparently your .S file was not compiled. I suspect your Makefile does not have rules for this case.

Also note that the preprocessor will be run on .S files, but the output needs to be valid assembler code. Including a file that uses the C syntax to define prototypes is an error. Using the preprocessor is mostly useful for #ifdef, especially when combined with -D on the command-line.

Edit: The other functions you mention are in libfxgc.a so GCC will take them from the archive silently and not complain.
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)


Dexter87 Invité

Citer : Posté le 15/10/2019 22:09 | #


Lephenixnoir a écrit :
*


Thank for the answer and for the help!

I understood the first part and the last one but I have some difficulties with the central part
Premise: for the configuration i simply extracted the sdk and overwrite the libfxcg on the folder ( changing the name on MKG3AFLAGS in the makefile), nothing else.
I begin to think I did something wrong at this level.

I assume that the assembler code (0x1187 ?) is valid becase i think the error would have been different (or maybe no error at all).

If that can be helpful i attach the folder project:
https://drive.google.com/file/d/11frkIpl3KM9w8dt_9l96GbhZRn1KOnEm/view?usp=sharing

Thanks again for the help, there is very little information and help on these libraries
Lephenixnoir Hors ligne Administrateur Points: 24670 Défis: 170 Message

Citer : Posté le 15/10/2019 22:23 | #


Alright, so the middle part is less complicated than it looks, especially since I read something wrong. ^^'"

I assume that the assembler code (0x1187 ?) is valid becase i think the error would have been different (or maybe no error at all).

Actually by "assembler code" I mean the syntax of the file. If you #include a C header then your .S file will contain C code, and the assembler will be confused.

I thought it was the case, but I have misread your image (I thought you had included system.h in Restart.S). Sorry for the confusion.

-

I think a key point here is that you added Restart.S to the libfxcg source directory instead of your project's file. This is fine, but then you need to recompile libfxcg.a or your new file will never be used. There is a Makefile in the libfxcg folder: you definitely need to run that before you try to link your project.

Be careful though - this will overwrite libfxcg.a. Since you mentioned that you have overwritten it manually, please make sure you lose no work in the process.

If you need information on the library, please look up Cemetech's WikiPrizm: http://prizm.cemetech.net/index.php/Main_Page
In particular the "All Pages" page is a useful index: http://prizm.cemetech.net/index.php/Special:AllPages

(If you can, please consider attaching your files to your post using the "Fichier joint" input in the form. This will make the thread easier to follow if the files ever goes away from Google Drive. )
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)


Dexter87 Invité

Citer : Posté le 16/10/2019 22:30 | #


I simply move the entire libfxcg folder on the project folder, all works now! Thank you so much! I feel like an idiot
Lephenixnoir Hors ligne Administrateur Points: 24670 Défis: 170 Message

Citer : Posté le 16/10/2019 22:35 | #


That'd be a bit extreme, but why not. Try and keep the two separated if possible to keep the code structure clean.

Feel free to ask if you run into another problem. Also, whatever you develop with that cg50 is certainly welcome here.
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)

LienAjouter une imageAjouter une vidéoAjouter un lien vers un profilAjouter du codeCiterAjouter un spoiler(texte affichable/masquable par un clic)Ajouter une barre de progressionItaliqueGrasSoulignéAfficher du texte barréCentréJustifiéPlus petitPlus grandPlus de smileys !
Cliquez pour épingler Cliquez pour détacher Cliquez pour fermer
Alignement de l'image: Redimensionnement de l'image (en pixel):
Afficher la liste des membres
:bow: :cool: :good: :love: ^^
:omg: :fusil: :aie: :argh: :mdr:
:boulet2: :thx: :champ: :whistle: :bounce:
valider
 :)  ;)  :D  :p
 :lol:  8)  :(  :@
 0_0  :oops:  :grr:  :E
 :O  :sry:  :mmm:  :waza:
 :'(  :here:  ^^  >:)

Σ π θ ± α β γ δ Δ σ λ
Veuillez donner la réponse en chiffre
Vous devez activer le Javascript dans votre navigateur pour pouvoir valider ce formulaire.

Si vous n'avez pas volontairement désactivé cette fonctionnalité de votre navigateur, il s'agit probablement d'un bug : contactez l'équipe de Planète Casio.

Planète Casio v4.3 © créé par Neuronix et Muelsaco 2004 - 2024 | Il y a 131 connectés | Nous contacter | Qui sommes-nous ? | Licences et remerciements

Planète Casio est un site communautaire non affilié à Casio. Toute reproduction de Planète Casio, même partielle, est interdite.
Les programmes et autres publications présentes sur Planète Casio restent la propriété de leurs auteurs et peuvent être soumis à des licences ou copyrights.
CASIO est une marque déposée par CASIO Computer Co., Ltd