AVR32 Linux Board Support Package/Known Issues

From AVRFreaks Wiki

Jump to: navigation, search

The following is a list of known issues of the STK1000 Board Support Package. The numbers in brackets refer to the issue number in AVR Tools' issue tracking system.


Contents

Missing support for DirectFB [#5148]

Description: The STK1000 BSP tools installation does currently not include the full AVR32 Linux ported DirectFB library.

Workaround: By manually installing it as follows (use source code from STK1000 Board Support Package)

$ cd software
$ cd directfb
$ tar -xf DirectFB-(version number).tar.gz
$ cd DirectFB-(version number)
$ for i in `cat ../series `; do patch -p1 < ../$i; done
$ ./configure --host=avr32-linux --prefix=/usr/avr32-linux \
  --with-gfxdrivers=none --with-inputdrivers=keyboard,ps2mouse \
  --disable-video4linux --enable-jpeg --enable-png --enable-gif \
  --enable-shared --enable-multi --disable-sdl \
  FREETYPE_CONFIG=/usr/avr32-linux/bin/freetype-config
$ make
$ make install


Failure to boot from MMC [#4473]

Description: The bootloader will sometimes fail to initialize the MMC controller. If a terminal program is connected to UART_A, the following output will occur:

mmc: command 1 failed (status: 0x00100025)

No MMC card found
** Bad partition 1 **
## Booting image at 90400000 ...
Bad Magic Number
Uboot> 

Workaround: By manually issuing the command boot on the Uboot> prompt, the operating system will normally be loaded.


avr32program does not maintain CPU state when manipulating flash [#4562]

Description: The CPU state is not maintained after running any of the avr32program commands that manipulates flash memory. This includes erasing, unlocking and programming.

Reading flash memory does not disturb the CPU state.

Workaround: none.


Occational problems programming ELF files with avr32program [#4440]

Description: For some complex ELF files, avr32program may fail to program the memory correctly. The following error message appears:

ElfProgramSegmentInfo: Failed to read data.
copyData: Attempt to access position 66991 in buffer of length 1455.

Workaround: Convert the ELF file to binary and program that file instead:

avr32-objcopy -O binary myfile.elf myfile.bin
avr32program program -e -f 0,8Mb -F bin myfile.bin


avr32program hangs if programming flash without erasing [#4622]

Description: If the flash memory is programmed without first erasing it (either by running the erase command or specifying '--erase' to the program command), avr32program will time out after a long period.

Workaround: Always erase flash by specifying the --erase option when programming.


Internal RAM overwritten when programming flash. [#4653]

Description: When using avr32program to program flash, the internal RAM on the AP7000 will be overwritten with temporary data.

Workaround: If the contents of RAM must be kept when programming the flash, first read the data from memory and write it back after programming with the 'read' and 'program' commands.


U-Boot's mtest command overwrites U-Boot memory [#4561]

Description: The memory test (mtest) command in U-Boot will overwrite U-Boot's own memory with the default range.

Workaround: Only run mtest with a memory range that is known to not cause problems with U-Boot.


Linking with -relax maps assembly lines to wrong source code [#4440]

Description: When linking with -relax (default when optimizing) the .debug_line section will be incorrect. This causes problems debugging with gdb, since assembly lines and program address may map to the wrong source code.

Workaround: When debugging code, never enable optimization, and do not enable relaxing.

Access to use JTAGICE mkII over USB

The Linux platform used different systems for device drivers. Older systems uses hotplug while newer systems uses udev.

For "hotplug" systems:
The following should be put in a file called 'libavrtools':

#! /bin/bash

GROUP=avrtools

if [ "$ACTION" = "add" ] && [ -f "$DEVICE" ]
then
	if getent group $GROUP > /dev/null; then
		chmod 660 "$DEVICE"
		chown root:$GROUP "$DEVICE"
	fi
fi

and the following in a file called 'libavrtools.usermap':

# name	   match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
# JTAGICE mkII
libavrtools   0x0003      0x03eb	0x2103    0	       0            0            0               0               0               0                  0                  0		

and both files should be placed in /etc/hotplug/usb. The group avrtools should be created, containing the users which are allowed to use the JTAGICE mkII devices.

For "udev" systems:
Make a file called 'avrtools.rules' in the folder '/etc/udev/rules.d/' with the following content:

# Atmel JTAGICE mkII
ACTION=="add", SUBSYSTEM=="usb_device", SYSFS{idVendor}=="03eb",
SYSFS{idProduct}=="2103", GROUP="avrtools", MODE="0660"

Remember to run '/sbin/udevstart' after adding the file. Also add group 'avrtools' and add necessary users.

Static version created: 2007-03-07
Copyright (c) 2007 Atmel Corporation