| 1 | |
| 2 | = Port status = |
| 3 | |
| 4 | You may find more information about the status of the port on the [wiki:Arch/Simple/Sam7 Sam7 port page]. |
| 5 | |
| 6 | = Prerequisites = |
| 7 | |
| 8 | We will use the sam7_ex256_demo application. It runs on a Olimex SAM7-EX256 development board. |
| 9 | |
| 10 | We'll assume you have |
| 11 | * a working sam7-ex256 board, |
| 12 | * a running OpenOCD daemon connected to it, |
| 13 | * the MutekH source-tree in `/path/to/mutekh`, |
| 14 | * working gcc & binutils for ARM. Using `arm-unknown-elf` target is the default, but you may [wiki:Config/ToolChain#Useyourowntoolchain use your own toolchain] |
| 15 | |
| 16 | = Using a demo application = |
| 17 | |
| 18 | Demo application is located in [source:/trunk/mutekh/examples/sam7_ex256_demo] directory. |
| 19 | |
| 20 | To compile this application, go to a new directory and type: |
| 21 | {{{ |
| 22 | $ make \ |
| 23 | -f /path/to/mutekh/Makefile \ |
| 24 | CONF=/path/to/mutekh/examples/sam7_ex256_demo/config_sam7 \ |
| 25 | BUILD_DIR=$PWD \ |
| 26 | SRC_DIR=/path/to/mutekh |
| 27 | }}} |
| 28 | |
| 29 | For more information about the meaning of the arguments, see BuildSystem. |
| 30 | |
| 31 | = Got the kernel = |
| 32 | |
| 33 | You should now have a tree of built objects on `obj-simple-arm` and two versions of the kernel: |
| 34 | `kernel-simple-arm.out`:: |
| 35 | The ELF binary kernel, it can be used for GDB or other debugging purposes |
| 36 | `kernel-simple-arm.bin`:: |
| 37 | This is the file you may flash to the Sam7 through openocd. |
| 38 | |
| 39 | = Testing = |
| 40 | |
| 41 | You may connect to the board through the first UART, 38400,8,n,1, and see: |
| 42 | * A lua prompt asking for commands |
| 43 | * Some messages when you touch the buttons or the joystick |
| 44 | |
| 45 | On the lua prompt, you may try: |
| 46 | `lcd_reblit()`:: |
| 47 | Will blit a default image to the LCD |
| 48 | `lcd_blit_block(lba, x, y)`:: |
| 49 | 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. |
| 50 | `lcd_backlight(bool)`:: |
| 51 | Sets the backlight value (0/1) |
| 52 | `lcd_invert(bool)`:: |
| 53 | Sets the backlight inversion mode (0/1) |
| 54 | `lcd_set_contrast(n)`:: |
| 55 | Sets the contrast of LCD |
| 56 | `block_hexdump(lba)`:: |
| 57 | Hexdump the SD/MMC block at lba |
| 58 | `sd_mmc_rehash()`:: |
| 59 | Reinitialize the SD/MMC card, this can be used when switching cards |
| 60 | |
| 61 | You may find other commands pressing the <TAB> key (yes, there is completion). |