How to build or setup working tool chain for libronin ?

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

Moderators: VasiliyRS, deluxux

User avatar
T_chan
rebel
Posts: 16

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

Post#11 » Mon Jan 17, 2022 3:51 am

Linux -> did you already try to install Windows Subsystem for Linux ?

I did this test on a pure Linux system, but on another pc I managed to install kos / create cross-compilers on WSL:

Code: Select all

- Install Windows Subsystem for Linux:
  First 2 steps of https://www.windowscentral.com/install-windows-subsystem-linux-windows-10:
  * Enabling Windows Subsystem for Linux using Settings
  Start Menu -> "Settings"->"Apps"->"Related settings"->"Programs and Features"->
  "Turn Windows features on or off"-> check the "Windows Subsystem for Linux" option->
  OK -> restart now
  * Installing Linux distros using Microsoft Store:
  download Ubuntu 20.04 LTS (466 MB) from Microsoft Store (https://aka.ms/wslstore)
  launch it from the store screen-it will say it's installing
  specify a username & password
- from the WSL command line:
- sudo mkdir /opt/toolchains
- cd /opt/toolchains
- sudo mkdir dc
- sudo chmod 757 dc
- sudo apt-get update
- sudo apt install make
- sudo apt install gcc
- sudo apt install g++
- sudo apt install texinfo
- sudo apt-get install libjpeg-dev
- sudo apt-get install libpng-dev
- sudo apt-get install libelf-dev
- sudo apt-get install wget ca-certificates
(then the rest is a regular kos install, like the one I describer here: https://dcemulation.org/phpBB/viewtopic.php?t=105596

User avatar
T_chan
rebel
Posts: 16

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

Post#12 » Mon Jan 17, 2022 4:28 am

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".


That doesn't seem to be needed anymore.

There is a need to modify /tools/ipupload.pike however:
change
#!/usr/local/bin/pike
into
#!/usr/bin/env pike

(I'll add this to my first post here)

User avatar
Ian Micheal
Developer
Posts: 4919
Contact:

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

Post#13 » Mon Jan 17, 2022 4:32 am

Right now only using windows 7 64bit and have dreamsdk and cygwin

User avatar
T_chan
rebel
Posts: 16

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

Post#14 » Mon Jan 17, 2022 4:35 am

Ah, the WSL I tested on a pure Windows 10 system.

What I did on my main pc, is install a HDD switch, so that I have 2 boot SATA SSDs (1 windows, 1 Ubuntu), and only 1 is turned on at a moment, so that one OS can never see the other SSD, and can never mess with the other one.
This:
- also gives me a fallback when eg the Windows OS is messed up for any reason :)
- also allowed me to do a soft switch to Linux, since I always had a way to go back to Windows if needed :)

kremiso
Metallic
Posts: 840

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

Post#15 » Mon Jan 17, 2022 6:28 am

my god, Libronin
absolutely undocumented

does this very outdated page can be useful? :
http://www.atani-software.net/dcprog/

what about asking directly at the developers, Peter Bortas or Marcus Comstedt, via Github?
"This is alpha software, and there is no documentation. You are on your
own at the moment. If there is something you wonder about the authors
can probably answer if you ask nicely." :(

User avatar
T_chan
rebel
Posts: 16

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

Post#16 » Mon Jan 17, 2022 6:31 am

One thing to keep in mind though, is that there seems to be only 2 kind of outputs:
- those that use the serial output to dump debugging logs
- those that don't output any debugging at all

So you seem to need a serial cable to do any kind of debugging...

Concerning the examples, these seem to compile fine:
make examples/ex_video.elf
make examples/ex_serial.elf
make examples/ex_control.elf

But these seem to have a missing dependency error:
make examples/ex_vmsfscheck.elf
make examples/ex_gtext.elf
make examples/ex_showpvr.elf
make examples/ex_malloc.elf
make examples/ex_videomodes.elf
make examples/ex_clouds.elf

My first post has been updated with everything needed to come to the same point as me.

User avatar
Ian Micheal
Developer
Posts: 4919
Contact:

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

Post#17 » Mon Jan 17, 2022 6:36 am

T_chan wrote:Hello,

Code: Select all

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 -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



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

User avatar
Ian Micheal
Developer
Posts: 4919
Contact:

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

Post#18 » Mon Jan 17, 2022 6:39 am

T_chan wrote:One thing to keep in mind though, is that there seems to be only 2 kind of outputs:
- those that use the serial output to dump debugging logs
- those that don't output any debugging at all

So you seem to need a serial cable to do any kind of debugging...

Concerning the examples, these seem to compile fine:
make examples/ex_video.elf
make examples/ex_serial.elf
make examples/ex_control.elf

But these seem to have a missing dependency error:
make examples/ex_vmsfscheck.elf
make examples/ex_gtext.elf
make examples/ex_showpvr.elf
make examples/ex_malloc.elf
make examples/ex_videomodes.elf
make examples/ex_clouds.elf

My first post has been updated with everything needed to come to the same point as me.



Thank you so much i will try this on my linux mint distro i have normal kos set up there 2.0 I want really thank you for doing this and taking the time to help me in detail..

Can you attach ex_video.elf for me to test if you have not yet..

I think this should be sticky post or something we have 2 projects openlara and scummvm to learn to use libronin

User avatar
T_chan
rebel
Posts: 16

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

Post#19 » Mon Jan 17, 2022 8:51 am

No problem, I was in the right mood, at the right moment you asked the question :)
(I never tried libronin before)

I'll first try if I can execute the examples on my DC this evening, you never know that something else went wrong...

User avatar
T_chan
rebel
Posts: 16

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

Post#20 » Mon Jan 17, 2022 1:30 pm

Just uploaded ex_video.elf to my DC via dc-tool-ip/dcload-ip 2.0.0,
it seems to work without problems, I had a black screen :)

FYI - My compilers:
arm-eabi-gcc (GCC) 8.4.0
sh-elf-gcc (GCC) 9.3.0
Attachments
ex_video_elf.zip
(11.49 KiB) Downloaded 25 times

  • Similar Topics
    Replies
    Views
    Last post

Return to “New Releases/Homebrew/Emulation”

Who is online

Users browsing this forum: No registered users