Port status
You may find more information about the status of the port on the Sam7 port page.
Prerequisites
We will use the sam7_ex256_demo application. It runs on a Olimex SAM7-EX256 development board.
We'll assume you have
- a working sam7-ex256 board,
- a running OpenOCD daemon connected to it,
- the MutekH source-tree in
/path/to/mutekh
, - working gcc & binutils for ARM. Using
arm-unknown-elf
target is the default, but you may use your own toolchain
Using a demo application
Demo application is located in trunk/mutekh/examples/sam7_ex256_demo directory.
To compile this application, go to a new directory and type:
$ make \ -f /path/to/mutekh/Makefile \ CONF=/path/to/mutekh/examples/sam7_ex256_demo/config_sam7 \ BUILD_DIR=$PWD \ SRC_DIR=/path/to/mutekh
For more information about the meaning of the arguments, see BuildSystem.
Got the kernel
You should now have a tree of built objects on obj-simple-arm
and two versions of the kernel:
kernel-simple-arm.out
- The ELF binary kernel, it can be used for GDB or other debugging purposes
kernel-simple-arm.bin
- This is the file you may flash to the Sam7 through openocd.
Testing
You may connect to the board through the first UART, 38400,8,n,1, and see:
- A lua prompt asking for commands
- Some messages when you touch the buttons or the joystick
On the lua prompt, you may try:
lcd_reblit()
- Will blit a default image to the LCD
lcd_blit_block(lba, x, y)
- Blits a 18x18 block from SD/MMC to the LCD at x,y. it is 18x18 because it fits in a 512-byte block of SD/MMC. Encoding is packed 12-bit RGB-444.
lcd_backlight(bool)
- Sets the backlight value (0/1)
lcd_invert(bool)
- Sets the backlight inversion mode (0/1)
lcd_set_contrast(n)
- Sets the contrast of LCD
block_hexdump(lba)
- Hexdump the SD/MMC block at lba
sd_mmc_rehash()
- Reinitialize the SD/MMC card, this can be used when switching cards
You may find other commands pressing the <TAB> key (yes, there is completion).