Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | LPC2000 | Program doesn't work without Wiggler?


Advertise Here

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

Program doesn't work without Wiggler? - davidbinar - Aug 16 2:35:11 2006

Hi
My program runs fine when booting using my wiggler but when I remove
the wiggler and reboot the program won't run or it might be in an
interrupt routine or something, I can't check without the wiggler. Do
you have to do anything with your program in order for it to run
without the wiggler? Can anyone help me?

The processor is the LPC2294 on an Olimex development board. I use the
CAN-interface and the UART0.

Best Regards
David Berg



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )


Re: Program doesn't work without Wiggler? - 42Bastian Schick - Aug 16 3:16:14 2006

davidbinar schrieb:
> Hi
> My program runs fine when booting using my wiggler but when I remove

booting means you just issue an reset with the wiggler ?
Or do you run any setup file ?

Try some printf debugging to see which parts are excecuted.

--
42Bastian



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

RE: Program doesn't work without Wiggler? - Paul Curtis - Aug 16 3:44:07 2006

What compiler are you using?

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors

> -----Original Message-----
> From: davidbinar [mailto:d...@binar.se]
> Sent: 16 August 2006 07:35
> To: l...@yahoogroups.com
> Subject: [lpc2000] Program doesn't work without Wiggler?
>
> Hi
> My program runs fine when booting using my wiggler but when I
> remove the wiggler and reboot the program won't run or it
> might be in an interrupt routine or something, I can't check
> without the wiggler. Do you have to do anything with your
> program in order for it to run without the wiggler? Can
> anyone help me?
>
> The processor is the LPC2294 on an Olimex development board.
> I use the CAN-interface and the UART0.
>
> Best Regards
> David Berg
>
>



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Program doesn't work without Wiggler? - Sten - Aug 16 3:54:29 2006

42Bastian Schick wrote:
> davidbinar schrieb:
>
>>Hi
>>My program runs fine when booting using my wiggler but when I remove
> booting means you just issue an reset with the wiggler ?
> Or do you run any setup file ?
>
> Try some printf debugging to see which parts are excecuted.
>

Hello,

are logic level of all JTAG signals correct according to users manual (all neccessary pull-up and
pull-down resistors) if no wiggler is connected? (DBGSEL, RTCK, TCK, ...)
Could it be that JTAG engine is blocking due to bad signals?

Sten

--
/************************************************
Do you need a tiny and efficient real time
operating system (RTOS) with a preemtive
multitasking for LPC2000 or AT91SAM7?

http://www.sandring-systems.de/

************************************************/



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Program doesn't work without Wiggler? - davidbinar - Aug 16 4:39:48 2006

--- In l...@yahoogroups.com, Sten wrote:
>
> 42Bastian Schick wrote:
> > davidbinar schrieb:
> >
> >>Hi
> >>My program runs fine when booting using my wiggler but when I
remove
> >
> >
> > booting means you just issue an reset with the wiggler ?
> > Or do you run any setup file ?
> >
> > Try some printf debugging to see which parts are excecuted.
> > Hello,
>
> are logic level of all JTAG signals correct according to users
manual (all neccessary pull-up and
> pull-down resistors) if no wiggler is connected? (DBGSEL, RTCK,
TCK, ...)
> Could it be that JTAG engine is blocking due to bad signals?
>
> Sten

Bastian>>

When I wrote booting I meant that i did a reset on the board with
the wiggler physically removed. I have tried resetting the board
without the wiggler earlier without problems but that was a couple
of months ago and my program has evolved quite alot since.

Sten >>

I'm not sure about all JTAG signals but I have been able to run
programs on the board without the wiggler a couple of months ago.
The only jumper I remember changing when removeing the wiggler is
the DBG jumper. It's connected to RTCK.

I'm using the Olimex Development Board from www.sparkfun.com:
http://www.sparkfun.com/commerce/product_info.php?products_id=262
Here's the Schematic:
http://www.olimex.com/dev/images/lpc-e22xx-sch.gif

