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

Fix Intel Hex output when reading flash >32KB size #129

Merged
merged 1 commit into from Jun 6, 2020

Conversation

basilhussain
Copy link
Contributor

This fixes the bug reported in issue #126.

Compiled and tested on Linux with a Nucleo-64 board featuring a STM8S208RB (128KB flash).

$ sudo ./stm8flash -c stlinkv21 -p stm8s208rb -s flash -r test.srec
Determine FLASH area
Due to its file extension (or lack thereof), "test.srec" is considered as MOTOROLA S-RECORD format!
Reading 131072 bytes at 0x8000... OK
Bytes received: 131072
$ sudo ./stm8flash -c stlinkv21 -p stm8s208rb -s flash -r test-after.hex
Determine FLASH area
Due to its file extension (or lack thereof), "test-after.hex" is considered as INTEL HEX format!
Reading 131072 bytes at 0x8000... OK
Bytes received: 131072
$ srec_cat -output test.srec.bin -binary test.srec
$ srec_cat -output test-after.hex.bin -binary test-after.hex -intel
$ diff -s test.srec.bin test-after.hex.bin 
Files test.srec.bin and test-after.hex.bin are identical
$ md5sum test.srec.bin test-after.hex.bin
87e407327bbefb39d357327a4a3d43ad  test.srec.bin
87e407327bbefb39d357327a4a3d43ad  test-after.hex.bin

@spth spth merged commit cdafc46 into vdudouyt:master Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants