Skip to content

Commit

Permalink
pyedbglib release 2.24.2.18 on PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
Microchip Technology committed Mar 22, 2024
1 parent 6e7d473 commit 9bbeceb
Show file tree
Hide file tree
Showing 31 changed files with 386 additions and 155 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [2.24.2] - March 2024

### Added
- DSG-7090 Added support for converting Intel(R) Hex to UF2 format

### Changed
- DSG-6539 Migrated pyedbglib to new project configuration format

## [2.23.0] - September 2023

### Added
Expand Down
4 changes: 2 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2023 Microchip Technology Inc. and its subsidiaries.
Copyright (c) 2024 Microchip Technology Inc. and its subsidiaries.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE.
6 changes: 0 additions & 6 deletions MANIFEST.in

This file was deleted.

4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ Browse source code on [github](https://github.com/microchip-pic-avr-tools/pyedbg

Read API documentation on [github](https://microchip-pic-avr-tools.github.io/pyedbglib)

Read the changelog on [github](https://github.com/microchip-pic-avr-tools/pyedbglib/blob/main/CHANGELOG.md)

## Usage
pyedbglib is a library which can be used by Python applications to communicate with Microchip microcontrollers via Microchip CMSIS-DAP based debuggers.

Expand All @@ -39,7 +37,7 @@ Example usage of pyedbglib to read debugger firmware version and target voltage
"""
from pyedbglib.hidtransport.hidtransportfactory import hid_transport
from pyedbglib.protocols.housekeepingprotocol import Jtagice3HousekeepingProtocol
from pyedbglib.version import VERSION as pyedbglib_version
from pyedbglib import __version__ as pyedbglib_version

# Report library version
print("pyedbglib version {}".format(pyedbglib_version))
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# -- Project information -----------------------------------------------------

project = 'pyedbglib'
copyright = '2021, Microchip Technology Inc'
copyright = '2024, Microchip Technology Inc'
author = 'Microchip Technology Inc'


Expand Down
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: dc4a20f2ac9c16b323f6d26c517986b8
config: 0d2883cadca8da09782e7a229c62074d
tags: 645f666f9bcd5a90fca523b33c5a78b7
2 changes: 1 addition & 1 deletion docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -2218,7 +2218,7 @@ <h2 id="W">W</h2>
</div>
<div class="footer-wrapper">
<div class="footer" role="contentinfo">
© Copyright 2021, Microchip Technology Inc
© Copyright 2024, Microchip Technology Inc
</div>
</div>
</body>
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h2>Overview<a class="headerlink" href="#overview" title="Permalink to this head
<li><p>install using pip from pypi: <a class="reference external" href="https://pypi.org/project/pyedbglib">https://pypi.org/project/pyedbglib</a></p></li>
<li><p>browse source code on github: <a class="reference external" href="https://github.com/microchip-pic-avr-tools/pyedbglib">https://github.com/microchip-pic-avr-tools/pyedbglib</a></p></li>
<li><p>read API documentation on github: <a class="reference external" href="https://microchip-pic-avr-tools.github.io/pyedbglib">https://microchip-pic-avr-tools.github.io/pyedbglib</a></p></li>
<li><p>read the changelog on github: <a class="reference external" href="https://github.com/microchip-pic-avr-tools/pyedbglib/blob/main/CHANGELOG.md">https://github.com/microchip-pic-avr-tools/pyedbglib/blob/main/CHANGELOG.md</a></p></li>
<li><p>read the changelog on pypi: <a class="reference external" href="https://pypi.org/project/pyedbglib">https://pypi.org/project/pyedbglib</a></p></li>
</ul>
</dd>
</dl>
Expand Down Expand Up @@ -331,7 +331,7 @@ <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Pe
</div>
<div class="footer-wrapper">
<div class="footer" role="contentinfo">
© Copyright 2021, Microchip Technology Inc
© Copyright 2024, Microchip Technology Inc
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/py-modindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ <h1>Python Module Index</h1>
</div>
<div class="footer-wrapper">
<div class="footer" role="contentinfo">
© Copyright 2021, Microchip Technology Inc
© Copyright 2024, Microchip Technology Inc
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/pyedbglib.hidtransport.html
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ <h1>pyedbglib.hidtransport<a class="headerlink" href="#pyedbglib-hidtransport" t
</div>
<div class="footer-wrapper">
<div class="footer" role="contentinfo">
© Copyright 2021, Microchip Technology Inc
© Copyright 2024, Microchip Technology Inc
</div>
</div>
</body>
Expand Down
4 changes: 2 additions & 2 deletions docs/pyedbglib.html
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ <h3>Overview<a class="headerlink" href="#overview" title="Permalink to this head
<li><p>install using pip from pypi: <a class="reference external" href="https://pypi.org/project/pyedbglib">https://pypi.org/project/pyedbglib</a></p></li>
<li><p>browse source code on github: <a class="reference external" href="https://github.com/microchip-pic-avr-tools/pyedbglib">https://github.com/microchip-pic-avr-tools/pyedbglib</a></p></li>
<li><p>read API documentation on github: <a class="reference external" href="https://microchip-pic-avr-tools.github.io/pyedbglib">https://microchip-pic-avr-tools.github.io/pyedbglib</a></p></li>
<li><p>read the changelog on github: <a class="reference external" href="https://github.com/microchip-pic-avr-tools/pyedbglib/blob/main/CHANGELOG.md">https://github.com/microchip-pic-avr-tools/pyedbglib/blob/main/CHANGELOG.md</a></p></li>
<li><p>read the changelog on pypi: <a class="reference external" href="https://pypi.org/project/pyedbglib">https://pypi.org/project/pyedbglib</a></p></li>
</ul>
</dd>
</dl>
Expand Down Expand Up @@ -1125,7 +1125,7 @@ <h3>Library usage<a class="headerlink" href="#library-usage" title="Permalink to
</div>
<div class="footer-wrapper">
<div class="footer" role="contentinfo">
© Copyright 2021, Microchip Technology Inc
© Copyright 2024, Microchip Technology Inc
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/pyedbglib.mplabtransport.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ <h1>pyedbglib.mplabtransport<a class="headerlink" href="#pyedbglib-mplabtranspor
</div>
<div class="footer-wrapper">
<div class="footer" role="contentinfo">
© Copyright 2021, Microchip Technology Inc
© Copyright 2024, Microchip Technology Inc
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/pyedbglib.primitive.html
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ <h1>pyedbglib.primitive<a class="headerlink" href="#pyedbglib-primitive" title="
</div>
<div class="footer-wrapper">
<div class="footer" role="contentinfo">
© Copyright 2021, Microchip Technology Inc
© Copyright 2024, Microchip Technology Inc
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/pyedbglib.protocols.html
Original file line number Diff line number Diff line change
Expand Up @@ -5472,7 +5472,7 @@ <h1>pyedbglib.protocols<a class="headerlink" href="#pyedbglib-protocols" title="
</div>
<div class="footer-wrapper">
<div class="footer" role="contentinfo">
© Copyright 2021, Microchip Technology Inc
© Copyright 2024, Microchip Technology Inc
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/pyedbglib.serialport.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ <h1>pyedbglib.serialport<a class="headerlink" href="#pyedbglib-serialport" title
</div>
<div class="footer-wrapper">
<div class="footer" role="contentinfo">
© Copyright 2021, Microchip Technology Inc
© Copyright 2024, Microchip Technology Inc
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/pyedbglib.util.html
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ <h1>pyedbglib.util<a class="headerlink" href="#pyedbglib-util" title="Permalink
</div>
<div class="footer-wrapper">
<div class="footer" role="contentinfo">
© Copyright 2021, Microchip Technology Inc
© Copyright 2024, Microchip Technology Inc
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ <h1 id="search-documentation">Search</h1>
</div>
<div class="footer-wrapper">
<div class="footer" role="contentinfo">
© Copyright 2021, Microchip Technology Inc
© Copyright 2024, Microchip Technology Inc
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion pyedbglib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* install using pip from pypi: https://pypi.org/project/pyedbglib
* browse source code on github: https://github.com/microchip-pic-avr-tools/pyedbglib
* read API documentation on github: https://microchip-pic-avr-tools.github.io/pyedbglib
* read the changelog on github: https://github.com/microchip-pic-avr-tools/pyedbglib/blob/main/CHANGELOG.md
* read the changelog on pypi: https://pypi.org/project/pyedbglib
pyedbglib uses hidapi package with a USB-level driver such as libusb.
Expand Down Expand Up @@ -54,4 +54,13 @@
"""
import logging

# Build number part of version will be replaced by build number from Jenkins.
# For local builds the build number is 0 and the 'snapshot' is added as Local Version Identifier
__version__ = '2.24.2.18'

# The GIT commit ID and build date are generated by Jenkins when building the package
COMMIT_ID = 'dea74271bf83f4a7b5a132aeab20ffbc41270625'
BUILD_DATE = '2024-03-20 08:29:13'

logging.getLogger(__name__).addHandler(logging.NullHandler())
30 changes: 30 additions & 0 deletions pyedbglib/tests/data/atmega4809_flash_gaps_fuses_lockbits.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
:100000000C9450000C9494000C9494000C94940064
:100010000C9494000C9494000C9494000C94940010
:100020000C9494000C9494000C9494000C94940000
:100030000C9494000C9494000C9494000C949400F0
:100040000C9494000C9494000C9494000C949400E0
:100050000C9494000C9494000C9494000C949400D0
:100060000C9494000C9494000C9494000C949400C0
:100070000C9494000C9494000C9494000C949400B0
:100080000C9494000C9494000C9494000C949400A0
:100090000C9494000C9494000C9494000C94940090
:1000A00011241FBECFEFCDBFDFE3DEBFE0EAF0E0FB
:1000B00040E017C0B591A59135912591059107FDB7
:1000C0000CC095918591EF01F92FE82F05900D92C5
:1000D000A217B307D9F7FE0104C01D92A217B307F8
:1000E000E1F7E03AF40731F70E947A000C948900B6
:0400F000F894FFCFB2
:1000F40080E28093A104E7EAF4E020E2208380E038
:0E01040090E0019681153AEF9307D9F7F7CFF7
:10011200EC010E9499000E949800CE010E949A0070
:06012200CE010E949600D0
:040128000C94000033
:04012C000E947800B5
:02013000089530
:0201320008952E
:0201340008952C
:02000004008278
:090000000000020000C40000052C
:02000004008377
:01000000C53A
:00000001FF
Binary file not shown.
34 changes: 34 additions & 0 deletions pyedbglib/tests/data/pic16_flash_eeprom_config.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
:08000000803102288731AB2F8B
:100F56004001AD2FBB2787311930F0000430400126
:100F66008C06F101700871020318B12FF10AB52F32
:100F7600E0278731C2278731EA278731F42F4001DE
:100F86009801990180309A003B309200F03093002E
:100F96007F3094007A307E01CE00F030C3003330CB
:100FA600B800C401B9010530CF00BA01C501D001AE
:100FB6002708C0391738A70008004F019601970186
:100FC600980199019A019B019C019D0108006930D5
:100FD60051018D0040308F0008309100930192013D
:100FE6000800D0304B019F0001309D009C014E014E
:0A0FF6008C1280304B019E000800B1
:020000040001F9
:0800000022110201FF3F010281
:0A000E00EC3FFF3F9F3FFF3FFF3F25
:10E0000011002200330044005500660077008800AC
:10E01000110022003300440055006600770088009C
:10E02000110022003300440055006600770088008C
:10E03000110022003300440055006600770088007C
:10E04000110022003300440055006600770088006C
:10E05000110022003300440055006600770088005C
:10E06000110022003300440055006600770088004C
:10E07000110022003300440055006600770088003C
:10E08000110022003300440055006600770088002C
:10E09000110022003300440055006600770088001C
:10E0A000110022003300440055006600770088000C
:10E0B00011002200330044005500660077008800FC
:10E0C00011002200330044005500660077008800EC
:10E0D00011002200330044005500660077008800DC
:10E0E00011002200330044005500660077008800CC
:10E0F00011002200330044005500660077008800BC
:10E1000011002200330044005500660077008800AB
:10E11000110022003300440055006600770088009B
:00000001FF
Binary file not shown.
45 changes: 45 additions & 0 deletions pyedbglib/tests/test_hex_to_uf2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
"""
Tests covering the hex_to_uf2 module in util
"""

import unittest
import tempfile
from pathlib import Path

from pyedbglib.util.hex_to_uf2 import hex_to_uf2

DATA_FOLDER = Path(__file__).parent.absolute() / 'data'

class TestHexToUf2(unittest.TestCase):
"""Tests for hexfile to UF2 file conversion utility"""

def _convert_hex_to_uf2_and_check(self, hexfile_path, reference_uf2file_path):
"""Convert hexfile to UF2 file and verify against reference file
:param hexfile_path: Path to input hex file
:type hexfile: class:'pathlib.Path'
:param reference_uf2file_path: Path to reference UF2 file
:type uf2file: class:'pathlib.Path'
"""
with tempfile.TemporaryDirectory() as tempdir:
outputfile_path = Path(tempdir) / 'generated.uf2'

hex_to_uf2(hexfile_path, outputfile_path)

with reference_uf2file_path.open('rb') as reference_file:
with outputfile_path.open('rb') as output_file:
reference = reference_file.read()
output = output_file.read()
self.assertEqual(output,
reference,
msg="UF2 mismatch, {} vs {}".format(outputfile_path, reference_uf2file_path))


def test_hex_to_uf2(self):
"""
Test hex to UF2 file conversion using golden sample files
"""
self._convert_hex_to_uf2_and_check(DATA_FOLDER/'atmega4809_flash_gaps_fuses_lockbits.hex',
DATA_FOLDER/'atmega4809_flash_gaps_fuses_lockbits.uf2')
self._convert_hex_to_uf2_and_check(DATA_FOLDER/'pic16_flash_eeprom_config.hex',
DATA_FOLDER/'pic16_flash_eeprom_config.uf2')
Loading

0 comments on commit 9bbeceb

Please sign in to comment.