Background Reading and Useful Links:
- Good detailed instruction on ARM/Eclipse Development by James Lynch. The details aren't particularly relivent to how were doing it, but it's good for getting a conceptual understanding if you've never messed with it. http://www.sparkfun.com/tutorial/ARM/ARM_Cross_Development_with_Eclipse.pdf
- LPC2148 Datasheets: http://www.keil.com/dd/chip/3880.htm
- LPC 2148 Manual (Rev. 02) user.manual.lpc2141.lpc2142.lpc2144.lpc2146.lpc2148.pdf
- LPC 2148 Manual (Rev. 01) http://www.keil.com/dd/docs/datashts/philips/user_manual_lpc214x.pdf
- Instruction set high level description http://www.simplemachines.it/doc/arm_inst.pdf
- Arm Instruction Set Reference http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf
- Arm Thumb Instruction Set Reference http://infocenter.arm.com/help/topic/com.arm.doc.qrc0006d/QRC0006_UAL16.pdf
- Arm7TDMI Technical Reference Manual http://infocenter.arm.com/help/topic/com.arm.doc.ddi0210c/DDI0210B.pdf
- Info on Olimex ARM-USB-OCD Programming with OpenOCD http://www.openhardware.net/Embedded_ARM/OpenOCD_JTAG/
- Schematic for Olimex Dev Board: http://www.olimex.com/dev/images/lpc-p2148-sch.gif
- Yahoo group on LPC Development: http://tech.groups.yahoo.com/group/lpc2000/
- OpenOCD Quick Reference Command Card: http://www.fh-augsburg.de/~hhoegl/proj/openocd/oocd-quickref.pdf
- Free e-book book, "Insiders Guide to the Philips Arm 7", I haven't read it but it was reccomended: http://www.hitex.co.uk/arm/lpc2000book/
- Olimex ARM-USB-OCD Programmer http://www.olimex.com/dev/arm-usb-ocd.html
- 2148 FreeRTOS Port lpc2148 freertos.zip
- GNU-ARM Utilities (including Linux): http://www.gnuarm.com/
- Download openocd for windows here: http://www.yagarto.de/howto/openocd/index.html#install
General Physical Setup:
- Set the jumpers on the ARM-USB-OCD JTAG programmer to 9 volt DC. See http://www.olimex.com/dev/pdf/ARM-USB-OCD.pdf for instrucitons
- Both dip-switches on the board should be in the
off
position - Make sure the debug jumper is jumpered (next to the JTAG port on the Olimex LPC2148 dev board)
Setup under Linux
- Install the FTDI library, do this as
root
. Note, the library provided by FTDI is libc6, i386-32bit. I was not able to get this working on my x86-64bit linux install. I instead installed on a 32 bit linux install.- Download this: http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx0.4.13.tar.gz
- Decompress and untar: tar -zxf libftd2xx0.4.13.tar.gz
- Their official instructions are in the 'README.dat' file.
- Copy the header files:
cp \*.h /usr/local/include/
- Copy the library file:
cp libftd2xx.so.0.4.13 /usr/local/lib
cd /usr/local/lib
ln -s libftd2xx.so.0.4.13 libftd2xx.so
cd /usr/lib
ln -s /usr/local/lib/libftd2xx.so.0.4.13 libftd2xx.so
- For a 2.6 kernel: add this to /etc/fstab
none /proc/bus/usb usbfs defaults,mode=0666 0 0
- For a 2.4 kernel: add this to /etc/fstab
none /proc/bus/usb usbdevfs defaults,mode=0666 0 0
- Make sure
/usr/local/lib
is in /etc/ld.so.conf - Run
ldconfig
- run
mount -a
(it might spew out some warnings)
- Install openocd - Additional Info http://bec-systems.com/web/content/view/74/9/, http://www.openhardware.net/Embedded_ARM/OpenOCD_JTAG/
- svn checkout svn://svn.berlios.de/openocd/trunk openocd
- cd openocd
- ./bootstrap
- ./configure --enable-ft2232_ftd2xx
- make
- make install
Try openOCD
If your using a newer version of open ocd (approx >0.3)
- openocd -f interface/olimex-arm-usb-ocd.cfg -f target/lpc2378.cfg
You should see somthing like the following:
openocd -f interface/olimex-arm-usb-ocd.cfg -f target/lpc2378.cfg Open On-Chip Debugger 0.3.1 (2009-11-25-12:22) $URL$ For bug reports, read http://openocd.berlios.de/doc/doxygen/bugs.html jtag_nsrst_delay: 200 jtag_ntrst_delay: 200 trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain 500 kHz Info : clock speed 500 kHz Info : JTAG tap: lpc2378.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787, part: 0xf1f0, ver: 0x4) Info : Embedded ICE version 7 Error: EmbeddedICE v7 handling might be broken
If you using an older version of OpenOCD
- create the file
lpc2xxx\_armusbocd.cfg
, and copy and paste the contents as listed at the bottom of this page. run
openocd -f<path-to-config-file>
You should see it start up and stay running. If it spews out errors and exits you have a problem. So long as you get a state back, it's working.root@jtag:~# openocd -flpc2xxx_armusbocd.cfg Info: openocd.c:92 main(): Open On-Chip Debugger (2007-07-15 13:15 CEST) Info: configuration.c:50 configuration_output_handler(): Command swbkpts not found Warning: arm7_9_common.c:684 arm7_9_assert_reset(): srst resets test logic, too
- create the file
In a separate terminal, run
telnet localhost 4444
type
poll
. You should see it may be in a 'halted' state or 'running' stateroot@jtag:~# telnet localhost 4444 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Open On-Chip Debugger \> poll target state: halted target halted in Thumb state due to debug request, current mode: Supervisor cpsr: 0xa00000f3 pc: 0x7fffd2c4 \>
Install GNU-Arm utilities
- Pre-compiled utilities are available from http://www.gnuarm.com/. I used the 64 bit binary utils: http://www.gnuarm.com/bu-2.16.1_gcc-4.0.2-c-c++_nl-1.14.0_gi-6.4_x86-64.tar.bz2. They also have 32 bit utils: http://www.gnuarm.com/bu-2.15_gcc-3.4.3-c-c++-java_nl-1.12.0_gi-6.1.tar.bz2. If you picky about versions, you can download all the latest source code versions and compile whatever you like.
- Decompress and un-tar the file.
- Move the extracted directory to /usr/local/gnuarm-4.0.2 (or another appropiate location)
- Note: to use the stuff, you'll need to change your path: 'export PATH="/usr/local/gnuarm-4.0.2/bin:$PATH"'
- Setup Eclipse
- I'll refer you to James Lynch's instructions for project setup (link at top of this page)
- Modifications to FreeRTOS make file once it's in eclipse
- Add the 'all' target: all: $(PROJECT).hex
- Have the make file create a 'bin' file: add '$(OBJCOPY) $(PROJECT).elf -O binary $(PROJECT).bin' under the '$(PROJECT).hex : $(PROJECT).elf' section
- Find 'arm-elf-size.exe' and replace with 'arm-elf-size'
- Add the following around line 46:
- USETHUMBMODE=NO DEBUG= OPTIM=-O3 RUNMODE=RUNFROM_ROM LDSCRIPT=lpc2148-rom.ld
- Change the project PATH enviromental variable (Note: If you did this change in your default profile you need not modify the eclipse variable.)
- Right click on the project, goto properties, goto "C/C++ Make Project", click the 'Enviroment' tab. Click the 'New' button. Set the variable name to 'PATH' and the value to '/usr/local/gnuarm-4.0.2/bin:$PATH' (or whatever your arm-gcc install bin directory is.
Programming
- Create the file 'oocd_flash_lpc2148.script' (contents at bottom of this page). Note: Be sure to change the path of the 'bin' file to where you compiled FreeRTOS.
- Modify your 'lpc2xxx_armusbocd.cfg' and un-comment the 'target_script *' line, be sure to mofify the location of the script file to where you have saved your script.
- Set the ICSP dip switch 1 to 'on' on the Olimex board. Hit the reset button
- Startup OpenOCD
- You may need to telnet into port 4444 and type 'halt' to get it to re-program
You should see somthing like this on the output of openocd
root@jtag:~# openocd -flpc2xxx_armusbocd.cfg Info: openocd.c:92 main(): Open On-Chip Debugger (2007-07-15 13:15 CEST) Info: configuration.c:50 configuration_output_handler(): Command swbkpts not found Warning: arm7_9_common.c:684 arm7_9_assert_reset(): srst resets test logic, too Info: target.c:231 target_init_handler(): executing reset script 'oocd_flash_lpc2148.script' Info: configuration.c:50 configuration_output_handler(): dcc downloads are enabled Info: configuration.c:50 configuration_output_handler(): waiting for target halted... Info: configuration.c:50 configuration_output_handler(): target halted Info: configuration.c:50 configuration_output_handler(): target state: halted Info: configuration.c:50 configuration_output_handler(): target halted in Thumb state due to debug request, current mode: Supervisor Info: configuration.c:50 configuration_output_handler(): cpsr: 0xa00000f3 pc: 0x7fffd2c0 Info: configuration.c:50 configuration_output_handler(): flash 'lpc2000' found at 0x00000000 Info: configuration.c:50 configuration_output_handler(): erased sectors 0 through 26 on flash bank 0 in 0s 599613us Info: configuration.c:50 configuration_output_handler(): wrote 11008 byte from file /drives/sdd1/Incoming/lpc2148_freertos.bin to flash bank 0 at offset 0x00000000 in 0s 863727us (12.446062 kb/s) Warning: arm7_9_common.c:684 arm7_9_assert_reset(): srst resets test logic, too root@jtag:~#
Set the ICSP dip switch to 'off' and hit reset.
- The MCU should now run what you've programmed.
Alternate Setup under Debian Linux (courtesy of Bdale Garbee, thanks Bdale!)
Fetch upstream bits, and populate a Dist/ directory
export MYSRCPATH=/home/bdale/src/cross-tools
export MYPREFIX=/opt/cross
mkdir -p $MYSRCPATH/Dist
cd $MYSRCPATH/Dist
wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.2.1/gcc-4.2.1.tar.bz2
wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.2.1/gcc-4.2.1.tar.bz2.sig
gpg --verify gcc-4.2.1.tar.bz2.sig
wget ftp://ftp.gnu.org/gnu/binutils/binutils-2.17.tar.bz2
wget ftp://ftp.gnu.org/gnu/binutils/binutils-2.17.tar.bz2.sig
gpg --verify binutils-2.17.tar.bz2.sig
wget ftp://ftp.gnu.org/gnu/gdb/gdb-6.6.tar.bz2
wget ftp://ftp.gnu.org/gnu/gdb/gdb-6.6.tar.bz2.sig
gpg --verify gdb-6.6.tar.bz2.sig
wget ftp://sources.redhat.com/pub/newlib/newlib-1.15.0.tar.gz
wget http://www.gnuarm.com/t-arm-elf
Unpack upstream bits, and prepare build environment. Resurrecting the "one-tree" script would make this more efficient, but compile cycles are cheap enough that it's probably not worth worrying about...
cd $MYSRCPATH
tar xvjf Dist/binutils-2.17.tar.bz2
tar xvjf Dist/gcc-4.2.1.tar.bz2
tar xvjf Dist/gdb-6.6.tar.bz2
tar xvzf Dist/newlib-1.15.0.tar.gz
cp Dist/t-arm-elf gcc-4.2.1/gcc/config/arm/t-arm-elf
Resolve build dependencies (incomplete)
sudo apt-get install texinfo libexpat1 libexpat1-dev
Build it all...
mkdir -p $MYSRCPATH/target/arm-elf/binutils
cd $MYSRCPATH/target/arm-elf/binutils
../../../binutils-2.17/configure \
--target=arm-elf --prefix=$MYPREFIX \
--enable-interwork --enable-multilib --with-float=soft
make all
sudo make install
export PATH=$PATH:$MYPREFIX/bin
mkdir -p $MYSRCPATH/target/arm-elf/gcc
cd $MYSRCPATH/target/arm-elf/gcc
# following must be run as root to allow dir creation in /opt/cross!
sudo ../../../gcc-4.2.1/configure \
--target=arm-elf --prefix=$MYPREFIX --enable-interwork \
--enable-multilib --with-float=soft \
--enable-languages="c,c++" --with-newlib \
--with-headers=../../../newlib-1.15.0/newlib/libc/include
make all-gcc
sudo make install-gcc
mkdir -p $MYSRCPATH/target/arm-elf/newlib
cd $MYSRCPATH/target/arm-elf/newlib
../../../newlib-1.15.0/configure --target=arm-elf --prefix=$MYPREFIX \
--enable-interwork --enable-multilib --with-float=soft
make all
# pass PATH into sudo environment so /opt/cross/bin is included
sudo env PATH=$PATH make install
cd $MYSRCPATH/target/arm-elf/gcc
make all
sudo make install
mkdir -p $MYSRCPATH/target/arm-elf/gdb
cd $MYSRCPATH/target/arm-elf/gdb
../../../gdb-6.6/configure --target=arm-elf --prefix=$MYPREFIX \
--enable-interwork --enable-multilib --with-float=soft
make all
sudo make install
Get the Olimex USB jtag dongle working with the Debian openocd package
mkdir -p $MYSRCPATH/jtag
cd $MYSRCPATH/jtag
sudo apt-get install openocd
# create lpc2xxx_armusbocd.cfg containing content found below, which
# was copied from somewhere I neglected to make note of, and may not
# be *entirely* correct for this target yet!
# power up target board, *then* the Olimex USB jtag widget, then run:
sudo openocd -f ./lpc2xxx_armusbocd.cfg
telnet localhost 4444
poll
halt
poll
Take gdb for a quick test drive
cd $MYSRCPATH/jtag
# create init.gdb file containing
target remote localhost:3333
# monitor arm7_9 sw_bkpts enable
monitor poll
arm-elf-gdb --command init.gdb
info registers
Setup on Windows 2K/XP
First, install the Olimex ARM-USB-OCD drivers and connect to the LPC2148.
- You can install the 2006 drivers off the Olimex CD, but we're going to recommend you grab the 2007 drivers from the web. It's actually attached below, but it might not be the absolute latest version - for that, see: http://openocd.berlios.de/web/
- After you install the drivers, plug in the ARM-USB-OCD. Windows will then freak out and ask you a bzillion times for drivers. This is normal. Keep pointing the new hardware wizard to:
C:\Program Files\openocd-2007re141\driver\arm_usb_ocd
- Overwrite the
lpc2xxx_armusbocd.cfg
file inC:\Program Files\openocd-2007re141\bin\configs\
with the one that Dave reworked for us (see below!). - Once this stuff is running, it's helpful to make sure that you can communicate with the LPC2148 via OpenOCD. Plug in the hardware (make sure you've read the proper order in which to do this), then in the
bin
directory of the openocd folder run./openocd-ftd2xx.exe -fconfigs/lpc2xxx_armusbocd.cfg
and you should see something like the following. If you don't see something similar, something isn't working. BASH-3.00$ ./openocd-ftd2xx.exe -fconfigs/lpc2xxxarmusbocd.cfg Info: openocd.c:86 main(): Open On-Chip Debugger (2007-04-16 19:30 CEST) Info: configuration.c:50 configurationoutputhandler(): Command swbkpts not found Warning: arm79common.c:685 arm79assertreset(): srst resets test logic, too
- After you install the drivers, plug in the ARM-USB-OCD. Windows will then freak out and ask you a bzillion times for drivers. This is normal. Keep pointing the new hardware wizard to:
- Next, type
telnet localhost 4444
to telnet to port 4444 and type "flash banks" and/or "poll", and you should see something like this (yours may look different): Open On-Chip Debugger
flash banks #0: lpc2000 at 0x00000000, size 0x0007d000, buswidth 0, chipwidth 0 poll target state: halted target halted in ARM state due to debug request, current mode: Undefined cpsr: 0x800000db pc: 0x00000034
- Assuming you see something like this, then you have OpenOCD communicating with the programmer, which is communicating with the MCU. That's good!
Next, let's try programming an already compiled program which will blink the LEDs on the board!
- Grab the
oocd_flash_lpc2148.script
from below and put it in thescripts
directory in the openocd folder. - Switch the binary that the script points to in the script file (and don't forget to switch it back if you do freertos stuff later!): #flash write 0 scripts/lpc2148_freertos.bin 0x0 flash write 0 scripts/main.bin 0x0
- Download http://www.olimex.com/dev/soft/arm/projects_eclipse_web.rar.
- Extract
main.bin
. - Edit
config/lpc2xxx_armusbocd.cfg
and uncomment thetarget_script 0 reset scripts/oocd_flash_lpc2148.script
line. - Startup (or restart) openOCD like above.
- In another terminal, startup OpenOCD (
telnet localhost 4444
) and typehalt
. In the OpenOCD terminal, you should see some stuff saying that it's erasing the flash and re-programming it. You should not see the word "error" :) - Switch the DIP switch pin 1 to off (which is away from the 'dash' on the case) and hit the reset button.
- The MCU should reset and start blinking the lights!!!!! OMG!! OMG!!!111!
OK, you're ready to start compiling.
- You'll need to the GNUARM tools for Windows/Cygwin. You can get that from http://www.gnuarm.org/ or you can grab it from the ARM-USB-OCD CD.
- Install that and restart all your terminals so the path updates.
- Download FreeRTOS (attached to this page, see above) and unzip it it.
- Edit the Makefile and add ' $(OBJCOPY) $(PROJECT).elf -O binary $(PROJECT).bin' right below (mind the TAB!)
$(OBJCOPY) $(PROJECT).elf -O ihex $(PROJECT).hex
around line 93 of the makefile. This will make a .BIN out of the .HEX. - Also, while you're at it, fix a Makefile bug that they left for us by changing
PROJECT=lpc4148_freertos
toPROJECT=lpc2148_freertos
. :) - Now switch the binary that the config script points to in the script file:
flash write 0 path/to/lpc2148_freertos.bin 0x0
- Go ahead and switch the JTAG switch back to 'ON' on the DIP switch and hit reset.
- In another terminal, startup OpenOCD (
telnet localhost 4444
) and typehalt
. In the OpenOCD terminal, you should see some stuff saying that it's erasing the flash and re-programming it. You should not see the word "error" :) - Switch the DIP switch pin 1 to off (which is away from the 'dash' on the case) and hit the reset button.
- The MCU should reset and start blinking the lights!!!!! Again, "OMG!! OMG!!!111!".
Final notes:
- One oddity about FreeRTOS on these boards is that it seems to disable the JTAG debugging interface while FreeRTOS is executing. In particular, while FreeRTOS is running, when you start OpenOCD, it gets a JTAG communication failure. I found that if you un plug power, set the ICSP dip swich #1 to on, plug in power again the re-program and turn off the dip switch again it will work. This is caused by the CPU going into low power/sleep mode in the FreeRTOS idle loop. You can stop that from happening by commenting out that line of code in the idle call.
Setting up Eclipse + GDB (initial instructions, to be revised and elaborated on)
Install Necessary eclipse Gallaleo/Europa/v3.2 plugins:
Zylin Plugin: Install the Zylin plugin, using the eclipse software update functionality, per instructions given here: http://opensource.zylin.com/embeddedcdt.html
- startup eclipse, make sure it's version Gallaleo/v3.2/Europa
- create FreeRTOS eclipse project
- new project
- choose C++ Project
- choose "Makefile Project", and "--other toolchain--"
- select the directory with the FreeRTOS source code (top part of the prompt)
- goto project menu, make sure build automatically is unchecked
select properties on newly created project
- select C/C++ build
- select "Discovery options"
- Find compiler invocation command and change it to arm-elf-gcc
- got to settings section
- check "GNU Elf Parser"
to setup a debug config
- Goto debug and open debug dialog
- double click Embedded debug (Native)
- select elf file of program you want to debug
- goto debugger tab, remove .gdbinit reference
- replace debugger (gdb) with arm-elf-gdb
- goto commands tab and paste in the following:
SPECIAL NOTE: the following command list includes line breaks and underscores that markdown may or may not display correctly. Click on "Edit" at the top of this page, and view the source for this page, then copy and paste the following commands - with the line breaks - into the commands tab of the open debug dialog. Hint: if you see eleven lines of code here, and not one giant paragraph, and can verify that the "softresethalt" includes the underscores, then you can just copy and paste this code as-is into the commands tab.
For newer versions of openocd
target extended-remote localhost:3333
monitor reset
monitor sleep 500
monitor poll
monitor soft_reset_halt
monitor gdb_breakpoint_override enable
monitor mww 0xE01FC040 0x0001
monitor mdw 0xE01FC040
break main
load
continue
For older versions of openocd
target extended-remote localhost:3333
monitor reset
monitor sleep 500
monitor poll
monitor soft_reset_halt
monitor arm7_9 force_hw_bkpts enable
monitor mww 0xE01FC040 0x0001
monitor mdw 0xE01FC040
break main
load
continue
Hit the "Debug" button, making sure that openOCD is already running in the background.
Tested with release 260 of OpenOCD. Proably wont work with pre r189 releases.
ARM-USB-OCD Configuration File: lpc2xxx_armusbocd.cfg
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003
jtag_speed 3
#use combined on interfaces or targets that can't set TRST/SRST separately
#reset_config trst_and_srst separate
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
#ft2232_latency 10
#target configuration
daemon_startup reset
#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
#target arm7tdmi little run_and_init 0 arm7tdmi-s_r4
target arm7tdmi little run_and_init 0
run_and_halt_time 0 30
#target_script 0 reset oocd_flash_lpc2148.script
working_area 0 0x40000000 0x80000 nobackup
#flash configuration
flash bank lpc2000 0x0 0x7D000 0 0 0 lpc2000_v2 14765 calc_checksum
#arm7_9 swbkpts enable
# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
Tested with release 260 of OpenOCD. Proably wont work with pre r189 releases.
ARM-USB OCD FLashing Script: oocd_flash_lpc2148.script
#
# The following commands will be executed on
# reset (because of run_and_init in the config-file)
# - wait for target halt
# - erase memory
# - flash content of file main.bin into target-memory
# - shutdown openocd
#
# created by Martin Thomas
# http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects
# based on information from Dominic Rath
#
halt
arm7_9 dcc_downloads enable
wait_halt
sleep 10
poll
mdh 0x0 100
flash probe 0
# erase first bank only:
flash erase 0 0 26
mdh 0x0 100
flash write 0 scripts/lpc2148_freertos.bin 0x0
#flash write 0 scripts/main.bin 0x0
mdh 0x0 100
reset run
sleep 10
#shutdown
Tested with pre release-188 of openOCD - proably won't work with r189 or later
ARM-USB-OCD Configuration File: lpc2xxx_armusbocd.cfg
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003
jtag_speed 3
#use combined on interfaces or targets that can't set TRST/SRST separately
#reset_config trst_and_srst separate
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 <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little run_and_init 0 arm7tdmi-s_r4
run_and_halt_time 0 30
#target_script 0 reset scripts/oocd_flash_lpc2148.script
working_area 0 0x40000000 0x40000 nobackup
#flash configuration
flash bank lpc2000 0x0 0x7D000 0 0 lpc2000_v2 0 14765 calc_checksum
arm7_9 swbkpts enable
# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
Tested with pre release-188 of openOCD - proably won't work with r189 or later
ARM-USB OCD FLashing Script: oocd_flash_lpc2148.script
#
# The following commands will be executed on
# reset (because of run_and_init in the config-file)
# - wait for target halt
# - erase memory
# - flash content of file main.bin into target-memory
# - shutdown openocd
#
# created by Martin Thomas
# http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects
# based on information from Dominic Rath
#
arm7_9 dcc_downloads enable
wait_halt
sleep 10
poll
flash probe 0
# erase first bank only:
flash erase 0 0 26
flash write 0 scripts/lpc2148_freertos.bin 0x0
#flash write 0 scripts/main.bin 0x0
reset run
sleep 10
shutdown
Attachments: