32 lines
1020 B
Python
32 lines
1020 B
Python
def will_connect(board):
|
|
# Use "cortex_m" as target, remove the following default regions:
|
|
|
|
old_region = target.memory_map.get_first_matching_region(name="Code")
|
|
target.memory_map.remove_region(old_region)
|
|
|
|
old_region = target.memory_map.get_first_matching_region(name="SRAM")
|
|
target.memory_map.remove_region(old_region)
|
|
|
|
old_region = target.memory_map.get_first_matching_region(name="RAM1")
|
|
target.memory_map.remove_region(old_region)
|
|
|
|
old_region = target.memory_map.get_first_matching_region(name="RAM2")
|
|
target.memory_map.remove_region(old_region)
|
|
|
|
flash = FlashRegion(
|
|
name="FLASH",
|
|
start=0x01000000,
|
|
length=0x00040000,
|
|
are_erased_sectors_readable=False, # Never seen that usage for something other than LPC5500 ...
|
|
flm="SDK/utilities/N32WB03x.FLM"
|
|
)
|
|
|
|
ram = RamRegion(
|
|
name="SRAM",
|
|
start=0x20000000,
|
|
length=0x0000C000
|
|
)
|
|
|
|
target.memory_map.add_region(ram)
|
|
target.memory_map.add_region(flash)
|