Make

Guest #1171787
Rate this post
useful
not useful
Randall Swaving wrote:
> How can I start lpc21isp from make?
> Thnak you.

Examples how this can be configured are available in most (all) of the
Makefiles from the WinARM-Examples collection for LPC2xxx available in
examples-directory of the WinARM distribution-package or at
http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/index.html

(1)
Somewhere in a Makefile you can add some configuration-options as
"variables":

#
------------------------------------------------------------------------ 
---
# Flash-Programming support using lpc21isp by Martin Maurer
# only for Philips LPC and Analog ADuC ARMs
#
# Settings and variables:
LPC21ISP = lpc21isp
LPC21ISP_PORT = com1
LPC21ISP_BAUD = 38400
LPC21ISP_XTAL = 12000
LPC21ISP_FLASHFILE = $(TARGET).hex
# other options:
# * verbose output: -debug
# * enter bootloader via RS232 DTR/RTS (only if hardware supports this
#   feature - see Philips AppNote): -control
LPC21ISP_OPTIONS = -control
#LPC21ISP_OPTIONS += -debug
#
------------------------------------------------------------------------ 
---

(2)
Than add a program target to your makefile:

program: $(TARGET).$(IMGEXT)
--->$(LPC21ISP) $(LPC21ISP_OPTIONS) $(LPC21ISP_FLASHFILE)
$(LPC21ISP_PORT) $(LPC21ISP_BAUD) $(LPC21ISP_XTAL)

"--->" to be replaced by a tabulator. All $(LPC21ISP_*) in one line.

(3)
With this entries a make program will start lpc21isp with the given
parameters

Hope this helps,
Martin Thomas

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now