mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 01:18:28 +00:00
add mem constants to debug module
This commit is contained in:
parent
fbfd9d4b61
commit
d4d8729568
@ -27,7 +27,7 @@ STATIC mp_obj_t mod_TrezorDebug_Debug_make_new(const mp_obj_type_t *type, size_t
|
||||
return MP_OBJ_FROM_PTR(o);
|
||||
}
|
||||
|
||||
/// def trezor.utils.memaccess(address: int, length: int) -> bytes
|
||||
/// def trezor.debug.memaccess(address: int, length: int) -> bytes
|
||||
/// '''
|
||||
/// Creates a bytes object that can be used to access certain memory location.
|
||||
/// '''
|
||||
|
@ -5,5 +5,15 @@ from TrezorDebug import Debug
|
||||
|
||||
_utils = Debug()
|
||||
|
||||
MEM_FLASH_BASE = const(0x08000000)
|
||||
MEM_FLASH_SIZE = const(1024 * 1024)
|
||||
MEM_FLASH_END = const(MEM_FLASH_BASE + MEM_FLASH_SIZE - 1)
|
||||
MEM_CCM_BASE = const(0x10000000)
|
||||
MEM_CCM_SIZE = const(64 * 1024)
|
||||
MEM_CCM_END = const(MEM_CCM_BASE + MEM_CCM_SIZE - 1)
|
||||
MEM_SRAM_BASE = const(0x20000000)
|
||||
MEM_SRAM_SIZE = const(128 * 1024)
|
||||
MEM_SRAM_END = const(MEM_SRAM_BASE + MEM_SRAM_SIZE - 1)
|
||||
|
||||
def memaccess(address, length):
|
||||
return _utils.memaccess(address, length)
|
||||
|
Loading…
Reference in New Issue
Block a user