Posté le 28/06/2025 05:50
Planète Casio v4.3 © créé par Neuronix et Muelsaco 2004 - 2025 | Il y a 86 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
Citer : Posté le 28/06/2025 09:16 | #
This is where you can find that header:
/home/el/.local/share/fxsdk/sysroot/lib/gcc/sh3eb-elf/14.1.0/include/stdint-gcc.h
% fxsdk path sysroot
/home/el/.local/share/fxsdk/sysroot
Whether it is needed or not, and whether GCC looks there or not, depends on flags including but not limited to -ffreestanding; I mostly forgot about this now as I haven't run into this issue in a few years.
Citer : Posté le 28/06/2025 09:20 | #
You can find some previous experience here by KikoodX on vscode : https://www.planet-casio.com/Fr/forums/topic13572-72-gint-un-noyau-pour-developper-des-add-ins.html#191061
This is in French but no doubt you can easily understand.
This is a almost 2,5yr-old post but should remains mostly the same. Sorry, I cannot recall having read something for Neovim.
Do not hesitate to put info here in case of success.
Citer : Posté le 28/06/2025 18:12 | #
slight correction Sly, my post is regarding clangd configuration on neovim. so it should work perfectly fine for the op.
nowadays i would probably try running bear -- fxsdk build-cg in order to try to generate compile_commands.json automatically, and fallback on writing compile_flags.txt manually if it fails
Citer : Posté le 28/06/2025 18:14 | #
Ok nice. Thanks Kdx
So this is perfectly in line with the question. Thanks
Citer : Posté le 28/06/2025 20:27 | #
Setting compile_flags.txt manually seems to have worked, thanks! I'd tried that before, but I think I was missing the -DFXCG50 flag so some types wouldn't be defined.
The generated compile_commands.json doesn't work since it doesn't find the sysroot/lib/gcc/sh3eb-elf/<version>/include path for stdint-gcc.h. I can add it manually, but that kind of defeats the point of auto generating the file, and clangd still complains about unrecognized compiler flags even though it's set to use the sh-elf-gcc compiler. Unless I find some way of making it work "out of the box", a simple compile_flags.txt is fine, so I think I'll just keep the file around and copy it over to new projects.
For anyone interested, the flags needed (basically the same from the linked thread):
-DFXCG50
-I<path/to/home>/.local/share/fxsdk/sysroot/lib/gcc/sh3eb-elf/<version>/include
-I<path/to/home>/.local/share/fxsdk/sysroot/sh3eb-elf/include