Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: blinky_max32630fthr
Cache Class Reference
Public Member Functions | |
| def | cache_file |
| def | pdsc_to_pack |
| def | get_urls |
| def | get_flash_algorthim_binary |
| def | get_svd_file |
| def | index |
| def | aliases |
| def | cache_everything |
| def | cache_descriptors |
| def | cache_descriptor_list |
| def | cache_pack_list |
| def | pdsc_from_cache |
| def | pack_from_cache |
| def | cache_and_parse |
Detailed Description
The Cache object is the only relevant API object at the moment Constructing the Cache object does not imply any caching. A user of the API must explicitly call caching functions. :param silent: A boolean that, when True, significantly reduces the printing of this Object :type silent: bool :param no_timeouts: A boolean that, when True, disables the default connection timeout and low speed timeout for downloading things. :type no_timeouts: bool
Definition at line 53 of file arm_pack_manager/__init__.py.
Member Function Documentation
| def aliases | ( | self ) |
An index of most of the important data in all cached PDSC files.
:Example:
>>> from ArmPackManager import Cache
>>> a = Cache()
>>> a.index["LPC1768"]
{u'algorithm': {u'RAMsize': u'0x0FE0',
u'RAMstart': u'0x10000000',
u'name': u'Flash/LPC_IAP_512.FLM',
u'size': u'0x80000',
u'start': u'0x00000000'},
u'compile': [u'Device/Include/LPC17xx.h', u'LPC175x_6x'],
u'debug': u'SVD/LPC176x5x.svd',
u'pdsc_file': u'http://www.keil.com/pack/Keil.LPC1700_DFP.pdsc',
u'memory': {u'IRAM1': {u'size': u'0x8000', u'start': u'0x10000000'},
u'IRAM2': {u'size': u'0x8000', u'start': u'0x2007C000'},
u'IROM1': {u'size': u'0x80000', u'start': u'0x00000000'}}}
Definition at line 327 of file arm_pack_manager/__init__.py.
| def cache_and_parse | ( | self, | |
| url | |||
| ) |
A low level shortcut that Caches and Parses a PDSC file. :param url: The URL of the PDSC file. :type url: str :return: A parsed representation of the PDSC file. :rtype: BeautifulSoup
Definition at line 428 of file arm_pack_manager/__init__.py.
| def cache_descriptor_list | ( | self, | |
| list | |||
| ) |
Cache a list of PDSC files. :param list: URLs of PDSC files to cache. :type list: [str]
Definition at line 376 of file arm_pack_manager/__init__.py.
| def cache_descriptors | ( | self ) |
Cache every PDSC file known. Generates an index afterwards. .. note:: This process may use 11MB of drive space and take upwards of 1 minute.
Definition at line 365 of file arm_pack_manager/__init__.py.
| def cache_everything | ( | self ) |
Cache every PACK and PDSC file known. Generates an index afterwards. .. note:: This process may use 4GB of drive space and take upwards of 10 minutes to complete.
Definition at line 354 of file arm_pack_manager/__init__.py.
| def cache_file | ( | self, | |
| url | |||
| ) |
Low level interface to caching a single file. :param curl: The user is responsible for providing a curl.Curl object as the curl parameter. :type curl: curl.Curl :param url: The URL to cache. :type url: str :rtype: None
Definition at line 78 of file arm_pack_manager/__init__.py.
| def cache_pack_list | ( | self, | |
| list | |||
| ) |
Cache a list of PACK files, referenced by their PDSC URL :param list: URLs of PDSC files to cache. :type list: [str]
Definition at line 387 of file arm_pack_manager/__init__.py.
| def get_flash_algorthim_binary | ( | self, | |
| device_name | |||
| ) |
Retrieve the flash algorithm file for a particular part. Assumes that both the PDSC and the PACK file associated with that part are in the cache. :param device_name: The exact name of a device :type device_name: str :return: A file-like object that, when read, is the ELF file that describes the flashing algorithm :rtype: ZipExtFile
Definition at line 246 of file arm_pack_manager/__init__.py.
| def get_svd_file | ( | self, | |
| device_name | |||
| ) |
Retrieve the flash algorithm file for a particular part. Assumes that both the PDSC and the PACK file associated with that part are in the cache. :param device_name: The exact name of a device :type device_name: str :return: A file-like object that, when read, is the ELF file that describes the flashing algorithm :rtype: ZipExtFile
Definition at line 259 of file arm_pack_manager/__init__.py.
| def get_urls | ( | self ) |
Extract the URLs of all know PDSC files. Will pull the index from the internet if it is not cached. :return: A list of all PDSC URLs :rtype: [str]
Definition at line 128 of file arm_pack_manager/__init__.py.
| def index | ( | self ) |
An index of most of the important data in all cached PDSC files.
:Example:
>>> from ArmPackManager import Cache
>>> a = Cache()
>>> a.index["LPC1768"]
{u'algorithm': {u'RAMsize': u'0x0FE0',
u'RAMstart': u'0x10000000',
u'name': u'Flash/LPC_IAP_512.FLM',
u'size': u'0x80000',
u'start': u'0x00000000'},
u'compile': [u'Device/Include/LPC17xx.h', u'LPC175x_6x'],
u'debug': u'SVD/LPC176x5x.svd',
u'pdsc_file': u'http://www.keil.com/pack/Keil.LPC1700_DFP.pdsc',
u'memory': {u'IRAM1': {u'size': u'0x8000', u'start': u'0x10000000'},
u'IRAM2': {u'size': u'0x8000', u'start': u'0x2007C000'},
u'IROM1': {u'size': u'0x80000', u'start': u'0x00000000'}}}
Definition at line 300 of file arm_pack_manager/__init__.py.
| def pack_from_cache | ( | self, | |
| url | |||
| ) |
Low level inteface for extracting a PACK file from the cache. Assumes that the file specified is a PACK file and is in the cache. :param url: The URL of a PACK file. :type url: str :return: A parsed representation of the PACK file. :rtype: ZipFile
Definition at line 412 of file arm_pack_manager/__init__.py.
| def pdsc_from_cache | ( | self, | |
| url | |||
| ) |
Low level inteface for extracting a PDSC file from the cache. Assumes that the file specified is a PDSC file and is in the cache. :param url: The URL of a PDSC file. :type url: str :return: A parsed representation of the PDSC file. :rtype: BeautifulSoup
Definition at line 398 of file arm_pack_manager/__init__.py.
| def pdsc_to_pack | ( | self, | |
| url | |||
| ) |
Find the URL of the specified pack file described by a PDSC. The PDSC is assumed to be cached and is looked up in the cache by its URL. :param url: The url used to look up the PDSC. :type url: str :return: The url of the PACK file. :rtype: str
Definition at line 102 of file arm_pack_manager/__init__.py.
Generated on Tue Jul 12 2022 14:21:38 by
1.7.2