lpcxpresso flash debug tutorial(1)

Upload: chillkroete123

Post on 10-Feb-2018

236 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/22/2019 LPCXPresso Flash Debug Tutorial(1)

    1/11

    LPCXpresso Flash/Debug Tutorial

    Hardware required

    1) NXP LPC-Link board included with any LPCXPRESSO Board (or !"Euro#) ro$ E$bedded %rti#t#

    #ee htt&'wwwe$beddedarti#t#co$&roduct#l&c*&re##o+o #e&arate the LPC-L,N #ide and the tar.et #ide (re/uired to u#e the debu..er 0+%S23) on an

    other board)4 #ee docu$ent'

    htt&'wwwe$beddedarti#t#co$#ite#deaultile#doc#5ow+oCreate%nLPC-L,N&d

    +he #u..e#ted LPCX&re##o board# are LPC116174 LPC1!!8 and LPC189: which ;u#t need the u#e o

    de#olderin. braid to re$o** board in thi# tutorial , will u#e the 5ackR= board called 0ellyBean de#i.ned by ?ichael

    O##$ann (thank# or thi# a$a@in. board A-)

    =or thi# tutorial 5ackR= 0ellyBean board i# u#ed and e*a$&le u#ed i# $iniblink ba#ed on it5ub

    htt'.ithubco$$o##$annlibo&enc$>tree$a#tere*a$&le#l&c7>**hackr-;ellybean$iniblink?ain it5ub i# htt'.ithubco$$o##$annlibo&enc$>

    Nota' Pin1 i# Red Pin on the 1"-&in $ini 0+% cable

    Nota , bou.ht the $ini 0+% cable at E$bedded %rti#t# here'

    htt&'wwwe$beddedarti#t#co$&roduct#accaccidc1"&h&

    Software required

    LPCX&re##o build !:! (#i@e !1>7 ?B)'

    Re/uire# an account (Lo.inPa##word)

    Windows version:

    htt&'l&c*&re##ocode-red-techco$LPCX&re##o#y#te$ile#LPCX&re##o7!>!:!e*e

    or

    t&'l&c*&re##ocode-red-techco$LPCX&re##o7!>!:!e*e

    Linux version:

    htt&'l&c*&re##ocode-red-techco$LPCX&re##o#y#te$ile#,n#tallerLPCX&re##o7!>!Linu*-

    *D9tar.@

    http://www.embeddedartists.com/products/lpcxpressohttp://www.embeddedartists.com/sites/default/files/docs/HowToCreateAnLPC-LINK.pdfhttps://github.com/mossmann/libopencm3/tree/master/examples/lpc43xx/hackrf-jellybean/miniblinkhttps://github.com/mossmann/libopencm3http://www.embeddedartists.com/products/acc/acc_idc_10.phphttp://lpcxpresso.code-red-tech.com/LPCXpresso/system/files/LPCXpresso_4.2.3_292.exeftp://lpcxpresso.code-red-tech.com/LPCXpresso_4.2.3_292.exehttp://lpcxpresso.code-red-tech.com/LPCXpresso/system/files/Installer_LPCXpresso_4.2.3_255_Linux-x86.tar_.gzhttp://lpcxpresso.code-red-tech.com/LPCXpresso/system/files/Installer_LPCXpresso_4.2.3_255_Linux-x86.tar_.gzhttp://www.embeddedartists.com/sites/default/files/docs/HowToCreateAnLPC-LINK.pdfhttps://github.com/mossmann/libopencm3/tree/master/examples/lpc43xx/hackrf-jellybean/miniblinkhttps://github.com/mossmann/libopencm3http://www.embeddedartists.com/products/acc/acc_idc_10.phphttp://lpcxpresso.code-red-tech.com/LPCXpresso/system/files/LPCXpresso_4.2.3_292.exeftp://lpcxpresso.code-red-tech.com/LPCXpresso_4.2.3_292.exehttp://lpcxpresso.code-red-tech.com/LPCXpresso/system/files/Installer_LPCXpresso_4.2.3_255_Linux-x86.tar_.gzhttp://lpcxpresso.code-red-tech.com/LPCXpresso/system/files/Installer_LPCXpresso_4.2.3_255_Linux-x86.tar_.gzhttp://www.embeddedartists.com/products/lpcxpresso
  • 7/22/2019 LPCXPresso Flash Debug Tutorial(1)

    2/11

    Nota' +utorial i# done with 2indow# XP SP> and LPCX&re##o build !:! or window#

    Starting LPCXpresso IDE

    Beore #tartin. LPCX&re##o you #hould re.i#ter it (re.i#tration code #hall be acti

  • 7/22/2019 LPCXPresso Flash Debug Tutorial(1)

    3/11

    Create a project

    Choo#e ?enu =ile-New-Pro;ect

    Select CCFF G LPCX&re##o C &ro;ect and click Next

    Select NXP LPC7>"" - C Pro;ect (Corte* ?7) and click Next

  • 7/22/2019 LPCXPresso Flash Debug Tutorial(1)

    4/11

    Choo#e &ro;ect Na$e in the e*a$&le hackr;ellybean and click Next

    ,n +ar.et Selection choo#e LPC7>>" (or 0ellyBean) and click Next

  • 7/22/2019 LPCXPresso Flash Debug Tutorial(1)

    5/11

    =or C?S,S 3SP or Library ;u#t choo#e None or both and click Next

    0u#t chan.e C 3ialect to .nu:: or what you &reer and click Finish

    % ba#ic &ro;ect i# now created

    Hou can i$&ort e*i#tin. #ource &ro;ect u#in. link'

  • 7/22/2019 LPCXPresso Flash Debug Tutorial(1)

    6/11

    2ith $ou#e ri.ht click on &ro;ect4 choo#e New - =older

    ,n =older na$e' Enter the ull &ath in the e*a$&le hackr-;ellybean

    +hen click on %d

  • 7/22/2019 LPCXPresso Flash Debug Tutorial(1)

    7/11

    Flashing ".bin" or ".elf" in SPIFI flash memory

    2ith $ou#e click on &ro;ect hackr-;ellybean &re+itan?3Je*a$&le#Jl&c7>**Jhackr-;ellybeanJ$iniblinkJ$iniblinkbin

    >) Choo#e ba#e addre##' "*17""""""Click O to #tart

    Pro.re## #hall be di#&layed and all di#a&&ear when it i# ini#hed

    Nota' =la#hin. with 0+% work ine too and i# a bit a#ter than deault S23 $ode

  • 7/22/2019 LPCXPresso Flash Debug Tutorial(1)

    8/11

    Debugger configuration

    2ith $ou#e Ri.ht click on &ro;ect (or %lt Enter)4 choo#e Pro&ertie#

    Choo#e ?C6 #ettin.# and Edit to add =la#h $e$ory at location "*" with #i@e "*1""""" (1?B)

    Click on %&&ly and O

    +hi# #te& i# $andatory to debu. code e*ecutin. ro$ SP,=, la#h4 el#e debu..er will alway# ail to #et

    break&oint to debu. code

    2ith ollowin. error'

  • 7/22/2019 LPCXPresso Flash Debug Tutorial(1)

    9/11

    Now coni.ure the debu..er

    2ith $ou#e Ri.ht click on &ro;ect4 choo#e 3ebu. %# - 3ebu. coni.uration#

    3ouble click on CCFF ?C6 %&&lication to auto$atically create hackr;ellybean 3ebu. Entry

    Now chan.e de CCFF %&&lication to $iniblinkel u#in. ull &ath

  • 7/22/2019 LPCXPresso Flash Debug Tutorial(1)

    10/11

    ,n the e*a$&le ='JSKNJlibo&enc$>+itan?3Je*a$&le#Jl&c7>**Jhackr-;ellybeanJ$iniblinkel

    3i#able the auto build too

    Coni.ure the debu..er'

    1) Hou can chan.e ISto& on #tartu& at'I by re#ethandler or u#in. an addre## like "*""""1!>7 i you

    want to #to& e*ecution beore the deault $ain code (it not alway# #to& to debu. it ro$ #tart you need to

    la#h it and then debu.)

    !) Chan.e debu..er o&tion# to u#e NXP LPC7>** (S23) becau#e 0+% ne

  • 7/22/2019 LPCXPresso Flash Debug Tutorial(1)

    11/11

    Just click on Pause "||" to stop it

    Now !ou can do step b! step or check assebl! code or core register #in debug view or b! adding

    the window$

    %ou can also view Peripherals with details #b! de&ault in debug view$

    Warning 'iew on ()*+ ((*, or ((*- peripheral trig an error or even crash #&or ((*,.-$

    crt/eu/lpc,0/12/nxpexe

    3&ter the crash o& crt/eu/lpc,0/12/nxpexe !ou need to kill the debug session+ power o&& the

    LP(12xx board+ power on LP(12xx board and restart debug session+ else all is crashed