Early debug changes

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3061 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2010-10-30 18:25:10 +00:00
parent 157c956d52
commit 391f7284bf
4 changed files with 155 additions and 104 deletions

View File

@ -6,7 +6,7 @@ This is the README file for the NuttX port to the Atmel AVR32DEV1 board.
Contents
^^^^^^^^
* Pin Configuration
* GPIO Pin Configuration
* Serial Connection
* Toolchains
* Development Environment
@ -22,8 +22,8 @@ Contents
* AVR32DEV1 Configuration Options
* Configurations
Pin Configuration
^^^^^^^^^^^^^^^^^
GPIO Pin Configuration
^^^^^^^^^^^^^^^^^^^^^^
The only GPIO pin usage is for LEDs (2) and Buttons (2):
@ -32,7 +32,38 @@ The only GPIO pin usage is for LEDs (2) and Buttons (2):
PIN 24 PB2 KEY1
PIN 25 PB3 KEY2
See configs/avr32dev/src/avr32dev_internal.h
(See configs/avr32dev/src/avr32dev_internal.h). And also for
crystals (4), JTAG (1), and USB (1):
PIN 30 PA11 XIN32
PIN 31 PA12 XOUT32
PIN 35 PA15 EVTO (JTAG)
PIN 39 PA18 X1IN
PIN 40 PA19 X1OUT
PIN 61 PA26 ID (USB)
All GPIO pins are brought out through connectors J1 (PINS 33-64)
and J2 (PINS 1-32).
NOTE: There seems to be some difference in labeling for OSC0 and
OSC1 between MCUZone.com and Atmel:
Oscillator pinout
-------------------------- --------------------
QFP48 QFP64 Pad Oscillator AVR32DEV1
PIN PIN PIN LABEL
----- ----- ---- --------- --------------------
30 39 PA18 XIN0 X1IN (12MHz)
41 PA28 XIN1 PA28 (no crystal)
22 30 PA11 XIN32 XIN32 (32KHz)
31 40 PA19 XOUT0 X1OUT (12Mhz)
42 PA29 XOUT1 PA29 (no crystal)
23 31 PA12 XOUT32 XOUT32 (32 Khz)
----- ----- ---- --------- --------------------
NOTE: These crystal inputs/outputs are analog signals and my
assumption is that they need no pin multiplexing setting to
enable them for the external crystal function.
Serial Connection
^^^^^^^^^^^^^^^^^
@ -67,6 +98,9 @@ PA17 and PA23 are avaiable from the AVR32DEV1:
PA11-PA12, PA18-PA19, PA28-PA31............................-0.3 to 3.6V
Other Pins ............................................... -0.3 to 5.5V
I get the 5V from another USB port (using the 5V power cable that normally
provides the extra current needed by my USB IDE drive).
Development Environment
^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -77,6 +77,7 @@ CONFIG_ARCH_AVR=y
CONFIG_ARCH_AVR32=y
CONFIG_ARCH_CHIP=at32uc3
CONFIG_ARCH_CHIP_AT32UC3B0256=y
CONFIG_ENDIAN_BIG=y
CONFIG_ARCH_BOARD=avr32dev1
CONFIG_ARCH_BOARD_AVR32DEV1=y
CONFIG_BOARD_LOOPSPERMSEC=7982

View File

@ -49,8 +49,9 @@ if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi
WD=`pwd`
export AVRTOOLS_BIN="/cygdrive/c/Program Files/Atmel/AVR Tools/AVR32 Toolchain/bin/"
export AVR32_BIN="/cygdrive/c/Program Files/Atmel/AVR Tools/AVR32 Toolchain/bin/"
export FLIP_BIN="/cygdrive/c/Program Files/Atmel/Flip 3.4.2/bin"
export PATH="${FLIP_BIN}:/sbin:/usr/sbin:${PATH_ORIG}:${AVRTOOLS_BIN}"
export AVR32DEV1_BIN="${WD}/configs/avr32dev1/tools"
export PATH="${FLIP_BIN}:${AVR32DEV1_BIN}:/sbin:/usr/sbin:${PATH_ORIG}:${AVR32_BIN}"
echo "PATH : ${PATH}"

View File

@ -1,6 +1,8 @@
#!/bin/bash
#set -x
# This script must be executed in the NuttX top-level directory
# This script must be executed in the NuttX top-level directory. We'll check..
# the .config file should be located there.
TOPDIR=`pwd`
if [ ! -f .config ]; then
@ -9,14 +11,27 @@ if [ ! -f .config ]; then
echo " Has NuttX been configured?"
exit 1
fi
# The NuttX build system creates a nuttx ELF file, but the batchisp tools
# expects the file to have a .elf extension
if [ ! -f nuttx.elf ]; then
if [ ! -f nuttx ]; then
echo "The NuttX ELF file (nuttx) does not exist in this directory."
echo "The NuttX ELF file (nuttx or nuttx.elf) does not exist in this directory."
echo " Has the NuttX binary been built?"
exit 1
fi
echo "Re-naming nuttx to nuttx.elf"
mv nuttx nuttx.elf || { echo "mv failed"; exit 1; }
else
if [ -f nuttx ]; then
echo "Replacing the old nuttx.elf with the new nuttx file."
mv nuttx nuttx.elf || { echo "mv failed"; exit 1; }
fi
fi
DEVICE=at32uc3b0256
HARDWARE=usb
OPERATION="erase f memory flash blankcheck loadbuffer nuttx program verify start reset 0"
OPERATION="erase f memory flash blankcheck loadbuffer nuttx.elf program verify start reset 0"
batchisp -device $DEVICE -hardware $HARDWAR -operation $OPERATION
batchisp -device $DEVICE -hardware $HARDWARE -operation $OPERATION