Archive for the ‘ARM’ Category

U-Boot for Toradex Colibri Tegra 250 Module

Recently our friends at Toradex released engineering samples of the fantastic Colibri Tegra module based on the famed NVIDIA Tegra 2 Cortex-A9 MPCore. The only thing it was lacking was open-source software for the boot process.

We’ve decided to port the well-established U-Boot bootloader (from DENX) as it’s suited best for booting our internal, console-only port of the Linux 2.6.36 kernel.

In the attachment to this post you will find the source files necessary to build and run U-Boot on Toradex’ Orchid and Iris carrier boards. For those who want to miss out on the fun of building it from scratch, a binary image is included. The bootloader runs at a 115200 baudrate, on UART_A.

The major functionalities which are featured in this release are:

  • Separate configuration layout files for Toradex/Colibri
  • PLL, Clock and pinmux configuration
  • cores initialization
  • UART_A initialization, serial console
  • Initialization for USB ULPI (SMSC USB3340)
  • Asix AX88772B USB 2.0 Ethernet support

Detailed information, descriptions of the patching and compilation processes are provided in the attached manual.

The code is released under GPL.

We’d like to thank Toradex for allowing us to get an early sample of the Iris board, which greatly helped our development effort.

Attached .tar.gz file: u-boot-2011.03-rc2-toradex-colibri-tegra.tar.gz

Attached .pdf file: U-Boot_Colibri_Manual.pdf

Attached .bin file: u-boot-2011.03-rc2-toradex-colibri-tegra.bin

I²C in eCos on AT91SAM7 platforms

Using eCos on AT91SAM7 family processors has generally been a positive experience, however, the absence of some important functionalities can be somewhat of a problem. One of the most striking deficiencies of eCos is the lack of an interrupt-based driver for I²C, a popular bus used especially with various sensor chips. As we had to devise such a driver in one of our projects, we publish it below. The code can be used for the eCos userspace application on both SAM7X and SAM7S and, after some modification, can successfully be used seperately from the eCos platform.
The code is released on the BSD license. We appreciate any remarks!


First we have to declare a few variables – mutex and flag handles, and some buffer structures:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
       // rx_tx_struct
       typedef struct {
            cyg_int16 len;
            cyg_uint16 index;
             char *buffer;
       } I2C_RX_TX_STRUCT;
       I2C_RX_TX_STRUCT rx_data_struct, tx_data_struct;
       // handles, flags, mutexes
       cyg_flag_t rxrdy_flag;
       cyg_flag_t txrdy_flag;
       cyg_flag_t txcomp_flag;
       cyg_flag_t done_flag;
       cyg_handle_t  hIntr;
       cyg_interrupt intr;
       cyg_mutex_t twi_mutex;

(more…)