MB Demos

# Multiboot Library (MB) Sample Demos

## Location

`$TwlSDK/build/demos/mb`

## Compilation

Move to the `$TwlSDK/build/demos/mb` directory and enter the following.

> `% make`

The compilation will begin, and the SRL executable file and the NEF or TEF files having binary information will be generated in `$TwlSDK/build/demos/fs/(sample name)/bin/(platform)/(target)/`.

> `$TwlSDK/build/demos/mb/(sample name)/bin/(platform)/(target)/`

For example:

> `$TwlSDK/build/demos/mb/multiboot/bin/ARM9-TS/Release/main.srl`

is the executable file for the `multiboot` demo.

## Execution

### For NITRO ROMs:

If using IS-NITRO-DEBUGGER:

- Load and execute an NLF file with IS-NITRO-DEBUGGER
- Execute an SRL file with IS-NITRO-DEBUGGER
- Execute an SRL file with IS-NITRO-DEBUGGER using the `loadrun.exe` tool from a command line

If using IS-TWL-DEBUGGER:

- Load and execute an NLF file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER using the `loadrun.TWL.exe` tool from a command line

### For TWL/NITRO Hybrid ROMs

If using IS-NITRO-DEBUGGER:

- Execute an SRL file with IS-NITRO-DEBUGGER
- Execute an SRL file with IS-NITRO-DEBUGGER using the `loadrun.exe` tool from a command line

If using IS-TWL-DEBUGGER:

- Load and execute a TLF file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER using the `loadrun.TWL.exe` tool from a command line

### For TWL Limited ROMs

If using IS-TWL-DEBUGGER:

- Load and execute a TLF file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER using the `loadrun.TWL.exe` tool from a command line

The MB library samples use multiboot functions, so you will need a number of development machines, all with the same communications environment (wireless or wired).
Because the `mb_child_[NITRO/TWL].srl` programs in the `$TwlSDK/bin/ARM9-TS/Rom` directory are samples providing features equivalent to a multiboot child on a production system, load the binary to the other machines using the same method used for the sample program and execute them together.
Depending on the options set for IS-NITRO-DEBUGGER, a dialog box containing the message "The transfer destination address on the ARM9 Processor is incorrect" appears when `mb_child_[NITRO/TWL].srl` is loaded. Select NO to proceed with loading.
To read about the differences in behavior between `mb_child_NITRO.srl` and `mb_child_TWL.srl`, see the reference for `mb_child_[NITRO/TWL].srl`.

## Description

Name | Directories | Operation
--- | --- | ---
`multiboot` | `demos` | This simple sample downloads the program file from the multiboot parent to the child. Opens two program files and downloads to an unspecified connected child. After the download, press the START button on the parent to boot the child that has completed the download.
`multiboot-Model` | `demos` | This sample shows the procedure of a multiboot parent downloading a program file to a child, and sharing data with the downloaded program.
`cloneboot` | `demos` | This sample downloads the parent's program to a child. This is called clone booting. The program structure is the same as the `multiboot-Model` sample model.
`fake_child` | `demos` | This sample makes an entrance with the multiboot parent as a pseudo-multiboot child. This sample sets the same GGID as used in the multiboot-Model sample, allowing it to fake an entry as a multiboot child.
`mb` | `demos` | This demo uses the `WM_MeasureChannel` function to measure the wireless signal use rate.
`multiboot-PowerSave` | `demos` | This simple demo explicitly changes the power save mode and starts the machine as a multiboot parent. Identical to the multiboot demo, except that all settings are fixed as default settings aside from power-save mode. Power-save mode is enabled by default, so normal programs do not need to explicitly set this feature. For details, see the description of the `MB_SetPowerSaveMode` function.
`multiboot-wfs` | `demos` | This sample downloads the program file to the child as the multiboot parent, and the child uses the file system via a wireless connection. It uses the sample module `$TwlSDK/build/demos/wireless_shared/wfs`.

## Operation

The MB library demo does not work normally on ensata.

`cloneboot` operates normally only on NITRO ROMs and hybrid ROMs.

## See Also

MB Function List

## Revision History

2009/03/02 Added text about `mb_child_NITRO.srl` and `mb_child_TWL.srl`.
2008/12/16 Revised the description of the operating environment for the `multiboot-Model` and `cloneboot` samples.
2008/07/11 Changed notation to correspond to TWL.
2005/06/23 Added a description of the `multiboot-wfs` sample.
2005/05/10 Added explanation of `mbm` demo.
2005/04/28 Added `multiboot-PowerSave` demo.
2004/11/16 Added `cloneboot` sample.
2004/10/06 Corrected the lack of description regarding `multiboot-Model` sample.
2004/09/13 Added caution for loading `mb_child.srl`.
2004/08/17 Clarified the execution instructions and the multiboot description.
2004/08/10 Initial version.

CONFIDENTIAL