srec icon indicating copy to clipboard operation
srec copied to clipboard

The build for ARM does not work

Open BillMac4440 opened this issue 4 years ago • 5 comments

I have a pull request in to fix it. This was able to run on a Laird SOM60 and given an srec file generated on the PC, build the same sha256sum on generation back to binary on the target.

BillMac4440 avatar Apr 28 '21 15:04 BillMac4440

As commented in #1 the Makefile.arm is for bare metal ARM builds, whereas you appear to be building for a Linux-based ARM machine, for which you should probably use the main Makefile with the correct cross-compiler and flags specified.

arkku avatar Apr 29 '21 08:04 arkku

(Admittedly this is not documented at all.)

arkku avatar Apr 29 '21 08:04 arkku

  1. I will rename the Linux ARM make file to mklinux.arm to keep in 8.3
  2. If running on bare metal ARM, where are you getting file services from? Maybe my lack of understanding as all ARM work here is on Linux.

BillMac4440 avatar Apr 29 '21 11:04 BillMac4440

re. 2., the cross-compiled library is linked to the "firmware" binary that is uploaded to the device, and the firmware has to implement any file services it needs, but with this library files are not necessarily needed. For example, an incoming SREC stream can be fed directly to the library and likewise the output streamed to UART or such. I haven't actually used the SREC format on ARM in the end, but e.g., the more popular IHEX library is used by some projects in such ways. My PROM burner for AVR (not ARM, but same principle applies), for example, uses the PROM and serial port directly.

arkku avatar Apr 29 '21 11:04 arkku

Use case is a desktop Linux converts a binary to srec, then the file goes to the embedded systems through a system that sends srec lines to embedded modules. In this case, the Linux ARM module gets the srec, converts it back to binary, and updates its local file. Using both types of builds. x86-64, and ARM.

BillMac4440 avatar Apr 29 '21 12:04 BillMac4440

Hopefully the main Makefile covers the hosted cases (including ARM + Linux), whereas the Makefile.arm is for bare metal. Projects with more specific needs probably should just use their own Makefile (or other build system) to include the source code.

arkku avatar Oct 26 '23 13:10 arkku