Build now with make or CMake - Opus added and configured as a sub component

This commit is contained in:
jorgenkraghjakobsen
2020-05-25 00:11:19 +02:00
Unverified
parent f3f9ea7268
commit c300a285e0
5 changed files with 294 additions and 38 deletions

View File

@@ -0,0 +1,20 @@
file(GLOB srcs "opus/src/*.c")
file(GLOB silk "opus/silk/*.c")
file(GLOB celt "opus/celt/*.c")
file(GLOB fixed "opus/slik/fixed/*.c")
file(GLOB float "opus/slik/float/*.c")
idf_component_register(SRCS "${srcs}" "${silk}" "${celt}" "${fixed}" "${float}"
INCLUDE_DIRS .
"opus/include"
"opus/silk"
"opus/silk/fixed"
"opus/silk/float"
"opus/celt"
)
target_compile_definitions(${COMPONENT_TARGET} PRIVATE "-DHAVE_CONFIG_H")

View File

@@ -0,0 +1,12 @@
#
# Main Makefile. This is basically the same as a component makefile.
#
# This Makefile should, at the very least, just include $(SDK_PATH)/make/component_common.mk. By default,
# this will take the sources in the src/ directory, compile them and link them into
# lib(subdirectory_name).a in the build directory. This behaviour is entirely configurable,
# please read the ESP-IDF documents if you need to do this.
#
COMPONENT_SRCDIRS := opus/src opus/silk opus/silk/fixed opus/celt
COMPONENT_ADD_INCLUDEDIRS := . opus/include opus/silk opus/silk/fixed opus/celt
CFLAGS += -DHAVE_CONFIG_H

208
components/opus/config.h Normal file
View File

