planiup wrote: > Hello all: > > I'm a developer of 8 bit microcontrollers applications that wants to > switch to ARM. So I'm learning my own all this stuff, and as a > newbee, I have some problems. Probably the most stupid ones. > > I have a Macraigor Wiggler clone made by myself, and a development > board with an LPC2103, also made by myself. I've checked all > circuitry and it seems to be OK. > > I use the IAR KickStart downloaded from IAR, rev 4.30A, and when > trying to debug any program with my system, I always start at the > bootloader. > Can somebody point me in the right direction or give me some starting > point to avoid that? > > I did not initialize the vector table, since I'm only trying to > toggle pin P0.0. > Hi Guillem, The LPCs expect the vectors area to contain a valid checksum at the old 24-bit address exception vector location. The Philips serial port bootloader tool fills in that checksum when you program a device. The first time I wrote a simple assembler program to turn on some I/O pins it didn't work. I filled in the vectors table properly and then it did. So, I would suggest installing default vectors that branch to themselves, except for the vector to start your program of course. I've attached that example below. Regards Dave # ----------------------------------------------------------------- # Makefile for ex1.elf # ----------------------------------------------------------------- CC = arm-elf-gcc CFLAGS = -Wall -O2 -mcpu=arm7tdmi # Override the default linker script .text section start address LDFLAGS = -Ttext=0 -nostartfiles # Uncomment this and the linker will output the linker script used #LDFLAGS += -Wl,--verbose all: ex1.hex ex1.elf: ex1.s $(CC) $(CFLAGS) $(LDFLAGS) ex1.s -o ex1.elf ex1.hex: ex1.elf arm-elf-objcopy -O ihex ex1.elf ex1.hex # Use 'make ex1.size' to see the section sizes ex1.size: ex1.elf @echo -n "-------------------------------" @echo "-------------------------------" @echo "Object section sizes:" @echo -n "-------------------------------" @echo "-------------------------------" @echo "" arm-elf-size ex1.elf @echo "" @echo -n "-------------------------------" @echo "-------------------------------" @echo "" arm-elf-objdump -h ex1.elf clean: -rm -rf *.o *.elf *.hex /* ex1.s */ /* ---------------------------------------------------------------- * Exception vectors * ---------------------------------------------------------------- */ .text .arm .global _start _start: /* Vectors (8 total) */ b reset /* reset */ b loop /* undefined instruction */ b loop /* software interrupt */ b loop /* prefetch abort */ b loop /* data abort */ nop /* reserved for the bootloader checksum */ b loop /* IRQ */ b loop /* FIQ */ /* ---------------------------------------------------------------- * Test code * ---------------------------------------------------------------- */ reset: ldr r0, IODIR1 ldr r1, IODIR1_VALUE str r1, [r0] ldr r0, IOCLR1 str r1, [r0] ldr r0, IOSET1 ldr r1, IOSET1_VALUE str r1, [r0] loop: b loop /* ---------------------------------------------------------------- * Constants * ---------------------------------------------------------------- */ /* LED control registers */ IOSET1: .word 0xE0028014 IODIR1: .word 0xE0028018 IOCLR1: .word 0xE002801C IODIR1_VALUE: .word 0x00FF0000 IOSET1_VALUE: .word 0x00550000 .end
Message
Re: [lpc2000] Newbee: bootloader locked.
2006-03-21 by David Hawkins
Attachments
- No local attachments were found for this message.