How to compile C code for DSLinux?

  • Thread starter Thread starter win2k
  • Start date Start date
  • Views Views 179
  • Replies Replies 1

win2k

Member
Newcomer
Joined
May 14, 2026
Messages
7
Reaction score
0
Trophies
0
XP
27
Country
United Kingdom
I have been wanting to compile some programs for my Nintendo DS running DSLinux. To do this, I used a Debian Wheezy chroot, as modern Linux is incompatible with the cross-compiler. I am using the official crosscompiler provided on DSLinux's website. My first program was a simple "Hello World" in C, however when I tried to execute it on the DS I got an error message about some data abort and that Linux had killed the program.

Any code I try to compile has this issue. For example, I tried to compile an older version of the file command and it gave the same error. There is a photo attached of the error when I tried running it.

Using file (on my computer), the executables are "BFLT executable - version 4 gotpic" - the same as the executable files that come with DSLinux and work perfectly.

After researching, I have not been able to find anyone with the same problem. DSLinux is abandoned, but I see no reason why the compiler shouldn't still work on a compatible OS. I have the Memory Expansion Pak and it is detected by DSLinux.

How do I resolve this?
 

Attachments

  • P1030292.JPG
    P1030292.JPG
    782.8 KB · Views: 4
I fixed this by building DSLinux from source on a Debian 5.0 "Lenny" VM (not chroot, actual VM), instead of using the premade binaries. After I installed my own compiled DSLinux, and then compiled my Hello World program in the "make xsh" environment, it worked.

Leaving the solution here in case anyone else tries out DSLinux and has a similar issue. DSLinux is old and there doesn't seem to be much of a community out there or many fellow users, but I was so excited to run Linux on the DS as I currently don't have access to my Wii.
 

Site & Scene News

Popular threads in this forum