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

Fixed parsing hex numbers in chip config files #1169

Merged
merged 3 commits into from
Aug 1, 2021
Merged

Fixed parsing hex numbers in chip config files #1169

merged 3 commits into from
Aug 1, 2021

Commits on Jul 30, 2021

  1. Fix parsing hex numbers in chip config files

    process_chipfile() used to improperly parse hex numbers in chip config
    files (*.chip), because it used atoi(), which read all such numbers
    as 0. This resulted, among other issues, in chip_id being set to 0 for
    all read chips. Such chip id could not match any actual MCU.
    
    Replace the atoi() calls with sscanf(…, "%i", …), where %i should match
    integers in base 10, 8 and 16, depending on the number prefix.
    gszy committed Jul 30, 2021
    Configuration menu
    Copy the full SHA
    e4b1747 View commit details
    Browse the repository at this point in the history
  2. Add a constant for the valid flash types range

    Add a STLINK_FLASH_TYPE_MAX constant that can be used to check if a
    flash type (an integer) is in the range of valid enum stlink_flash_type
    values.
    gszy committed Jul 30, 2021
    Configuration menu
    Copy the full SHA
    929af2b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ebac01c View commit details
    Browse the repository at this point in the history