What is going on on ARM7 CPU?

Post Reply
Faelys
Posts: 3
Joined: Wed Aug 08, 2012 10:02 pm

What is going on on ARM7 CPU?

Post by Faelys » Wed Oct 22, 2014 9:18 pm

Hello,

I'm not sure whether this really belongs to libnds or devkitARM section, but I've recently restarted trying to code for the DS.

I have known for a while that the DS has two CPUs, one ARM7 and one ARM9, and that the ARM7 has less processing power and less hardware access (it seems to deal with the parts that already existed on the GBA).

What I didn't realize until a few hours ago is that we're advised against writing ARM7 in homebrews, but I don't really understand why.

Is it a libnds-related decision, so that all library services execute in parallel with the homebrew? Or is there some deep hardware reason that I missed?

If it's only libnds architecture, is there any documentation (other than the code) on what would break if I use my own ARM7 image? Or what precautions I should take when writing one? Or is it completely "proprietary" and ARM7 should just be considered as a static black box, just like the GPUs?

A secondary question, that I would understand being not answered, is if I give up the comfort of libnds, are there specific things that must be done on the ARM7 in my baremetal homebrew?

Just to be clear, I'm not questioning the architecture, I'm just trying to get a clear understanding of the limits, so I can play safely inside the box ("playing" here meaning at first porting a basic Ada runtime so I can code in my preferred language).

Thanks in advance for your help

sverx
Posts: 94
Joined: Wed Aug 12, 2009 2:56 pm
Location: github.com/sverx
Contact:

Re: What is going on on ARM7 CPU?

Post by sverx » Fri Oct 31, 2014 4:35 pm

The devkit provides a default program for the ARM7, and you can use that... you probably won't need to write a program for the ARM7 processor.
But, if you wish, it's possible... take a look into examples/nds/template, there's a 'combined' one which is for that.

elhobbs
Posts: 358
Joined: Thu Jul 02, 2009 1:19 pm

Re: What is going on on ARM7 CPU?

Post by elhobbs » Fri Oct 31, 2014 7:18 pm

audio, wifi, touchscreen, and some of the buttons can only be accessed from the arm7. These features are made accessible to arm9 by the FIFO IPC communications that are built into libnds. so the arm9 and arm7 code need to be kept in sync. The danger with developing for the arm7 is that you might break that communication. either directly or by releasing code that does not work in future versions of libnds.

sverx
Posts: 94
Joined: Wed Aug 12, 2009 2:56 pm
Location: github.com/sverx
Contact:

Re: What is going on on ARM7 CPU?

Post by sverx » Tue Nov 04, 2014 5:24 pm

Yeah, I was saying that it's very hard you really need to run a different ARM7 program than what's supplied with dkA/libnds... nevertheless you can have your own ARM7 program if you need it (ARM7 mp3 replay? libXM7? :roll: ...) using the so called 'combined' template.

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests