migrating to esp-idf V4.0 gcc 8.2 and CMake

This commit is contained in:
Sebastien
2020-03-06 16:43:56 -05:00
parent f998ea2a52
commit 562bec14fe
77 changed files with 2002 additions and 2802 deletions

View File

@@ -0,0 +1,65 @@
idf_component_register(SRCS "alac.c"
"buffer.c"
"controls.c"
"decode_external.c"
"decode.c"
"display.c"
"embedded.c"
"flac.c"
"helix-aac.c"
"mad.c"
"main.c"
"mpg.c"
"opus.c"
"output_bt.c"
"output_embedded.c"
"output_i2s.c"
"output_pack.c"
"output_visu.c"
"output.c"
"pcm.c"
"process.c"
"resample.c"
"resample16.c"
"slimproto.c"
"stream.c"
"utils.c"
"vorbis.c"
"a1s/ac101.c"
"tas57xx/dac_57xx.c"
"external/dac_external.c"
INCLUDE_DIRS . a1s
REQUIRES newlib
esp_common
esp-dsp
platform_display
platform_config
platform_bluetooth
codecs
services
raop
)
set_source_files_properties(mad.c
PROPERTIES COMPILE_FLAGS
-Wno-maybe-uninitialized
)
set_source_files_properties(pcm.c
PROPERTIES COMPILE_FLAGS
-Wno-maybe-uninitialized
)
set_source_files_properties(flac.c
PROPERTIES COMPILE_FLAGS
-Wno-maybe-uninitialized
)
add_definitions(-O3 -DLINKALL -DLOOPBACK -DNO_FAAD -DRESAMPLE16 -DEMBEDDED -DTREMOR_ONLY -DBYTES_PER_FRAME=4)
#add_library(platform_bluetooth STATIC IMPORTED GLOBAL)
#set_property(TARGET platform_bt PROPERTY IMPORTED_LOCATION "${COMPONENT_DIR}/../freetype/libfreetype.a")
#add_library(platform_bluetooth STATIC IMPORTED GLOBAL)
#set_property(TARGET platform_bluetooth PROPERTY IMPORTED_LOCATION "../platform_bluetooth/platform_bluetooth.a")
#target_link_libraries(${COMPONENT_TARGET} PUBLIC platform_bluetooth)

View File

@@ -13,7 +13,7 @@ CFLAGS += -O3 -DLINKALL -DLOOPBACK -DNO_FAAD -DRESAMPLE16 -DEMBEDDED -DTREMOR_ON
-I$(COMPONENT_PATH)/../tools \
-I$(COMPONENT_PATH)/../codecs/inc/opus \
-I$(COMPONENT_PATH)/../codecs/inc/opusfile \
-I$(COMPONENT_PATH)/../driver_bt \
-I$(COMPONENT_PATH)/../platform_bluetooth \
-I$(COMPONENT_PATH)/../raop \
-I$(COMPONENT_PATH)/../services

View File

@@ -21,9 +21,9 @@
#include "platform_config.h"
#include "squeezelite.h"
#include "bt_app_sink.h"
#include "raop_sink.h"
#include <math.h>
#include <platform_bt_sink.h>
#define LOCK_O mutex_lock(outputbuf->mutex)
#define UNLOCK_O mutex_unlock(outputbuf->mutex)

View File

@@ -1,6 +1,6 @@
#ifndef EMBEDDED_H
#define EMBEDDED_H
#include <ctype.h>
#include <inttypes.h>
/* must provide
@@ -20,6 +20,9 @@
#ifndef PTHREAD_STACK_MIN
#define PTHREAD_STACK_MIN 256
#endif
#ifndef _CONST
#define _CONST
#endif
#define STREAM_THREAD_STACK_SIZE 6 * 1024
#define DECODE_THREAD_STACK_SIZE 16 * 1024

View File

@@ -18,11 +18,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "driver/gpio.h"
#include "squeezelite.h"
#include "perf_trace.h"
#include "platform_config.h"
#include <assert.h>
extern struct outputstate output;
extern struct buffer *outputbuf;
@@ -196,3 +197,4 @@ void output_bt_tick(void) {
RESET_ALL_MIN_MAX;
}
}