1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

add mem constants to debug module

This commit is contained in:
Pavol Rusnak 2016-06-22 15:29:25 +02:00
parent fbfd9d4b61
commit d4d8729568
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 11 additions and 1 deletions

View File

@ -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.
/// '''

View File

@ -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)