Elektor Internet Radio

From Nutwiki
Revision as of 12:50, 14 June 2011 by Tim (Talk) (Firmware not running)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Firmware not running

Q: After uploading the firmware, nothing happens. What is wrong?

A: Check the serial port output. After pressing reset, the radio should at least print the firmware version numbers. Further, run the Nut/OS Discoverer to scan the network.

Q: No output at the serial port and no entry in the Nut/OS discoverer. What else can I try?

A: Make sure you set the GPNVM2 flag with SAM-BA or OpenOCD. If not set, the radio will start the bootloader after reset, not the firmware you uploaded into Flash memory.

Q: I did program the GPNVM2 flag with OpenOCD. Why doesn't the firmware run after reset?

You may run an old OpenOCD release. The latest we tested with success was release 520 from April the 1st, 2008.

After setting the GPNVM2 flag you might have to resume the CPU and should shutdown OpenOCD before pressing the reset button.

> halt
target state: halted target halted in Thumb state due to debug request, current mode: Supervisor cpsr: 0x000000b3 pc: 0x00200cb4 > flash probe 0 flash 'at91sam7' found at 0x00100000 > flash write_bank 0 webradio-1.2.1.bin 0
> at91sam7 gpnvm 2 set
> resume
> shutdown

Using SAM-BA

Q: Why doesn't SAM-BA show the USB connection?

A: You need to erase the firmware to activate the SAM-BA bootloader.

Using JTAG

Q: How do I use the Olimex OpenOCD JTAG instead of the Egnite Turtle version

A: you need to change the configuration file of openocd and start with a parameter like this : openocd -f eirocd.cfg

contents of the eirocd.cfg file is

cat eirocd.cfg
#daemon configuration
telnet_port 4444
gdb_port 3333
daemon_startup reset

interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003
jtag_speed 2

#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config srst_only
# srst_pulls_trst
jtag_nsrst_delay 200
jtag_ntrst_delay 200

#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe

#target configuration
#target <type> <startup mode>
#target arm7tdmi <endianness> <reset mode> <chainpos> <variant>
target arm7tdmi little reset_halt 0 arm7tdmi
run_and_halt_time 0 30

#flash bank at91sam7 0 0 0 0 <target#>
#AT91SAM7 flashes only require the target#,
#all other values are looked up after reading the chip-id and type.
flash bank at91sam7 0 0 0 0 0