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

Copying hex instead of bin #980

Closed
lefebvresam opened this issue Jul 19, 2020 · 12 comments
Closed

Copying hex instead of bin #980

lefebvresam opened this issue Jul 19, 2020 · 12 comments

Comments

@lefebvresam
Copy link

lefebvresam commented Jul 19, 2020

After upgrading to mbed 6.2.0 and using "mbed compile --flash", both .bin and .hex files are generated, but only the hex is copied to F: (NUCLEO F091-RC board). It gives this error:

...
| Subtotals                     | 90340(+0) | 544(+0) | 9712(+0) |
Total Static RAM memory (data + bss): 10256(+0) bytes
Total Flash memory (text + data): 90884(+0) bytes

Image: .\BUILD\NUCLEO_F091RC\GCC_ARM\hmipanel.bin
There is not enough space on the disk.
        0 file(s) copied.
[1595201382.32][COPY][ERR] [ret=1] Command: ['copy', u'BUILD\\NUCLEO_F091RC\\GCC_ARM\\hmipanel.hex', u'F:hmipanel.hex']
[mbed] ERROR: Unable to flash the target board connected to your system.
---

Copying the .bin file manually in F: works.
Previously with mbed 5.14 I did not had this issue.

@ciarmcom
Copy link
Member

Thank you for raising this detailed GitHub issue. I am now notifying our internal issue triagers.
Internal Jira reference: https://jira.arm.com/browse/IOTBTOOL-869

@lefebvresam
Copy link
Author

lefebvresam commented Jul 21, 2020

See also my comments on:
ARMmbed/mbed-os#13011

My suggestion is to have a cli option to flash bin or hex for compatibility reasons between different boards.

@jeromecoutant
Copy link
Contributor

Hi

Note that with the latest ST Link FW version available in https://www.st.com/en/development-tools/stsw-link007.html
Hexadecimal drag and drop feature is now supported!

Regards,

@ianhattendorf
Copy link

ianhattendorf commented Sep 7, 2020

I ran into this issue as well and wasted a good chunk of time figuring out why none of my changes were doing anything after updating from 6.1 on a Nucleo L432KC.

I've updated to the latest STLink FW and everything is fine now, however it would be nice if this was fixed to avoid wasting other peoples time going forward.

@jeromecoutant
Copy link
Contributor

@MarceloSalazar
This issue takes long time to understand to every one (including me...)
@ARMmbed/mbed-os-tools

@ianhattendorf
Copy link

Actually it's still an issue for me. The latest firmware I can find for my device (from https://www.st.com/en/development-tools/stsw-link007.html) is V2.J36.M26 and .hex support was added in V2.J37.M26.

Thanks for taking a look at this.

@jeromecoutant
Copy link
Contributor

Actually it's still an issue for me. The latest firmware I can find for my device (from https://www.st.com/en/development-tools/stsw-link007.html) is V2.J36.M26 and .hex support was added in V2.J37.M26.

ST web page is maybe misleading...
If you select "Get Software" pink button, you will get the 2.37.26 version
Versions you can select are "previous" versions...

@schstm

@ianhattendorf
Copy link

🤦

I should pay more attention, thank you.

@teetak01
Copy link

teetak01 commented Sep 7, 2020

Maybe --flash should use the OUTPUT_EXT parameter for deciding which image to flash? Afaik the generation of both .bin and .hex images was added some time ago, but the --flash feature probably has some simpler logic for choosing the image.

Just commenting, did not check the code where the parsing is done.

@lefebvresam
Copy link
Author

lefebvresam commented Sep 7, 2020

I temporary solved this issue by doing this change:

Change line 789 of mbed-os\tools\toolchains\mbed_toolchain.py
...
                # self.binary(r, elf, "{}.{}".format(stem, 'hex'))
...

By not generating the hex, the bin is used as the second choice for flashing.

@jeromecoutant
Copy link
Contributor

Correction is on going: ARMmbed/mbed-os#13584

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 10, 2020

PR merged, so should work in the next release. I'll close this one

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

No branches or pull requests

6 participants