Best Regards
/David



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Program doesn't work without Wiggler? - davidbinar - Aug 16 4:45:46 2006

I'm using GCC, Eclipse and OpenOCD.

/David

--- In l...@yahoogroups.com, "Paul Curtis" wrote:
>
> What compiler are you using?
>
> --
> Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
> CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors
>
>
>
> > -----Original Message-----
> > From: davidbinar [mailto:david.berg@...]
> > Sent: 16 August 2006 07:35
> > To: l...@yahoogroups.com
> > Subject: [lpc2000] Program doesn't work without Wiggler?
> >
> > Hi
> > My program runs fine when booting using my wiggler but when I
> > remove the wiggler and reboot the program won't run or it
> > might be in an interrupt routine or something, I can't check
> > without the wiggler. Do you have to do anything with your
> > program in order for it to run without the wiggler? Can
> > anyone help me?
> >
> > The processor is the LPC2294 on an Olimex development board.
> > I use the CAN-interface and the UART0.
> >
> > Best Regards
> > David Berg



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Re: Program doesn't work without Wiggler? - Dominic Rath - Aug 16 4:59:27 2006

On Wednesday 16 August 2006 10:41, davidbinar wrote:
> I'm using GCC, Eclipse and OpenOCD.
>
> /David

Hi,

do you just connect your Wiggler, or are you running the OpenOCD, too, when
your program fails?

Regards,

Dominic



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Program doesn't work without Wiggler? - davidbinar - Aug 16 5:15:53 2006

--- In l...@yahoogroups.com, Dominic Rath
wrote:
>
> On Wednesday 16 August 2006 10:41, davidbinar wrote:
> > I'm using GCC, Eclipse and OpenOCD.
> >
> > /David
>
> Hi,
>
> do you just connect your Wiggler, or are you running the OpenOCD,
too, when
> your program fails?

When the program works I have the wiggler connected to the board and
the OpenOCD-program running so that I can step through my code in
eclipse and everything works fine.

When it doesn't work I don't have the wiggler connected and
naturally I don't have the OpenOCD program running either.

Best Regards
/David



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Re: Program doesn't work without Wiggler? - Dominic Rath - Aug 16 5:23:14 2006

On Wednesday 16 August 2006 11:06, davidbinar wrote:
> When the program works I have the wiggler connected to the board and
> the OpenOCD-program running so that I can step through my code in
> eclipse and everything works fine.
>
> When it doesn't work I don't have the wiggler connected and
> naturally I don't have the OpenOCD program running either.
>
> Best Regards
> /David

Okay, so what exactly are you doing when
> My program runs fine when booting using my wiggler

Do you reset your system using the boards reset switch?
If you're using the OpenOCD to reset the board, what reset type do you use,
reset_run? run_and_halt? run_and_init?
Maybe you're using an init script to initialize parts of your chip?

Regards,

Dominic



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Program doesn't work without Wiggler? - davidbinar - Aug 16 7:01:02 2006

--- In l...@yahoogroups.com, Dominic Rath
wrote:

> Do you reset your system using the boards reset switch?
> If you're using the OpenOCD to reset the board, what reset type do
you use,
> reset_run? run_and_halt? run_and_init?
> Maybe you're using an init script to initialize parts of your chip?

When I boot without the wiggler i disconnect the USB-cable that
powers the board and then reconnect it. After that I have also tried
the RST-button on the board. When I use the wiggler I first
disconnect/connect the USB-cable. This is my commands issued to gdb:

target remote localhost:3333
monitor reset
monitor sleep 500
monitor poll
monitor soft_reset_halt
break main
monitor arm7_9 force_hw_bkpts enable
continue

And here's the configuration script to OpenOCD (taken from the
winarm distribution):

#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface parport
parport_port 0x378
parport_cable wiggler
jtag_speed 0

#use combined on interfaces or targets that can't set TRST/SRST
separately
reset_config trst_and_srst srst_pulls_trst

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

#target configuration
daemon_startup reset

#target
#target arm7tdmi
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
run_and_halt_time 0 30

#flash configuration
#flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum

# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-
Chip+Debugger

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

RE: Re: Program doesn't work without Wiggler? - "sub...@aeolusdevelopment.com" - Aug 16 9:37:20 2006



>From: davidbinar
>Date: Wed, 16 Aug 2006 10:55:28 -0000
>--- In l...@yahoogroups.com, Dominic Rath wrote:
>
>> Do you reset your system using the boards reset switch?
>> If you're using the OpenOCD to reset the board, what reset type do you
use,
>> reset_run? run_and_halt? run_and_init?
>> Maybe you're using an init script to initialize parts of your chip?
>
>When I boot without the wiggler i disconnect the USB-cable that
>powers the board and then reconnect it. After that I have also tried
>the RST-button on the board. When I use the wiggler I first
>disconnect/connect the USB-cable. This is my commands issued to gdb:

Is the checksum in the exception vector area set correctly?

Robert
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Program doesn't work without Wiggler? - davidbinar - Aug 16 10:53:50 2006

--- In l...@yahoogroups.com, "subscriptions@..."
wrote:
>
> >From: davidbinar
> >Date: Wed, 16 Aug 2006 10:55:28 -0000
> >--- In l...@yahoogroups.com, Dominic Rath
wrote:
> >
> >> Do you reset your system using the boards reset switch?
> >> If you're using the OpenOCD to reset the board, what reset type
do you
> use,
> >> reset_run? run_and_halt? run_and_init?
> >> Maybe you're using an init script to initialize parts of your
chip?
> >
> >When I boot without the wiggler i disconnect the USB-cable that
> >powers the board and then reconnect it. After that I have also
tried
> >the RST-button on the board. When I use the wiggler I first
> >disconnect/connect the USB-cable. This is my commands issued to
gdb:
>
> Is the checksum in the exception vector area set correctly?

I have no idea. Is that something I have to set myself? Where/how do
I do that?

Now I've been able to first start the program up with the wiggler
then removeing the wiggler from tha board and pressing the RST-
button. And the program works when i use the RST-button but as soon
as I disconnect the USB and reconnects it it stops working until I
once again connect the Wiggler and resets the board through
gdb/wiggler.

/David

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Program doesn't work without Wiggler? - davidbinar - Aug 16 10:59:31 2006

--- In l...@yahoogroups.com, "davidbinar" wrote:
>
> --- In l...@yahoogroups.com, Dominic Rath
> wrote:
>
> > Do you reset your system using the boards reset switch?
> > If you're using the OpenOCD to reset the board, what reset type
do
> you use,
> > reset_run? run_and_halt? run_and_init?
> > Maybe you're using an init script to initialize parts of your
chip?
>
> When I boot without the wiggler i disconnect the USB-cable that
> powers the board and then reconnect it. After that I have also
tried
> the RST-button on the board. When I use the wiggler I first
> disconnect/connect the USB-cable. This is my commands issued to
gdb:
>
> target remote localhost:3333
> monitor reset
> monitor sleep 500
> monitor poll
> monitor soft_reset_halt
> break main
> monitor arm7_9 force_hw_bkpts enable
> continue
>
> And here's the configuration script to OpenOCD (taken from the
> winarm distribution):
>
> #daemon configuration
> telnet_port 4444
> gdb_port 3333
>
> #interface
> interface parport
> parport_port 0x378
> parport_cable wiggler
> jtag_speed 0
>
> #use combined on interfaces or targets that can't set TRST/SRST
> separately
> reset_config trst_and_srst srst_pulls_trst
>
> #jtag scan chain
> #format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask,
> IDCODE)
> jtag_device 4 0x1 0xf 0xe
>
> #target configuration
> daemon_startup reset
>
> #target
> #target arm7tdmi
> target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
> run_and_halt_time 0 30
>
> #flash configuration
> #flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765
calc_checksum
>
> # For more information about the configuration files, take a look
at:
> # http://openfacts.berlios.de/index-en.phtml?title=Open+On-
> Chip+Debugger

