Skip to content

Conversation

@andrewpono
Copy link
Contributor

@andrewpono andrewpono commented Sep 13, 2023

Description

  • Add memory start address extraction from the source hex file to use it in the target dfu file. Prior to this, memory start address was always 0.
  • Handle non-contiguous memory map. Hex file may contain multiple memory segments defined either by Extended Address record, a jump in the data record address, or both.

Motivation and Context

  • Feature enhancement.

How Has This Been Tested?

Tested with multiple hex files targeting STM32 platform. These are all non-zero start address and contiguous memory map with multiple Extended Linear Address records.
Non-contiguous memory map handling tested with XC8 compiler output targeting PIC platform.

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Unit Tests (add new Unit Test(s) or improved existing one(s), has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist:

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).
  • I have added new tests to cover my changes.

andrewpono and others added 3 commits September 11, 2023 11:43
Updated unit test to reflect the changes in the end of file line handling. Data should not be null, but a 0-length array. Field type was not checked.
@nfbot nfbot changed the title Hex conversion update: add start address handling and parsing of non-contiguous memory maps. Hex conversion update: add start address handling and parsing of non-contiguous memory maps Sep 13, 2023
@andrewpono
Copy link
Contributor Author

#12 is solving the exact same problem, just using more code. Both Extended Linear Address and Extended Segment Address are taken care of in my code as well, but it assumes those are not used in the same hex file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants