How to run M5Unified WebRadio Sample code (macOS Monterey)

Here is the memo to run
WebRadio sample code from M5Unified.

Code  is here

https://github.com/m5stack/M5Unified/tree/master/examples/Advanced/WebRadio_with_ESP8266Audio

M5Unified_WebRadio

目次

Download or clone the code from the above link

https://github.com/m5stack/M5Unified/tree/master/examples/Advanced/WebRadio_with_ESP8266Audio

 

Use Latest Arduino IDE

https://www.arduino.cc/en/software

1.8.19 now(2022/04/04)

 

macOS Monterey

 

After an upgrade

If you have not done it yet after you upgrade to macOS Monterey, run the following.

xcode-select –install

 

Python

In macOS Monterey, Python2.7 is no longer there, and no Python is installed!

You have to install Python yourself.

Download from here:https://www.python.org/downloads/

And install it.

create your .zshrc

in the latest macOS, they use zsh.

However, there are no .zshrc after a fresh upgrade.

add PATH to you .zshrc

It should be something that looks like this

save the file, run the following command to enable it.

source .zshrc

no python in PATH error

if you get no python in PATH error, you might need to run this

https://github.com/espressif/arduino-esp32/issues/4717#issuecomment-1070801525

 

You need ESP8266Audio

in your Arduino IDE Menu –> Tools –> Manage Libraries

Find ESP8266Audio and install the latest.

 

You need ArduinoESP32 v1.0.6

if not you will have error like this

In file included from /Users/demo/Documents/Arduino/libraries/ESP8266Audio/src/AudioGeneratorMIDI.cpp:65:
/Users/demo/Documents/Arduino/libraries/ESP8266Audio/src/libtinysoundfont/tsf.h: In function ‘void tsf_channel_midi_control(tsf*, int, int, int)’:
/Users/demo/Documents/Arduino/libraries/ESP8266Audio/src/libtinysoundfont/tsf.h:2100:1: error: insn does not satisfy its constraints:
}
^
(insn 858 343 344 51 (set (reg:SF 19 f0 [407])
(mem/u/c:SF (symbol_ref/u:SI (“*.LC248”) [flags 0x2]) [0 S4 A32])) “/Users/demo/Documents/Arduino/libraries/ESP8266Audio/src/libtinysoundfont/tsf.h”:2053 47 {movsf_internal}
(nil))
during RTL pass: postreload

 

in your Arduino IDE Menu –> Tools –> Boards –> Boards Maneger

downgrade your esp32 board to 1.0.6

https://github.com/m5stack/M5Unified/issues/22#issuecomment-1087024444

 

This is NOT a permanent solution. It is a temporary workaround.

 

Done!

now, you can finally compile can flash the program to your M5Stack Core/Core2 or M5Stick-C!

Enjoy.

 

Add a Comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close