12 | | |
13 | | == Testing == |
14 | | |
15 | | There is currently no testing code or data associated with the CM2. As this improves, it should be stored in the SVN repository with the source code, and integrated with configuration and build scripts there. |
16 | | |
17 | | == Development Environment == |
18 | | |
19 | | === Firmware Programming === |
20 | | |
21 | | ==== JTAG Programmer Hardware ==== |
22 | | |
23 | | We are using Olimex [http://www.olimex.com/dev/arm-usb-ocd.html ARM-USB-OCD] USB based JTAG debugger that is attached to the JTAG port on the CM2 board (JXX). |
24 | | |
25 | | ==== JTAG Programmer Software ==== |
26 | | |
27 | | Software used for debugging and internal flash programming is [http://openfacts.berlios.de/index-en.phtml?title=Open_On-Chip_Debugger OpenOCD] (standard Debian package - {{{ apt-get isntall openocd }}} ). |
28 | | |
29 | | The file openocd.cfg, included in the source repository, has an appropriate configuration for programming the CM2 hardware, although you can experiment with different scripts to automate erasing the flash, verifying the image, and so forth. |
30 | | |
31 | | === Cross-compiler === |
32 | | |
33 | | Software development environment is based on [http://www.codesourcery.com/gnu_toolchains/arm GNU Toolchain for ARM Processor]. Downloaded tarball is installed in /usr/{bin,lib,libexec,arm-none-linux-gnueabi}. The toolcahin was compiled with the ''arm-none-linux-gnueabi'' prefix so that (for example) compiler can be invoked with: |
34 | | {{{ |
35 | | arm-none-linux-gnueabi-gcc program.c -o program |
36 | | }}} |
37 | | |
38 | | You can also get the latest version of gcc, binutils, and newlib, and compile these as {{{configure --target=arm-elf}}}. Both the Makefile and the loader know (at least in theory) how to deal with ELF format CM2 images. In this case tools are prefixed with "arm-elf", so for example an appropriate value for {{{CC}}} in the {{{Makefile}}} would be {{{CC=/usr/local/arm-elf-gcc}}} |