How to build or setup working tool chain for libronin ?

Place for discussing homebrew games, development, new releases and emulation.

Moderators: pcwzrd13, deluxux, VasiliyRS

User avatar
Ian Micheal
Developer
Posts: 6005
Contact:

How to build or setup working tool chain for libronin ?

Post#1 » Sun Jan 16, 2022 3:52 pm

I have tried to find info and build it using cygwin i can build a cross-compile sh4 tool chain.. But how do you build libronin it says just type make but it seems env is not set up cant find compiler and missing commands..

Please help info is near nil

User avatar
T_chan
rebel
Posts: 16

Re: How to build or setup working tool chain for libronin ?

Post#2 » Sun Jan 16, 2022 4:57 pm

Hello,

Just tried here on an Ubuntu pc, with sh & arm compilers generated via the latest kos previously, and this worked for me:
(NOTE: don't use compilers built for kos. Build them specifically for libronin, otherwise you will get problems later)

1) launch a terminal

2) add the /bin paths to your elf & arm compilers, eg:
export PATH=$PATH:/opt/toolchains/dc/sh-elf/bin:/opt/toolchains/dc/arm-eabi/bin

(you can see your path with the command: echo $PATH

3) if your arm compiler is arm-eabi* like me (ie, arm compiler generated via the latest kos), add the following symbolic links inside your arm bin folder:
eg for me:
from within the folder /opt/toolchains/dc/arm-eabi/bin:
ln -s arm-eabi-as arm-elf-as
ln -s arm-eabi-ar arm-elf-ar
ln -s arm-eabi-gcc arm-elf-gcc
ln -s arm-eabi-objcopy arm-elf-objcopy

(or you can modify the names of the executables in the libronin makefile of course)

4) be sure that pike is installed, if not run something like: sudo apt-get install pike8.0

5) rename the function itoa to itoaronin in following files:
report.c
report.h
vmsfs.c (9 instances to modify)
examples/ex_vmsfscheck.c

6) launch make from the main libronin folder to generate libronin.a

7) launch make from the /libmad folder to generate libmad.a

8) if later you want to use libronin's functionality to send a program via serial to the dreamcast, be sure to modify these references in the Makefile:
replace all references to: /home/peter/hack/dreamsnes/dc/
into: ./tools/ (eg: /home/peter/hack/dreamsnes/dc/ipupload.pike would become ./tools/ipupload.pike

9) same as 8), if you want to use ipupload.pike, you need to modify the 1st line of /tools/ipupload.pike:
change
#!/usr/local/bin/pike
into
#!/usr/bin/env pike

10) Remove any references to those 2 examples from the main Makefile, since these examples do not exist anymore:
examples/ex_purupuru
examples/ex_compress

11) Add those 2 examples in the main makefile, since they are not foreseen yet:
examples/ex_control
examples/ex_clouds

12) to compile an example with serial output (this generates an .elf file, eg for example ex_video.c):
make examples/ex_video.elf

13) to compile an example without serial output (this generates a .bin file, eg for example ex_video.c):
(I think you need to modify 1 line in the main Makefile: TYPE = elf <- change elf to bin.
I think they wanted to make it work just by letting the user change the extension of the example in the command line, but this does not seem to work - it linked the file with libronin.a, not libronin-noserial.a)
make examples/ex_video.bin



This resulted in a succesful compilation, I didn't check it by running examples or so
Last edited by T_chan on Mon Jan 17, 2022 2:16 pm, edited 8 times in total.


User avatar
Ian Micheal
Developer
Posts: 6005
Contact:

Re: How to build or setup working tool chain for libronin ?

Post#4 » Sun Jan 16, 2022 5:59 pm

T_chan wrote:Hello,

Just tried here on an Ubuntu pc, with sh & arm compilers generated via the latest kos previously, and this worked for me:

1) launch a terminal

2) add the /bin paths to your elf & arm compilers, eg:
export PATH=$PATH:/opt/toolchains/dc/sh-elf/bin:/opt/toolchains/dc/arm-eabi/bin

(you can see your path with the command: echo $PATH

3) if your arm compiler is arm-eabi* like me (ie, arm compiler generated via the latest kos), add the following symbolic links inside your arm bin folder:
eg for me:
from within the folder /opt/toolchains/dc/arm-eabi/bin:
ln arm-eabi-as arm-elf-as
ln arm-eabi-gcc arm-elf-gcc
ln arm-eabi-objcopy arm-elf-objcopy

(or you can modify the names of the executables in the libronin makefile of course)

4) be sure that pike is installed, if not run something like: sudo apt-get install pike8.0

5) rename the function itoa to itoaronin in following files:
report.c
report.h
vmsfs.c (9 instances to modify)
examples/ex_vmsfscheck.c

This resulted in a succesful compilation, I didn't check it by running examples or so


amazing thank you i have asked and looked and found nothing for a good many years :)

User avatar
T_chan
rebel
Posts: 16

Re: How to build or setup working tool chain for libronin ?

Post#5 » Sun Jan 16, 2022 6:13 pm

No problem, small challenge for a sunday evening :)

Extra notes:
- to compile libmad, you also need a symbolic link for arm-elf-ar:
from within the folder /opt/toolchains/dc/arm-eabi/bin:
ln -s arm-eabi-ar arm-elf-ar
- the examples don't seem to compile, something is missing...


User avatar
T_chan
rebel
Posts: 16

Re: How to build or setup working tool chain for libronin ?

Post#7 » Sun Jan 16, 2022 6:24 pm

ah, no, I got the github one.
Will check the bitbucket one tomorrow.

User avatar
T_chan
rebel
Posts: 16

Re: How to build or setup working tool chain for libronin ?

Post#8 » Sun Jan 16, 2022 6:28 pm

Well, just tried the bitbucket version after all :)
Same result as the github version:
- libronin compile is ok
- libmad compile is ok
- compilation of the examples not ok yet

User avatar
Ian Micheal
Developer
Posts: 6005
Contact:

Re: How to build or setup working tool chain for libronin ?

Post#9 » Mon Jan 17, 2022 2:34 am

T_chan wrote:Well, just tried the bitbucket version after all :)
Same result as the github version:
- libronin compile is ok
- libmad compile is ok
- compilation of the examples not ok yet


Seems more you have to install pike as well this post runs step by step what we need to do

https://dcemulation.org/phpBB/viewtopic ... n#p1004726

links are dead in the post but lot more info then before

After that I compiled ronin, which requires pike to be installed. It also requires to change the pike script "tools/encode_armcode.pike" to use "/usr/bin/pike" instead of "/usr/local/bin/pike".
Here is the generated file in case you don't want to install pike:

Code: Select all

unsigned int arm_sound_code[] = {
 0xea000009, 0xea000005, 0xea000004, 0xea000004, 0xea000004, 0xea000002,
 0xea000001, 0xe25ef004, 0xe1b0f00e, 0xe25ef004, 0xe25ef008, 0xe10f0000,
 0xe38000c0, 0xe129f000, 0xe59fd004, 0xeb0000ff, 0xeafffffe, 0x0003ff00,
 0xe3a00502, 0xe3a02000, 0xe2803b0a, 0xe92d47f0, 0xe1a08002, 0xe3a05502,
 0xe3a0a902, 0xe3a0901f, 0xe1a06002, 0xe5832000, 0xe3a04006, 0xe2841001,
 0xe585a000, 0xe2817001, 0xe5859014, 0xe5856004, 0xe5856008, 0xe585600c,
 0xe5856010, 0xe7856104, 0xe7856101, 0xe2873001, 0xe2832001, 0xe2821001,
 0xe2810001, 0xe280c001, 0xe28ce001, 0xe28e4001, 0xe7856107, 0xe2847001,
 0xe357001f, 0xe7856103, 0xe7856102, 0xe7856101, 0xe7856100, 0xe785610c,
 0xe785610e, 0xe7856104, 0xdaffffed, 0xe2888001, 0xe358003f, 0xe2855080,
 0xdaffffde, 0xe3a02502, 0xe3a0cef1, 0xe3a03c0f, 0xe28c100f, 0xe1a00002,
 0xe283300f, 0xe2822d81, 0xe5823000, 0xe280cb0a, 0xe5821004, 0xe2431c0f,
 0xe58c1000, 0xe8bd87f0, 0xe52de004, 0xe3a0ecff, 0xe28ec0ff, 0xe1a00380,
 0xe1a0e822, 0xe2800502, 0xe002200c, 0xe38eec42, 0xe59fc050, 0xe580e000,
 0xe5802004, 0xe59f2048, 0xe580300c, 0xe5923000, 0xe59c2000, 0xe1a0cb03,
 0xe202200f, 0xe1a03b2c, 0xe183c582, 0xe580c018, 0xe3a03024, 0xe3a0c00f,
 0xe2432024, 0xe5c03028, 0xe28c3010, 0xe5c0c025, 0xe5c02029, 0xe5c01024,
 0xe5803010, 0xe49df004, 0x000006e4, 0x000006e0, 0xe3500057, 0xe92d45f0,
 0xca000017, 0xe3500050, 0xaa000034, 0xe3500001, 0x0a00003b, 0xca00006b,
 0xe3500000, 0x18bd85f0, 0xe3a01502, 0xe5912000, 0xe3c23901, 0xe383c902,
 0xe581c000, 0xe3a02cff, 0xe282c080, 0xe3a02cff, 0xe59c3010, 0xe3530000,
 0x15913080, 0x13c33901, 0x13833902, 0x15813080, 0xe58c000c, 0xe5820080,
 0xe8bd85f0, 0xe350005f, 0xca000012, 0xe59f1214, 0xe5913000, 0xe083c103,
 0xe08c210c, 0xe0621182, 0xe0613301, 0xe1e00e80, 0xe1a03103, 0xe1e00ea0,
 0xe283c62b, 0xe28c3a11, 0xe260200a, 0xe3a01cff, 0xe59fc1e4, 0xe1a03253,
 0xe2811080, 0xe58c0000, 0xe5813014, 0xe8bd85f0, 0xe3500067, 0xc8bd85f0,
 0xe3a03b2b, 0xe200100f, 0xe283c040, 0xe3a02cff, 0xe1a0315c, 0xe2820080,
 0xe5803018, 0xe8bd85f0, 0xe59f21a0, 0xe592c000, 0xe08c110c, 0xe0813101,
 0xe063c183, 0xe06c230c, 0xe1a03102, 0xe2000007, 0xeaffffe2, 0xe3a0acff,
 0xe28aa080, 0xe59ac010, 0xe35c0000, 0x1a000032, 0xe59f2168, 0xe59f1168,
 0xe5920000, 0xe5913000, 0xe1a02b00, 0xe203300f, 0xe1a01b22, 0xe3a02c42,
 0xe59a0018, 0xe1811583, 0xe2822001, 0xe28c3502, 0xe5832000, 0xe3a02024,
 0xe583c004, 0xe583000c, 0xe3a0000f, 0xe5831018, 0xe2421005, 0xe5c32028,
 0xe5c30025, 0xe5c3c029, 0xe5c3c024, 0xe5831010, 0xe3a0ccff, 0xe28c3080,
 0xe3a0c000, 0xe583c00c, 0xe3a00502, 0xe5902000, 0xe3821903, 0xe5801000,
 0xe3a01502, 0xe5932010, 0xe152000c, 0x15903080, 0x13833903, 0x15803080,
 0xe2810b0a, 0xe3a03001, 0xe5c0c00d, 0xe3a0ccff, 0xe58c3080, 0xe8bd85f0,
 0xe2403040, 0xe3530001, 0x93a0ccff, 0x928c1080, 0x92002001, 0x95812010,
 0xe8bd85f0, 0xe59fe09c, 0xe59f309c, 0xe59e0000, 0xe5938000, 0xe1a07b00,
 0xe208600f, 0xe1a05b27, 0xe59a8018, 0xe3a04c42, 0xe3a03502, 0xe1850586,
 0xe284c001, 0xe3a05000, 0xe3a0601f, 0xe3a0400f, 0xe3a07024, 0xe583c000,
 0xe3a01c42, 0xe281c002, 0xe3a0ec5a, 0xe2832080, 0xe5835004, 0xe28ee080,
 0xe583800c, 0xe5830018, 0xe5c37028, 0xe5c34025, 0xe5c35029, 0xe5c36024,
 0xe5836010, 0xe59a1018, 0xe582c000, 0xe582e004, 0xe582100c, 0xe5820018,
 0xe5c27028, 0xe5c24025, 0xe5c25029, 0xe5c24024, 0xe5826010, 0xeaffffbb,
 0x000006e0, 0x000006e4, 0xe1a0c00d, 0xe92ddff0, 0xe59f3184, 0xe3a09b2b,
 0xe3a0acff, 0xe3a05502, 0xe59f2178, 0xe3a01000, 0xe28a0080, 0xe289e040,
 0xe2854b0a, 0xe24cb004, 0xe3a07cff, 0xe289c044, 0xe5871080, 0xe1a08001,
 0xe3a05502, 0xe3a0a902, 0xe3a0901f, 0xe580100c, 0xe1a06001, 0xe5801010,
 0xe5831000, 0xe5821000, 0xe580c014, 0xe580e018, 0xe5841000, 0xe3a02006,
 0xe2824001, 0xe585a000, 0xe2847001, 0xe5859014, 0xe5856004, 0xe5856008,
 0xe585600c, 0xe5856010, 0xe7856102, 0xe7856104, 0xe2873001, 0xe2832001,
 0xe2821001, 0xe2810001, 0xe280c001, 0xe28ce001, 0xe28e4001, 0xe7856107,
 0xe2847001, 0xe357001f, 0xe7856103, 0xe7856102, 0xe7856101, 0xe7856100,
 0xe785610c, 0xe785610e, 0xe7856104, 0xdaffffed, 0xe2888001, 0xe358003f,
 0xe2855080, 0xdaffffde, 0xe3a03c0f, 0xe3a02502, 0xe3a05ef1, 0xe283e00f,
 0xe3a04cff, 0xe282cd81, 0xe285700f, 0xe2828b0a, 0xe24e1c0f, 0xe2844080,
 0xe3a06701, 0xe3a05cff, 0xe58ce000, 0xe58c7004, 0xe5881000, 0xea000007,
 0xe5957080, 0xe3a03502, 0xe3570001, 0xe283cb0a, 0xe3a00cff, 0x059c3014,
 0xe280e080, 0x058e300c, 0xe5949008, 0xe3590001, 0x1afffff4, 0xe594a004,
 0xe35a0000, 0xe59f1030, 0xba000004, 0xe5940004, 0xebfffefc, 0xe3a01002,
 0xe5841008, 0xeaffffeb, 0xe5948004, 0xe1e00008, 0xe1a0e00f, 0xe1a0f006,
 0xeafffff7, 0x000006e4, 0x000006e0, 0x000001a8,
};


other steps as well all in the post

Still not working for me as I'm not on linux but if i have to do it to get this working i will..

User avatar
Ian Micheal
Developer
Posts: 6005
Contact:

Re: How to build or setup working tool chain for libronin ?

Post#10 » Mon Jan 17, 2022 3:06 am

Be nice to get a proper setup for this on github or something build with all info lack of info and docs after seeing openlara run so well it's clear this more light weight then kos.. but I'm all at sea even getting this to work..

  • Similar Topics
    Replies
    Views
    Last post

Return to “New Releases/Homebrew/Emulation”

Who is online

Users browsing this forum: letsgome