Version 5 (modified by .ayush10297, on Jan 9, 2013 at 8:36:17 PM) (diff)


{{Infobox BSP |title = Nintendo DS |logo = Nintendo_DS_Logo.svg |image = 250px? |caption = An electric blue original Nintendo DS. |BSP_name = NDS, Nintendo DS |Manufacturer = Foxconn |image = |caption = |Board_URL = |Architecture = ARM |CPU_model = One 67.028 MHz ARM946E-S and one 33.514 MHz ARM7TDMI |Simulator = DeSmuME, see |Aliases = NDS |RAM = 4 MB RAM Cartridge save |NVMEM = 256 kB of serial flash memory |Serial = no serial port |NICs = Wireless, handled by the WFC configuration |Video = }}

This is start page of Nintendo DS BSP

Features in NDS BSP:

Basic console device

  • LCD, very small fonts but still readable.
  • output on the lower screen

Multiboot support in linkcmds

How to run Multi-boot programs

  • You can load the generated nds file with desmume
  • You can copy the nds file on a micro-sd card that is then started using a linker.


  • The BSP embedds an old version of libnds that is a library to handle low-level aspects of the hardware
  • Most of libnds functions can be used to manipulate the touchscreen, keys, wireless, etc.

How to use Framebuffer

There is an example of an RTEMS task that show grey scale on a periodic basis. This example relies on the libnds.

rtems_task Init(

rtems_task_argument ignored

) {

int i; int j; int k; uint16_t custom_color; k = 0;

while (1) {

k = (k + 1) % 200; custom_color= RGB15(k, k, k); for (i = 0 ; i < SCREEN_WIDTH ; i++) {

for (j = 0 ; j < SCREEN_HEIGHT ; j++) {

my_image[i][j] = custom_color;


} display_image (my_image); printf ("test %d\n", k); usleep (10);



How to use Keypad

With the libnds, you can proceed as follow :

uint32_t keys; while (1) {

scanKeys (); keys = keysHeld(); if (keys & KEY_A) {

printf ("A PRESSED\n");

} if (keys & KEY_B) {

printf ("B PRESSED\n");


How to use Touchscreen

With the libnds, you can use it as follow :

touchscreen_initialize (0, 0, NULL); touchPosition tp; tp = touchReadXY (); printf ("x=%u, y=%u, px=%u, py=%u, z1=%u, z2=%u\n", tp.x, tp.y, tp.px,, tp.z1, tp.z2);

See the touchscreen-related functions for more information about the relevant data structures.

More information

  • Desmume emulator : desmume
  • Many functions are implemented on top of third-party libraries available in the devkitpro tool-chain (devkitpro).

Test Reports

Binaries from the RTEMS examples and other examples that use libnds are available here :

4.10.99: User:Julien Delange? reports that as for the 26/08/2011, the current CVS works correctly.

4.10-cvs : User:Julien Delange? reports that the support works correctly.

4.10.0 : User:Julien Delange? reports that the support is broken (26/08/2011)