]> git.sur5r.net Git - openocd/commitdiff
Make the lpc2xxx generic driver support romless parts
authorAlexandre Pereira da Silva <aletes.xgr@gmail.com>
Wed, 27 Apr 2011 12:19:55 +0000 (09:19 -0300)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Tue, 3 May 2011 20:06:57 +0000 (22:06 +0200)
tcl/target/lpc2xxx.cfg

index 6a73638118de8f4719bd0600002d85d6fbc9d9e9..e9e8e6dced3d69f9420136854ba7282b20dec882 100644 (file)
@@ -29,9 +29,11 @@ proc setup_lpc2xxx {chip_name cputapids flash_size flash_variant workarea_size c
        
        $_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size $workarea_size -work-area-backup 0
        
-       # flash bank <name> lpc2000 <base> <size> 0 0 <target#> <variant> <clock> [calc checksum]
-       set _FLASHNAME $chip_name.flash
-       flash bank $_FLASHNAME lpc2000 0x0 $flash_size 0 0 $_TARGETNAME $flash_variant $core_freq_khz calc_checksum
+       if { $flash_size > 0 } {
+               # flash bank <name> lpc2000 <base> <size> 0 0 <target#> <variant> <clock> [calc checksum]
+               set _FLASHNAME $chip_name.flash
+               flash bank $_FLASHNAME lpc2000 0x0 $flash_size 0 0 $_TARGETNAME $flash_variant $core_freq_khz calc_checksum
+       }
 }
 
 proc init_targets {} {