HipsterBrown / xs-dev

The quickest way for getting started with JS on devices
https://xs-dev.js.org
MIT License
41 stars 13 forks source link

fix(pico): set PICO_GCC_ROOT to brew prefix on mac #42

Closed HipsterBrown closed 2 years ago

HipsterBrown commented 2 years ago

When attempting to run the hello world example for the pico on my M1 Mac, I ran into an error related to the directory for arm-none-eabi-gcc. The default directory within the Moddable make file is /usr/local, which is the default for Homebrew on Mac machines running on Intel chips.

This PR fixes the error by setting the PICO_GCC_ROOT environment variable to the brew --prefix result on MacOS. Instead of doing it conditional to the architecture of the machine, PICO_GCC_ROOT will always be set for safety.