arduino / ArduinoCore-mbed

348 stars 202 forks source link

mbed-os-to-arduino-macos prerequisites incorrect #938

Open schnoberts1 opened 3 months ago

schnoberts1 commented 3 months ago

The list:

###########################################################################################
# mbed-os-to-arduino (macOS Version)
#
# This is an adapted version of the original 'mbed-os-to-arduino' script
# specifically tailored for macOS systems.
#
# Prerequisites:
# - jq (Installation: brew install jq)
# - rsync (Installation: brew install rsync)
# - gcc-arm-embedded (Installation: brew install gcc-arm-embedded)
# - hg (Installation: brew install hg)
# - bash (Installation: brew install bash)
# - python (Installation: brew install python)
# - gnu-utils (Installation: brew install gnu-utils)
# - gnu-sed (Installation: brew install gnu-sed)
# - coreutils (Installation: brew install coreutils)
# - ArduinoCore-mbed requirements (Installation: pip install -r requirements.txt)
  1. There is no requirements.txt file. See https://github.com/search?q=repo%3Aarduino%2FArduinoCore-mbed%20requirements.txt&type=code
  2. There is no gnu-utils cask:
    
    (base) andy@ice ArduinoCore-mbed % brew install gnu-utils
    Warning: No available formula with the name "gnu-utils". Did you mean gnu-units, num-utils, gnutls, gnu-time, gputils or uniutils?
    ==> Searching for similarly named formulae and casks...
    ==> Formulae
    gnu-units                     num-utils                     gnutls ✔                      gnu-time                      gputils                       uniutils

To install gnu-units, run: brew install gnu-units



 It would appear requirements.txt is generated after I've installed `mbed-cli` and then run the mbed-os-to-arduino-macos script which fails due to missing packages but generating a requirements.txt. I think the pre-reqs and the docs on the front page are assuming more contextual knowledge than is reasonable.  
schnoberts1 commented 3 months ago

In the end I ran the mbed-os-to-arduino-macos script which failed. I found the requirements.txt file under /tmp (there were three I assumed it was /tmp/mbed-os-program/mbed-os/requirements.txt and not /tmp/mbed-os-program/mbed-os/tools/cmake/requirements.txt or /tmp/mbed-os-program/mbed-os/drivers/usb/tests/TESTS/usb_device/hid/requirements.txt). I then removed /tmp/mbed-os-program and with everything installed repeated and it built.

I assume there's a way to generate the requirements.txt and I need to look at the mbed build docs. It would be great to have a link here so it doesn't give the impression this is a fully formed set of instructions to follow.

I assume gnu-utils was some old cask name for coreutils, everything builds without it.

leonardocavagnis commented 2 months ago

Thanks for reporting this issue! Please, feel free to open a PR related to this issue adding the requirements.txt file and removing gnu-utils from the prerequisites list.