Skip to content

genlink_cmsis.py fails when linker script is missing CR or LF at end of file #85

Description

@rhempel

The vendor supplied linker scripts do not always include a LF or CR at the end of the file:

https://github.com/STMicroelectronics/cmsis-device-h5/blob/5273b8f134ba65f5b8174c4141b711b5c0d295b2/Source/Templates/gcc/linker/STM32H533xx_FLASH.ld

In this case the genlink_cmsis.py fails in

def sub_range(self, begin : int, end : int):

because

if (end >= len(self)):

Adding a CR or LF is enough to fix the problem, or maybe just change the conditional to

if (end > len(self)):

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions