Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve PSoC 6 post-build hooks, whitelist makefile export #9466

Merged
merged 3 commits into from Jan 28, 2019
Merged

Improve PSoC 6 post-build hooks, whitelist makefile export #9466

merged 3 commits into from Jan 28, 2019

Commits on Jan 22, 2019

  1. PSOC6.py: remove silicon ID check

    PSoC 6 hex files contain 4-byte chip ID at virtual offset 0x90500002
    added by PSoC Creator or cymcuelftool from .cymeta ELF section.
    merge_images compares chip ID in CM0+ and CM4 hex files and raises
    an exception in case of mismatch. Chip ID is different for each MPN
    (for example, 0xE2072100 for CY8C6347BZI-BLD53 and 0xE2062100 for
    CY8C6247BZI-D54). CM0+ prebuilt images target CY8C6347BZI-BLD53
    but should be compatible with other PSoC6 MPNs.
    Remove the check to enable merging CM0+ images with CM4 applications
    built for different MPNs, with empty or absent cymetadata.
    vmedcy committed Jan 22, 2019
    Copy the full SHA
    226edc1 View commit details
    Browse the repository at this point in the history
  2. PSOC6.py: do not require metadata during HEX merging

    Replace hard-coded numeric offsets of PSoC 6 hex file sections
    with sensible constants.
    Do not attempt to update the checksum and metadata contents
    if the sections are not found in the original HEX file.
    vmedcy committed Jan 22, 2019
    Copy the full SHA
    5b0daad View commit details
    Browse the repository at this point in the history
  3. PSOC6: refactor M0 image merging, enable export to makefile

    Rename the existing PSoC-specific m0_core_img key in targets.json
    as a more generic hex_filename key. Update makefile exporter to select
    the subset of resources.hex_files matching the hex_filename value.
    Without this fix, multiple prebuilt CM0+ hex files are found in the
    target resources and erroneously passed to the srec_cat tool.
    
    The fix is generic so other targets that need post-build hex merging
    can use this key to pass the correct image to srecord tool.
    
    The fix also removes sub_target key: instead, rely hex_filename json
    key to detect if the hex image merging needs to be done.
    The sub_target is not used in mbed-os codebase for anything else.
    
    It is possible to override the hex file name in mbed_app.json:
    {
      "target_overrides": {
        "*": {
          "target.hex_filename": "my_custom_m0_image.hex"
        }
    }
    vmedcy committed Jan 22, 2019
    Copy the full SHA
    a48ee11 View commit details
    Browse the repository at this point in the history