Пример #1
0
 def __init__(self, has_fpu=True):
     self.run_token = 1
     self.flash_region = memory_map.FlashRegion(start=0,
                                                length=1 * 1024,
                                                blocksize=1024,
                                                name='flash')
     self.ram_region = memory_map.RamRegion(start=0x20000000,
                                            length=1 * 1024,
                                            name='ram')
     self.ram2_region = memory_map.RamRegion(start=0x20000400,
                                             length=1 * 1024,
                                             name='ram2',
                                             is_cacheable=False)
     self.memory_map = memory_map.MemoryMap(self.flash_region,
                                            self.ram_region,
                                            self.ram2_region)
     self.ram = bytearray(1024)
     self.ram2 = bytearray(1024)
     self.flash = bytearray([0xff]) * 1024
     self.regions = [(self.flash_region, self.flash),
                     (self.ram_region, self.ram),
                     (self.ram2_region, self.ram2)]
     self.has_fpu = has_fpu
     self.core_registers = CoreRegistersIndex()
     self.core_registers.add_group(CoreRegisterGroups.M_PROFILE_COMMON +
                                   CoreRegisterGroups.V7M_v8M_ML_ONLY +
                                   CoreRegisterGroups.V8M_SEC_ONLY)
     if has_fpu:
         self.core_registers.add_group(CoreRegisterGroups.VFP_V5)
     self.clear_all_regs()
Пример #2
0
 def __init__(self):
     self.run_token = 1
     self.memory_map = memory_map.MemoryMap(
         memory_map.RamRegion(name="ram",
                              start=0,
                              length=0xf0000000,
                              cacheable=True))
Пример #3
0
 def __init__(self):
     self.run_token = 1
     self.flash_region = memory_map.FlashRegion(start=0, length=1*1024, blocksize=1024, name='flash')
     self.ram_region = memory_map.RamRegion(start=0x20000000, length=1*1024, name='ram')
     self.ram2_region = memory_map.RamRegion(start=0x20000400, length=1*1024, name='ram2', is_cacheable=False)
     self.memory_map = memory_map.MemoryMap(
         self.flash_region,
         self.ram_region,
         self.ram2_region
         )
     self.ram = bytearray(1024)
     self.ram2 = bytearray(1024)
     self.flash = bytearray([0xff]) * 1024
     self.regions = [(self.flash_region, self.flash),
                     (self.ram_region, self.ram),
                     (self.ram2_region, self.ram2)]
     self.has_fpu = True
     self.clear_all_regs()