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

[feature] Writing hexfile with areas not only located on flash address (EEPROM, OTP) #686

Closed
6 tasks done
arabine opened this issue Mar 17, 2018 · 5 comments
Closed
6 tasks done

Comments

@arabine
Copy link

arabine commented Mar 17, 2018

  • Programmer/board type: e.g , Stlink/v2-onboard
  • Programmer firmware version: e.g STSW-LINK007 2.27.15
  • Operating system: e.g Linux
  • Stlink tools version and/or git commit hash: st-flash 1.4.0-25-ge9fe4e5
  • Stlink commandline tool name: st-flash
  • Target chip (and optional board): e.g STM32F469I-DISCO

Fails to flash with some HEX files.
Tested the HEX file provided by ST in the CubeMX archive.

Output:

st-flash --serial 303636424646333533353335344433 --format ihex write STM32469I-Disco_Demo_V1.2.0.hex 
st-flash 1.4.0-25-ge9fe4e5
2018-03-17T21:11:51 INFO common.c: Loading device parameters....
2018-03-17T21:11:51 INFO common.c: Device connected is: F46x and F47x device, id 0x10006434
2018-03-17T21:11:51 INFO common.c: SRAM size: 0x40000 bytes (256 KiB), Flash: 0x200000 bytes (2048 KiB) in pages of 16384 bytes
2018-03-17T21:12:01 INFO common.c: Ignoring 108 bytes of 0xff at end of file
2018-03-17T21:12:01 INFO common.c: Attempting to write -2005324888 (0x88792ba8) bytes to stm32 address: 134217728 (0x8000000)
2018-03-17T21:12:01 ERROR common.c: addr too high
stlink_fwrite_flash() == -1

Expected/description:

Should not fail, the last error code is scary: INFO common.c: Attempting to write -2005324888 (0x88792ba8) ...

@arabine
Copy link
Author

arabine commented Mar 17, 2018

Reply to myself: the binary may contain data that are located in an external memory. OpenOCD also fails to flash at weird addresses. The official STLink does have support of that for discovery boards.

@xor-gate
Copy link
Member

xor-gate commented Mar 17, 2018

If that is a EEPROM or OTP area it is not possible in the same hex file with openocd and stlink currently. Because they use different algorithms to program.

@arabine
Copy link
Author

arabine commented Mar 18, 2018

Yes for sure. Anyway maybe we could have a proper error message. I have tested with my own program, it is OK, either close this ticket or change it to a "nice to have" status.

@xor-gate xor-gate added this to the Unplanned (Contributions Welcome) milestone Mar 18, 2018
@xor-gate xor-gate changed the title Flashing HEX failure [feature] Writing hexfile with areas not in only located on flash address (EEPROM, OTP) Mar 18, 2018
@Nightwalker-87 Nightwalker-87 modified the milestones: Unplanned (Contributions Welcome), Next Feb 19, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: General, v1.7.0, Feedback required Mar 14, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: Feedback required, v1.6.1 Mar 24, 2020
@Nightwalker-87
Copy link
Member

Nightwalker-87 commented Mar 24, 2020

Related to #202 and #333.

@Nightwalker-87 Nightwalker-87 modified the milestones: v1.6.1, v1.6.2 Mar 24, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: v1.6.2, v1.6.3 Mar 10, 2021
@Nightwalker-87 Nightwalker-87 modified the milestones: v1.8.0, v1.7.1 May 14, 2021
@Nightwalker-87 Nightwalker-87 pinned this issue Jul 16, 2021
@Nightwalker-87 Nightwalker-87 changed the title [feature] Writing hexfile with areas not in only located on flash address (EEPROM, OTP) [feature] Writing hexfile with areas not only located on flash address (EEPROM, OTP) Jul 16, 2021
@Nightwalker-87 Nightwalker-87 unpinned this issue Aug 17, 2021
@Nightwalker-87 Nightwalker-87 removed this from the Features (Longlist) milestone Aug 26, 2022
@Nightwalker-87
Copy link
Member

Closed due to inactivity and missing interest.

@stlink-org stlink-org locked as resolved and limited conversation to collaborators Aug 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants