LoginSignup
1
0

More than 3 years have passed since last update.

libopusをPlatformIO+ESP-IDFで使う

Last updated at Posted at 2020-01-03

下記のコマンドをPlatformIOのプロジェクト下に置いて実行する。

src/components/opus/download.sh
#!/bin/sh
# Download and Set libopus for ESP32

OPUS_VERSION=1.3.1

mkdir -p tmp src && cd tmp
curl https://archive.mozilla.org/pub/opus/opus-$OPUS_VERSION.tar.gz | tar xfz -
cd opus-$OPUS_VERSION

./configure --target=xtensa-esp32-elf --host=xtensa-esp32-elf || exit
cp -r include/* celt/* silk/* src/* config.h ../../src
cp -r README COPYING ../../
echo "opus-$OPUS_VERSION" > ../../VERSION

cd ../../src
rm -f opus_demo.c celt/opus_custom_demo.c opus_compare.c repacketizer_demo.c
find . -name tests -o -name arm -o -name mips -o -name x86 -o -name .deps | xargs rm -Rf
rm -Rf ../tmp

そして、platform.inibuild_flagsに下記のように追加。

platform.ini
build_flags =
  -I src/components/opus/src
  -I src/components/opus/src/float
  -I src/components/opus/src/fixed
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0