I've now looked at some output from GDB in Eclipse:

target remote localhost:3333
(gdb) UNDEF_Routine () at main.c:1637
1637 while (1) ;
(gdb) monitor reset
(gdb) monitor poll
target state: halted
target halted in ARM state due to debug request, current mode: Abort
cpsr: 0x90000097 pc: 0x000020b0
(gdb) monitor soft_reset_halt
requesting target halt and executing a soft reset
(gdb) monitor arm7_9 force_hw_bkpts enable
force hardware breakpoints enabled
(gdb) continue

Breakpoint 1, main () at main.c:230
230 lpc229x_system_init();
(gdb)

It seems like the program is stuck in an ISR for Undefined
Instruction Mode before the monitor reset command is issued... But
why doesn't the program end up in that routine again after the
reset? Very strange

/David



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

RE: Re: Program doesn't work without Wiggler? - "sub...@aeolusdevelopment.com" - Aug 16 11:09:47 2006



>From: davidbinar
>Date: Wed, 16 Aug 2006 14:52:12 -0000
>--- In l...@yahoogroups.com, "subscriptions@..."
wrote:
>>
>> Is the checksum in the exception vector area set correctly?
>
>I have no idea. Is that something I have to set myself? Where/how do
>I do that?

In that case you are likely stuck in ISP mode. All the serial download
programs calculate and insert this automatically, I don't believe the JTAG
ones do.

Check the user manual to find the address of the exception vector used for
the checksum and see what it's set to after you program.

I seem to recall someone mentioning that the philips download utility would
allow you to load a hex file, calculate the checksum and write it back out
but I wouldn't swear to it.

Robert

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Re: Program doesn't work without Wiggler? - 42Bastian Schick - Aug 17 1:44:24 2006

davidbinar schrieb:
>> Is the checksum in the exception vector area set correctly?
>
> I have no idea. Is that something I have to set myself? Where/how do
> I do that?

Sum up the first 8 longs, the result must be zero.

--
42Bastian



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Program doesn't work without Wiggler? - davidbinar - Aug 17 2:52:22 2006

--- In l...@yahoogroups.com, "subscriptions@..."
wrote:
>
> >From: davidbinar
> >Date: Wed, 16 Aug 2006 14:52:12 -0000
> >--- In l...@yahoogroups.com, "subscriptions@"
> wrote:
> >>
> >> Is the checksum in the exception vector area set correctly?
> >
> >I have no idea. Is that something I have to set myself? Where/how
do
> >I do that?
>
> In that case you are likely stuck in ISP mode. All the serial
download
> programs calculate and insert this automatically, I don't believe
the JTAG
> ones do.
>
> Check the user manual to find the address of the exception vector
used for
> the checksum and see what it's set to after you program.
>
> I seem to recall someone mentioning that the philips download
utility would
> allow you to load a hex file, calculate the checksum and write it
back out
> but I wouldn't swear to it.

Ok, I think I haven't been clear on one thing: My program are run
from flash and I download it to the board using Phillips Flash
Utility through USB/Serial. I don't download a different or new
program when using the wiggler or not using the wiggler, I just
disconnect it or reconnects it, the program in flash never changes.

/David



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Program doesn't work without Wiggler? - Allistair Moses - Aug 17 13:55:44 2006

For those of you with CrossWorks: In response to the problem of programms not running without the wiggler.

http://ccgi.rowley.co.uk/support/faq.php?do=article&articleid=35
[Non-text portions of this message have been removed]



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )