File: memories.py

package info (click to toggle)
python-mboot 0.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 292 kB
  • sloc: python: 2,055; makefile: 5
file content (44 lines) | stat: -rwxr-xr-x 1,925 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Copyright (c) 2019 Martin Olejar
#
# SPDX-License-Identifier: BSD-3-Clause
# The BSD-3-Clause license for this file can be found in the LICENSE file included with this distribution
# or at https://spdx.org/licenses/BSD-3-Clause.html#licenseText


from easy_enum import Enum


########################################################################################################################
# McuBoot External Memory ID
########################################################################################################################

class ExtMemId(Enum):
    """ McuBoot External Memory Property Tags """

    QUAD_SPI0 = (1, 'QSPI', 'Quad SPI Memory 0')
    IFR0 = (4, 'Nonvolatile information register 0 (only used by SB loader)')
    SEMC_NOR = (8, 'SEMC-NOR', 'SEMC NOR Memory')
    FLEX_SPI_NOR = (9, 'FLEX-SPI-NOR', 'Flex SPI NOR Memory')
    SPIFI_NOR = (10, 'SPIFI-NOR', 'SPIFI NOR Memory')
    FLASH_EXEC_ONLY = (16, 'FLASH-EXEC', 'Execute-Only region on internal Flash')
    SEMC_NAND = (256, 'SEMC-NAND', 'SEMC NAND Memory')
    SPI_NAND = (257, 'SPI-NAND', 'SPI NAND Memory')
    SPI_NOR_EEPROM = (272, 'SPI-MEM', 'SPI NOR/EEPROM Memory')
    I2C_NOR_EEPROM = (273, 'I2C-MEM', 'I2C NOR/EEPROM Memory')
    SD_CARD = (288, 'SD', 'eSD/SD/SDHC/SDXC Memory Card')
    MMC_CARD = (289, 'MMC', 'MMC/eMMC Memory Card')


########################################################################################################################
# McuBoot External Memory Property Tags
########################################################################################################################

class ExtMemPropTags(Enum):
    """ McuBoot External Memory Property Tags """

    INIT_STATUS = 0x00000000
    START_ADDRESS = 0x00000001
    SIZE_IN_KBYTES = 0x00000002
    PAGE_SIZE = 0x00000004
    SECTOR_SIZE = 0x00000008
    BLOCK_SIZE = 0x00000010