Skip to content

Commit

Permalink
Fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
xluciano committed Mar 5, 2024
1 parent 466ee30 commit 1411f2a
Show file tree
Hide file tree
Showing 15 changed files with 51 additions and 93 deletions.
1 change: 1 addition & 0 deletions examples/ffd/ffd_cyberon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ set(APP_LINK_OPTIONS
set(APP_COMMON_LINK_LIBRARIES
sln_voice::app::ffd::ap
sln_voice::app::asr::Cyberon
sln_voice::app::asr::device_memory
sln_voice::app::asr::gpio_ctrl
sln_voice::app::asr::intent_engine
sln_voice::app::asr::intent_handler
Expand Down
1 change: 1 addition & 0 deletions examples/ffd/ffd_sensory.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ set(APP_LINK_OPTIONS
set(APP_COMMON_LINK_LIBRARIES
sln_voice::app::ffd::ap
sln_voice::app::asr::sensory
sln_voice::app::asr::device_memory
sln_voice::app::asr::gpio_ctrl
sln_voice::app::asr::intent_engine
sln_voice::app::asr::intent_handler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static void flash_init(void)
// Flash fast read is used for reading the WW model in the INT device,
// normal read is used for the DFU in the UA device.
// The two read mechanisms are not compatible, so we must choose them at initialization.
#if !appconfUSB_ENABLED:
#if !appconfUSB_ENABLED
rtos_qspi_flash_fast_read_init(
qspi_flash_ctx,
FLASH_CLKBLK,
Expand Down Expand Up @@ -62,6 +62,7 @@ static void flash_init(void)
PORT_SQI_SIO,
NULL);
#endif
#endif
}

static void gpio_init(void)
Expand Down
4 changes: 3 additions & 1 deletion examples/ffva/ffva_int_cyberon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ set(FFVA_INT_CYBERON_COMPILE_DEFINITIONS
appconfEXTERNAL_MCLK=1
appconfI2S_ENABLED=1
appconfUSB_ENABLED=0
appconfINTENT_ENABLED=1
appconfAEC_REF_DEFAULT=appconfAEC_REF_I2S
appconfI2S_MODE=appconfI2S_MODE_SLAVE
appconfI2S_AUDIO_SAMPLE_RATE=48000
Expand Down Expand Up @@ -68,10 +69,10 @@ foreach(FFVA_AP ${FFVA_PIPELINES_INT})
sln_voice::app::ffva::xk_voice_l71
sln_voice::app::ffva::ap::${FFVA_AP}
sln_voice::app::asr::Cyberon
sln_voice::app::asr::device_memory
sln_voice::app::asr::gpio_ctrl
sln_voice::app::asr::intent_engine
sln_voice::app::asr::intent_handler

)
target_link_options(${TARGET_NAME} PRIVATE ${APP_LINK_OPTIONS})
unset(TARGET_NAME)
Expand All @@ -92,6 +93,7 @@ foreach(FFVA_AP ${FFVA_PIPELINES_INT})
sln_voice::app::ffva::xk_voice_l71
sln_voice::app::ffva::ap::${FFVA_AP}
sln_voice::app::asr::Cyberon
sln_voice::app::asr::device_memory
sln_voice::app::asr::gpio_ctrl
sln_voice::app::asr::intent_engine
sln_voice::app::asr::intent_handler
Expand Down
4 changes: 0 additions & 4 deletions examples/ffva/src/app_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
#define appconfUSB_ENABLED 0
#endif

#ifndef appconfINTENT_ENABLED
#define appconfINTENT_ENABLED 1
#endif

#ifndef appconfUSB_AUDIO_SAMPLE_RATE
#define appconfUSB_AUDIO_SAMPLE_RATE appconfAUDIO_PIPELINE_SAMPLE_RATE
#endif
Expand Down
68 changes: 0 additions & 68 deletions examples/ffva/src/device_memory_impl.c

This file was deleted.

10 changes: 0 additions & 10 deletions examples/ffva/src/device_memory_impl.h

This file was deleted.

11 changes: 7 additions & 4 deletions examples/ffva/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@
#include "usb_support.h"
#include "usb_audio.h"
#include "audio_pipeline.h"

/* Headers used for the WW intent engine */
#if appconfINTENT_ENABLED
#include "intent_engine.h"
#include "intent_handler.h"
#include "fs_support.h"
#include "print.h"
#include "gpi_ctrl.h"
#include "leds.h"
#endif
#include "gpio_test/gpio_test.h"

volatile int mic_from_usb = appconfMIC_SRC_DEFAULT;
Expand Down Expand Up @@ -345,15 +348,15 @@ void startup_task(void *arg)
gpio_test(gpio_ctx_t0);
#endif

#if ON_TILE(0)
#if appconfINTENT_ENABLED && ON_TILE(0)
led_task_create(appconfLED_TASK_PRIORITY, NULL);
#endif

#if ON_TILE(1)
#if appconfINTENT_ENABLED && ON_TILE(1)
gpio_gpi_init(gpio_ctx_t0);
#endif

#if ON_TILE(FS_TILE_NO)
#if appconfINTENT_ENABLED && ON_TILE(FS_TILE_NO)
rtos_fatfs_init(qspi_flash_ctx);
// Setup flash low-level mode
// NOTE: must call rtos_qspi_flash_fast_read_shutdown_ll to use non low-level mode calls
Expand Down
2 changes: 1 addition & 1 deletion examples/speech_recognition/asr_example/asr_example.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ add_library(asr_example STATIC)

target_sources(asr_example
PRIVATE
${SOLUTION_VOICE_ROOT_PATH}/modules/asr/device_memory.c
${SOLUTION_VOICE_ROOT_PATH}/modules/asr/device_memory/device_memory.c
${CMAKE_CURRENT_LIST_DIR}/asr_example_impl.c
)
target_include_directories(asr_example
Expand Down
4 changes: 2 additions & 2 deletions examples/speech_recognition/speech_recognition.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ include(${CMAKE_CURRENT_LIST_DIR}/asr_example/asr_example.cmake)
#**********************
# Gather Sources
#**********************
file(GLOB_RECURSE APP_SOURCES
${CMAKE_CURRENT_LIST_DIR}/src/*.xc
file(GLOB_RECURSE APP_SOURCES
${CMAKE_CURRENT_LIST_DIR}/src/*.xc
${CMAKE_CURRENT_LIST_DIR}/src/*.c
)
set(APP_INCLUDES
Expand Down
36 changes: 34 additions & 2 deletions modules/asr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ add_library(asr_sensory INTERFACE)

target_sources(asr_sensory
INTERFACE
${CMAKE_CURRENT_LIST_DIR}/device_memory.c
${SOLUTION_VOICE_ROOT_PATH}/modules/asr/device_memory/device_memory.c
${CMAKE_CURRENT_LIST_DIR}/sensory/appAudio.c
${CMAKE_CURRENT_LIST_DIR}/sensory/sensory_asr.c
)
Expand Down Expand Up @@ -44,7 +44,6 @@ add_library(asr_Cyberon INTERFACE)

target_sources(asr_Cyberon
INTERFACE
${CMAKE_CURRENT_LIST_DIR}/device_memory.c
${CMAKE_CURRENT_LIST_DIR}/Cyberon/DSpotter_asr.c
${CMAKE_CURRENT_LIST_DIR}/Cyberon/FlashReadData.c
${CMAKE_CURRENT_LIST_DIR}/Cyberon/Convert2TransferBuffer.c
Expand Down Expand Up @@ -77,6 +76,39 @@ target_compile_definitions(asr_Cyberon

add_library(sln_voice::app::asr::Cyberon ALIAS asr_Cyberon)

##*****************************
## Create Device Memory target
##*****************************

add_library(asr_device_memory INTERFACE)

target_sources(asr_device_memory
INTERFACE
${CMAKE_CURRENT_LIST_DIR}/device_memory/device_memory.c
${CMAKE_CURRENT_LIST_DIR}/device_memory/device_memory_impl.c

)
target_include_directories(asr_device_memory
INTERFACE
${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/device_memory
)
## suppress all linker warnings
target_link_options(asr_device_memory
INTERFACE
-Wl,-w
)

target_compile_definitions(asr_device_memory
INTERFACE
)

##*********************************************
## Create aliases for sln_voice example designs
##*********************************************

add_library(sln_voice::app::asr::device_memory ALIAS asr_device_memory)

##*****************************
## Create GPIO Control target
##*****************************
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 1411f2a

Please sign in to comment.