@@ -0,0 +1,208 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Get CPU Info by asm method */
/* #undef CPU_INFO_BY_ASM */
/* Get CPU Info by c method */
/* #undef CPU_INFO_BY_C */
/* Custom modes */
/* #undef CUSTOM_MODES */
/* Do not build the float API */
//#define DISABLE_FLOAT_API 1
/* Assertions */
/* #undef ENABLE_ASSERTIONS */
/* Ambisonics Support */
/* #undef ENABLE_EXPERIMENTAL_AMBISONICS */
/* Enable bitstream changes from draft-ietf-codec-opus-update */
/* #undef ENABLE_UPDATE_DRAFT */
/* Debug fixed-point implementation */
/* #undef FIXED_DEBUG */
/* Compile as fixed-point (for machines without a fast enough FPU) */
#define FIXED_POINT 1
/* Float approximations */
/* #undef FLOAT_APPROX */
/* Fuzzing */
/* #undef FUZZING */
/* Define to 1 if you have the <alloca.h> header file. */
/* #undef HAVE_ALLOCA_H */
/* NE10 library is installed on host. Make sure it is on target! */
/* #undef HAVE_ARM_NE10 */
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `lrint' function. */
/* #undef HAVE_LRINT */
#define HAVE_LRINT 1
/* Define to 1 if you have the `lrintf' function. */
/* #undef HAVE_LRINTF */
#define HAVE_LRINTF 1
/* Define to 1 if you have the <memory.h> header file. */
/* #undef HAVE_MEMORY_H */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `__malloc_hook' function. */
/* #undef HAVE___MALLOC_HOOK */
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"
/* Make use of ARM asm optimization */
/* #undef OPUS_ARM_ASM */
/* Use generic ARMv4 inline asm optimizations */
/* #undef OPUS_ARM_INLINE_ASM */
/* Use ARMv5E inline asm optimizations */
/* #undef OPUS_ARM_INLINE_EDSP */
/* Use ARMv6 inline asm optimizations */
/* #undef OPUS_ARM_INLINE_MEDIA */
/* Use ARM NEON inline asm optimizations */
/* #undef OPUS_ARM_INLINE_NEON */
/* Define if assembler supports EDSP instructions */
/* #undef OPUS_ARM_MAY_HAVE_EDSP */
/* Define if assembler supports ARMv6 media instructions */
/* #undef OPUS_ARM_MAY_HAVE_MEDIA */
/* Define if compiler supports NEON instructions */
/* #undef OPUS_ARM_MAY_HAVE_NEON */
/* Compiler supports ARMv7/Aarch64 Neon Intrinsics */
/* #undef OPUS_ARM_MAY_HAVE_NEON_INTR */
/* Define if binary requires Aarch64 Neon Intrinsics */
/* #undef OPUS_ARM_PRESUME_AARCH64_NEON_INTR */
/* Define if binary requires EDSP instruction support */
/* #undef OPUS_ARM_PRESUME_EDSP */
/* Define if binary requires ARMv6 media instruction support */
/* #undef OPUS_ARM_PRESUME_MEDIA */
/* Define if binary requires NEON instruction support */
/* #undef OPUS_ARM_PRESUME_NEON */
/* Define if binary requires NEON intrinsics support */
/* #undef OPUS_ARM_PRESUME_NEON_INTR */
/* This is a build of OPUS */
#define OPUS_BUILD /**/
/* Run bit-exactness checks between optimized and c implementations */
/* #undef OPUS_CHECK_ASM */
/* Use run-time CPU capabilities detection */
/* #undef OPUS_HAVE_RTCD */
/* Compiler supports X86 AVX Intrinsics */
/* #undef OPUS_X86_MAY_HAVE_AVX */
/* Compiler supports X86 SSE Intrinsics */
/* #undef OPUS_X86_MAY_HAVE_SSE */
/* Compiler supports X86 SSE2 Intrinsics */
/* #undef OPUS_X86_MAY_HAVE_SSE2 */
/* Compiler supports X86 SSE4.1 Intrinsics */
/* #undef OPUS_X86_MAY_HAVE_SSE4_1 */
/* Define if binary requires AVX intrinsics support */
/* #undef OPUS_X86_PRESUME_AVX */
/* Define if binary requires SSE intrinsics support */
/* #undef OPUS_X86_PRESUME_SSE */
/* Define if binary requires SSE2 intrinsics support */
/* #undef OPUS_X86_PRESUME_SSE2 */
/* Define if binary requires SSE4.1 intrinsics support */
/* #undef OPUS_X86_PRESUME_SSE4_1 */
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "opus@xiph.org"
/* Define to the full name of this package. */
#define PACKAGE_NAME "opus"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "opus 1.3.1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "opus"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.3.1"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Make use of alloca */
/* #undef USE_ALLOCA */
/* Use C99 variable-size arrays */
#define VAR_ARRAYS 1
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
#define restrict __restrict
/* Work around a bug in Sun C++: it does not support _Restrict or
__restrict__, even though the corresponding Sun C compiler ends up with
"#define restrict _Restrict" or "#define restrict __restrict__" in the
previous line. Perhaps some future version of Sun C++ will work with
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
#if defined __SUNPRO_CC && !defined __RESTRICT
# define _Restrict
# define __restrict__
#endif

View File

@@ -1,3 +1,3 @@
idf_component_register(SRCS "rtprx.c"
INCLUDE_DIRS "include"
REQUIRES lopus)
REQUIRES opus)

View File

@@ -2,7 +2,6 @@
# Automatically generated file. DO NOT EDIT.
# Espressif IoT Development Framework (ESP-IDF) Project Configuration
#
CONFIG_IDF_CMAKE=y
CONFIG_IDF_TARGET="esp32"
CONFIG_IDF_TARGET_ESP32=y
CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000
@@ -11,6 +10,8 @@ CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000
# SDK tool configuration
#
CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-"
CONFIG_SDK_PYTHON="python"
CONFIG_SDK_MAKE_WARN_UNDEFINED_VARIABLES=y
# CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set
# end of SDK tool configuration
@@ -24,6 +25,19 @@ CONFIG_APP_BUILD_BOOTLOADER=y
CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y
# end of Build type
#
# Merus MA120x0 interface Configuration
#
CONFIG_MA120X0_NENABLE_PIN=13
CONFIG_MA120X0_NMUTE_PIN=12
CONFIG_MA120X0_ENABLE_PIN=5
CONFIG_MA120X0_NERR_PIN=34
CONFIG_MA120X0_NCLIP_PIN=35
CONFIG_MA120X0_SCL_PIN=32
CONFIG_MA120X0_SDA_PIN=33
CONFIG_MA120X0_I2C_ADDR=0x20
# end of Merus MA120x0 interface Configuration
#
# Application manager
#
@@ -67,10 +81,29 @@ CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0
# CONFIG_SECURE_FLASH_ENC_ENABLED is not set
# end of Security features
#
# ESP32 audio I2S config
#
CONFIG_MASTER_I2S_BCK_PIN=25
CONFIG_MASTER_I2S_LRCK_PIN=26
CONFIG_MASTER_I2S_DATAOUT_PIN=27
CONFIG_SLAVE_I2S_BCK_PIN=26
CONFIG_SLAVE_I2S_LRCK_PIN=12
CONFIG_SLAVE_I2S_DATAOUT_PIN=5
# end of ESP32 audio I2S config
#
# Serial flasher config
#
CONFIG_ESPTOOLPY_PORT="/dev/ttyUSB3"
CONFIG_ESPTOOLPY_BAUD_115200B=y
# CONFIG_ESPTOOLPY_BAUD_230400B is not set
# CONFIG_ESPTOOLPY_BAUD_921600B is not set
# CONFIG_ESPTOOLPY_BAUD_2MB is not set
# CONFIG_ESPTOOLPY_BAUD_OTHER is not set
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
CONFIG_ESPTOOLPY_BAUD=115200
CONFIG_ESPTOOLPY_COMPRESSED=y
# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set
# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set
CONFIG_ESPTOOLPY_FLASHMODE_DIO=y
@@ -117,30 +150,6 @@ CONFIG_PARTITION_TABLE_OFFSET=0x8000
# CONFIG_PARTITION_TABLE_MD5 is not set
# end of Partition Table
#
# Merus MA120x0 interface Configuration
#
CONFIG_MA120X0_NENABLE_PIN=13
CONFIG_MA120X0_NMUTE_PIN=12
CONFIG_MA120X0_ENABLE_PIN=5
CONFIG_MA120X0_NERR_PIN=34
CONFIG_MA120X0_NCLIP_PIN=35
CONFIG_MA120X0_SCL_PIN=32
CONFIG_MA120X0_SDA_PIN=33
CONFIG_MA120X0_I2C_ADDR=0x20
# end of Merus MA120x0 interface Configuration
#
# ESP32 audio I2S config
#
CONFIG_MASTER_I2S_BCK_PIN=25
CONFIG_MASTER_I2S_LRCK_PIN=26
CONFIG_MASTER_I2S_DATAOUT_PIN=27
CONFIG_SLAVE_I2S_BCK_PIN=26
CONFIG_SLAVE_I2S_LRCK_PIN=12
CONFIG_SLAVE_I2S_DATAOUT_PIN=5
# end of ESP32 audio I2S config
#
# Compiler options
#
@@ -308,6 +317,23 @@ CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5
# CONFIG_PM_ENABLE is not set
# end of Power Management
#
# Memory protection
#
CONFIG_ESP32S2_MEMPROT_FEATURE=y
CONFIG_ESP32S2_MEMPROT_FEATURE_LOCK=y
# end of Memory protection
#
# Cache config
#
# end of Cache config
CONFIG_ESP32S2_TRACEMEM_RESERVE_DRAM=0x0
CONFIG_ESP32S2_ULP_COPROC_RESERVE_MEM=0
CONFIG_ESP32S2_DEBUG_OCDAWARE=y
CONFIG_ESP32S2_BROWNOUT_DET=y
#
# ADC-Calibration
#
@@ -949,18 +975,6 @@ CONFIG_SPIFFS_USE_MTIME=y
# end of Debug Configuration
# end of SPIFFS Configuration
#
# TinyUSB
#
#
# Descriptor configuration
#
CONFIG_USB_DESC_CUSTOM_VID=0x1234
CONFIG_USB_DESC_CUSTOM_PID=0x5678
# end of Descriptor configuration
# end of TinyUSB
#
# Unity unit testing library
#
@@ -1023,6 +1037,8 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# Deprecated options for backward compatibility
CONFIG_TOOLPREFIX="xtensa-esp32-elf-"
CONFIG_PYTHON="python"
CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y
# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set
# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set
# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set