Closed pan- closed 8 years ago
cc @theotherjimmy @sarahmarshy
Don't the exporters place the following file in the directory? https://github.com/ARMmbed/mbed-os/blob/5310c2e2cdfdbee49efa93ef51be5964c58a4549/tools/export/GettingStarted.html
It contains a link to here: https://developer.mbed.org/handbook/Getting-Started-mbed-Exporters
That page states the following:
Makefiles are created and to build you will need make installed and part of your path. Also you will need an arm-gcc compiler and linker.
So maybe that online page could use some updating?
So maybe that online page could use some updating?
Yes, it should be.
However, we don't check even if compilers exist, so a question becomes, would we do it for this issue, or is it even possible to have it multiplatform? However, as @pan- stated above, makefile could print always a message that srecord
is running and its required to be installed (then it fails and a person can see what's failing) ? It's quite hidden (look at the issue reported there) , so this could be enhancement?
However, we don't check even if compilers exist
Pretty sure we do this as of https://github.com/ARMmbed/mbed-os/pull/2418.
makefile could print always a message that srecord is running and its required to be installed
Makes sense to me!
However, we don't check even if compilers exist
Pretty sure we do this as of #2418.
I was talking about exported project (makefile in this case). That one does not check, it failed today for mee because my IAR was different than generated by default :-)
I was talking about exported project (makefile in this case). That one does not check, it failed today for mee because my IAR was different than generated by default :-)
Ah thanks, yeah sorry misunderstood :)
@bridadan Any update on this issue ?
@pan- I looked at the makefile template briefly but couldn't immediately pick out where to output this text, especially conditionally for each target. This may be a job for @theotherjimmy when he gets back.
@0xc0170 @bridadan
makefile could print always a message that
srecordsrec_cat is running and its required to be installedMakes sense to me!
That's not really supported directly by make, so we would have to worry about the different commands that are needed to find things within the path on the different operating systems, and worry about what they return, and worry about what they will do if you provide an absolute path... I really don't think this is a good idea.
@theotherjimmy I think we actually just want to go with the really dumb solution here: Always print the notice about srec :smile: So just a call to echo
. If we keep it short and sweet, shouldn't be an issue.
Actually, you want it to print before compiling right? then it would be a call to $(info ...)
.
@pan- @bridadan See the linked PR.
Thanks for the PR. That should be enough for the end user and portable across all the OS we support.
Referring to comments under https://github.com/ARMmbed/oob-mbed-os-example-ble/issues/19 , can we have a confirmation message after the end of srec execution to confirm to the user that the hex file is ready for flashing to target - maybe output the path to the file? the NOTE is a bit mis-leading at the moment.
@theotherjimmy
Yep! re-opening to keep this tracked.
Description
Indicate to the user which have exported its project with a makefile exporter that he needs to install srec_cat to build its project if their is hex files to merge in it.
Enhancement
On some targets like the
NRF5
family an hex file is merged with the binary as a post build process. While the user doesn't have to install anything special when a project is compiled with mbed cli, it is not the case if the project is exported with the make family exporters.In this setup, the makefile use a program named
srec_cat
to merge the hex file(s) and the application, ifsrec_cat
is not present on the system, the build end badly like here.Instead of an obscure failure it would be better to signal to the user that
srecord
have to be installed on its system.srec_cat
is only used at this place.