bbcmicrobit / micropython

Port of MicroPython for the BBC micro:bit
https://microbit-micropython.readthedocs.io
Other
603 stars 284 forks source link

Makefile 'create version file' target commands need disambiguating #657

Closed WayneKeenan closed 3 years ago

WayneKeenan commented 5 years ago

When running Makefile in my environment (macOS) the $(VER_ADDR_FILE): yotta target fails for 2 reasons:

  1. The shell echo built-in doesn't support the -n flag so a newline is not generated resulting in a badly formatted build/veraddr.txt, the /bin/echo command needs calling.
  2. the 'vanilla' objdump command picks up the XCode utility and not the arm-gcc utility in the PATH.

I have a PR ready to be raised.

The error output:

[2/2] Linking CXX executable source/microbit-micropython
objdump: Unknown command line argument '-x'.  Try: '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump -help'
objdump: Did you mean '-D'?
tools/adduicr.py build/bbc-microbit-classic-gcc-nosd/source/microbit-micropython.hex $(cat build/veraddr.txt) -o build/firmware.hex
usage: adduicr.py [-h] [-o OUTPUT] firmware address
adduicr.py: error: argument address: invalid <lambda> value: '0x'
make: *** [build/firmware.hex] Error 2
dpgeorge commented 3 years ago

Fixed by dc92faf91be4cdf74130ec9144a5e5ba02d3836d