Unable to make using the sh-elf toolchain #4

Closed
opened 2019-10-25 20:16:50 +02:00 by Ghost · 6 comments

After following the new cross-compiler tutorial (which gives a single sh-elf-gcc binary), I can't build gint, as I get this error:

> fxconv font5x7.png
error: non-trivial architecture for sh-elf must be specified
make: *** [Makefile:110: src/font5x7.png.o] Error 1
After following the new [cross-compiler tutorial](https://www.planet-casio.com/Fr/forums/topic12970-1-%5bTutoriel%5d_Compiler_sous_Linux_avec_un_cross-compilateur_gcc.html) (which gives a single sh-elf-gcc binary), I can't build gint, as I get this error: ``` > fxconv font5x7.png error: non-trivial architecture for sh-elf must be specified make: *** [Makefile:110: src/font5x7.png.o] Error 1 ```
Owner

Can you please build with make VERBOSE=1 and show the command-line? It should be something like this:

> fxconv font5x7.png
fxconv -f ../src/font5x7.png -o src/font5x7.png.o --fx --toolchain=sh-elf name:gint_font5x7 charset:ascii grid.size:5x7 grid.padding:1 grid.border:0

When --fx is specified the model name is set by fxconv to fx. Since the arch is not specified, but the toolchain is sh-elf, fxconv understands that it should use -m3.

The commit that introduced --fx in the Makefile is 4a8ba82f; it dates back to the 12th of September.

Can you please build with `make VERBOSE=1` and show the command-line? It should be something like this: ``` > fxconv font5x7.png fxconv -f ../src/font5x7.png -o src/font5x7.png.o --fx --toolchain=sh-elf name:gint_font5x7 charset:ascii grid.size:5x7 grid.padding:1 grid.border:0 ``` When `--fx` is specified the model name is set by fxconv to `fx`. Since the arch is not specified, but the toolchain is `sh-elf`, fxconv understands that it should use `-m3`. The commit that introduced `--fx` in the Makefile is 4a8ba82f; it dates back to the 12th of September.
Author

Just to make sure I've done everything right since the beginning, here's what I've done to configure and build:

Configured with sh-elf for fx9860g

[jeremii@brs-laptop build.fx]$ ../configure --target=fx9860g --toolchain=sh-elf
No prefix specified, let's ask the compiler:
  sh-elf-gcc --print-search-dirs | grep install | sed 's/install: //'
Got '/home/jeremii/opt/sh-elf-2.33.1-9.2.0/lib/gcc/sh3eb-elf/9.2.0/'.

Configuration saved in Makefile.cfg, ready to make!

Then make

[jeremii@brs-laptop build.fx]$ make VERBOSE=1
> fxconv font5x7.png
fxconv -f ../src/font5x7.png -o src/font5x7.png.o \
--fx --toolchain=sh-elf name:gint_font5x7 \
charset:ascii grid.size:5x7 grid.padding:1 grid.border:0
error: non-trivial architecture for sh-elf must be specified
make: *** [Makefile:110: src/font5x7.png.o] Error 1

For extra safety, I checked if i had the 4a8ba82f commit, and sure enough I do:

[jeremii@brs-laptop build.fx]$ git log --oneline -n 15
95a3345 (HEAD -> compat, origin/compat) keyboard: add keydown() in the model
86cd9b9 small improvements
a05d341 std: support integer size formats (hh, h, l, ll)
fc7aab6 dma: finalize dma_memset() and dma_memcpy()
15558c8 support data loading in ILRAM, XRAM and YRAM
bb77e45 dma: fix freezes when transferring to/from IL memory
552b9b9 dma: only expose API on fxcg50
5630814 core: allow custom panics and exception catching
9a4ae4c minor new definitions
4a8ba82 truly support custom toolchains (almost)
Just to make sure I've done everything right since the beginning, here's what I've done to configure and build: Configured with sh-elf for fx9860g ``` [jeremii@brs-laptop build.fx]$ ../configure --target=fx9860g --toolchain=sh-elf No prefix specified, let's ask the compiler: sh-elf-gcc --print-search-dirs | grep install | sed 's/install: //' Got '/home/jeremii/opt/sh-elf-2.33.1-9.2.0/lib/gcc/sh3eb-elf/9.2.0/'. Configuration saved in Makefile.cfg, ready to make! ``` Then make ``` [jeremii@brs-laptop build.fx]$ make VERBOSE=1 > fxconv font5x7.png fxconv -f ../src/font5x7.png -o src/font5x7.png.o \ --fx --toolchain=sh-elf name:gint_font5x7 \ charset:ascii grid.size:5x7 grid.padding:1 grid.border:0 error: non-trivial architecture for sh-elf must be specified make: *** [Makefile:110: src/font5x7.png.o] Error 1 ``` For extra safety, I checked if i had the `4a8ba82f` commit, and sure enough I do: ``` [jeremii@brs-laptop build.fx]$ git log --oneline -n 15 95a3345 (HEAD -> compat, origin/compat) keyboard: add keydown() in the model 86cd9b9 small improvements a05d341 std: support integer size formats (hh, h, l, ll) fc7aab6 dma: finalize dma_memset() and dma_memcpy() 15558c8 support data loading in ILRAM, XRAM and YRAM bb77e45 dma: fix freezes when transferring to/from IL memory 552b9b9 dma: only expose API on fxcg50 5630814 core: allow custom panics and exception catching 9a4ae4c minor new definitions 4a8ba82 truly support custom toolchains (almost) ```
Owner

Thanks, I should be able to investigate. Just to be sure, which commit of the fxSDK are you using? I think the dev branch has the important commit here:

7cc4199 fxconv: be even smarter with toolchain/arch detection

Looking back at the code, I see that the behavior I mentioned earlier depends on that commit.

(The dev version of the fxSDK is currently not merged because it has a big Makefile/configuration update and I wanted to test it before releasing it.)

Thanks, I should be able to investigate. Just to be sure, which commit of the fxSDK are you using? I think the `dev` branch has the important commit here: `7cc4199 fxconv: be even smarter with toolchain/arch detection` Looking back at the code, I see that the behavior I mentioned earlier depends on that commit. (The `dev` version of the fxSDK is currently not merged because it has a big Makefile/configuration update and I wanted to test it before releasing it.)
Author

I was on the master branch of fxSDK, last commit being the following:

d74785d fxconv: add toolchain/arch/section command-line parameters

I'll try again with the dev branch and get back

Edit: it seems to have worked?

[jeremii@brs-laptop build.fx]$ make
> fxconv font5x7.png
> ar libgint-fx.a
[jeremii@brs-laptop build.fx]$
I was on the master branch of fxSDK, last commit being the following: ``` d74785d fxconv: add toolchain/arch/section command-line parameters ``` I'll try again with the dev branch and get back Edit: it seems to have worked? ``` [jeremii@brs-laptop build.fx]$ make > fxconv font5x7.png > ar libgint-fx.a [jeremii@brs-laptop build.fx]$ ```
Author

Yeah it did work with the dev branch of fxSDK. Thanks!

Yeah it did work with the dev branch of fxSDK. Thanks!
Ghost closed this issue 2019-10-28 08:12:05 +01:00
Owner

Excellent! I'm sorry for the non-standard branch requirements. I'm pretty much the only one developing so it can easily go wrong without me noticing.

Excellent! I'm sorry for the non-standard branch requirements. I'm pretty much the only one developing so it can easily go wrong without me noticing.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Lephenixnoir/gint#4
No description provided.