Compilation fixes
This commit is contained in:
@@ -341,15 +341,15 @@ IF( WIN32 )
|
|||||||
"C:/Program Files (x86)/NSIS"
|
"C:/Program Files (x86)/NSIS"
|
||||||
"C:/Programs/NSIS"
|
"C:/Programs/NSIS"
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/companionInstall.exe
|
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/companionInstall.exe
|
||||||
COMMAND "${NSIS_EXE}" ARGS companion.nsi
|
COMMAND "${NSIS_EXE}" ARGS companion.nsi
|
||||||
DEPENDS companion simulator ${PROJECT_BINARY_DIR}/companion.nsi
|
DEPENDS companion simulator opentx-simulators ${PROJECT_BINARY_DIR}/companion.nsi
|
||||||
COMMENT "Companion Windows NSIS Installer")
|
COMMENT "Companion Windows NSIS Installer")
|
||||||
|
|
||||||
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/simulatorInstall.exe
|
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/simulatorInstall.exe
|
||||||
COMMAND "${NSIS_EXE}" ARGS simulator.nsi
|
COMMAND "${NSIS_EXE}" ARGS simulator.nsi
|
||||||
DEPENDS simulator ${PROJECT_BINARY_DIR}/simulator.nsi
|
DEPENDS simulator opentx-simulators ${PROJECT_BINARY_DIR}/simulator.nsi
|
||||||
COMMENT "Simulator Windows NSIS Installer")
|
COMMENT "Simulator Windows NSIS Installer")
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET( installer
|
ADD_CUSTOM_TARGET( installer
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ include_directories(
|
|||||||
${RADIO_SRC_DIRECTORY}/fonts/std
|
${RADIO_SRC_DIRECTORY}/fonts/std
|
||||||
${RADIO_SRC_DIRECTORY}/lua/src
|
${RADIO_SRC_DIRECTORY}/lua/src
|
||||||
${RADIO_SRC_DIRECTORY}/thirdparty
|
${RADIO_SRC_DIRECTORY}/thirdparty
|
||||||
|
${RADIO_SRC_DIRECTORY}/thirdparty/FatFs
|
||||||
|
${RADIO_SRC_DIRECTORY}/thirdparty/FatFs/option
|
||||||
|
${RADIO_SRC_DIRECTORY}/thirdparty/CoOS
|
||||||
)
|
)
|
||||||
|
|
||||||
if(DEFINED TRANSLATIONS)
|
if(DEFINED TRANSLATIONS)
|
||||||
@@ -83,6 +86,18 @@ add_library(opentx-taranis${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
|
|||||||
add_library(opentx-taranisplus${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
|
add_library(opentx-taranisplus${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
|
||||||
add_library(opentx-taranisx9e${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
|
add_library(opentx-taranisx9e${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
|
||||||
|
|
||||||
|
set(OPENTX_LIBRARIES
|
||||||
|
opentx-9x${SUFFIX}-simulator
|
||||||
|
opentx-9xr${SUFFIX}-simulator
|
||||||
|
opentx-9x128${SUFFIX}-simulator
|
||||||
|
opentx-9xr128${SUFFIX}-simulator
|
||||||
|
opentx-gruvin9x${SUFFIX}-simulator
|
||||||
|
opentx-sky9x${SUFFIX}-simulator
|
||||||
|
opentx-taranis${SUFFIX}-simulator
|
||||||
|
opentx-taranisplus${SUFFIX}-simulator
|
||||||
|
opentx-taranisx9e${SUFFIX}-simulator
|
||||||
|
)
|
||||||
|
|
||||||
# 9X with ATmega64
|
# 9X with ATmega64
|
||||||
target_include_directories(opentx-9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/stock)
|
target_include_directories(opentx-9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/stock)
|
||||||
target_compile_definitions(opentx-9x${SUFFIX}-simulator PRIVATE PCBSTD PCB9X CPUM64 ${COMMON_DEFINITIONS})
|
target_compile_definitions(opentx-9x${SUFFIX}-simulator PRIVATE PCBSTD PCB9X CPUM64 ${COMMON_DEFINITIONS})
|
||||||
@@ -127,3 +142,7 @@ target_link_libraries(opentx-taranisplus${SUFFIX}-simulator PRIVATE ${COMMON_LIB
|
|||||||
target_include_directories(opentx-taranisx9e${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/taranis)
|
target_include_directories(opentx-taranisx9e${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/taranis)
|
||||||
target_compile_definitions(opentx-taranisx9e${SUFFIX}-simulator PRIVATE PCBTARANIS REVPLUS REV9E CPUARM CPUSTM32 STM32F40_41xxx VOICE SDCARD ${COMMON_DEFINITIONS})
|
target_compile_definitions(opentx-taranisx9e${SUFFIX}-simulator PRIVATE PCBTARANIS REVPLUS REV9E CPUARM CPUSTM32 STM32F40_41xxx VOICE SDCARD ${COMMON_DEFINITIONS})
|
||||||
target_link_libraries(opentx-taranisx9e${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
|
target_link_libraries(opentx-taranisx9e${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(opentx-simulators
|
||||||
|
DEPENDS ${OPENTX_LIBRARIES}
|
||||||
|
)
|
||||||
|
|||||||
@@ -514,7 +514,7 @@ class OpenTxSimulatorFactory: public SimulatorFactory
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) SimulatorFactory *registerSimu()
|
extern "C" DLLEXPORT SimulatorFactory *registerSimu()
|
||||||
{
|
{
|
||||||
return new NAMESPACE::OpenTxSimulatorFactory();
|
return new NAMESPACE::OpenTxSimulatorFactory();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,9 +59,15 @@
|
|||||||
#error "Unknown board"
|
#error "Unknown board"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined __GNUC__
|
||||||
|
#define DLLEXPORT
|
||||||
|
#else
|
||||||
|
#define DLLEXPORT __declspec(dllexport)
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace NAMESPACE {
|
namespace NAMESPACE {
|
||||||
|
|
||||||
class __declspec(dllexport) OpenTxSimulator : public SimulatorInterface {
|
class DLLEXPORT OpenTxSimulator : public SimulatorInterface {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
#define audio_h
|
#define audio_h
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include "FatFs/ff.h"
|
#include "ff.h"
|
||||||
|
|
||||||
#define AUDIO_FILENAME_MAXLEN (42) //max length example: /SOUNDS/fr/123456789012/1234567890-off.wav
|
#define AUDIO_FILENAME_MAXLEN (42) //max length example: /SOUNDS/fr/123456789012/1234567890-off.wav
|
||||||
#define AUDIO_QUEUE_LENGTH (20)
|
#define AUDIO_QUEUE_LENGTH (20)
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
#include "FatFs/ff.h"
|
#include "ff.h"
|
||||||
|
|
||||||
FIL g_oLogFile = {0};
|
FIL g_oLogFile = {0};
|
||||||
const pm_char * g_logError = NULL;
|
const pm_char * g_logError = NULL;
|
||||||
|
|||||||
@@ -35,8 +35,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "FatFs/diskio.h"
|
#include "diskio.h"
|
||||||
#include "FatFs/ff.h"
|
#include "ff.h"
|
||||||
|
|
||||||
#define LIST_NONE_SD_FILE 1
|
#define LIST_NONE_SD_FILE 1
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@
|
|||||||
#ifndef _SDCARD_H_
|
#ifndef _SDCARD_H_
|
||||||
#define _SDCARD_H_
|
#define _SDCARD_H_
|
||||||
|
|
||||||
#include "FatFs/ff.h"
|
#include "ff.h"
|
||||||
|
|
||||||
#define ROOT_PATH "/"
|
#define ROOT_PATH "/"
|
||||||
#define MODELS_PATH ROOT_PATH "MODELS" // no trailing slash = important
|
#define MODELS_PATH ROOT_PATH "MODELS" // no trailing slash = important
|
||||||
|
|||||||
@@ -644,7 +644,7 @@ namespace simu {
|
|||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#include "FatFs/ff.h"
|
#include "ff.h"
|
||||||
|
|
||||||
#if defined WIN32 || !defined __GNUC__
|
#if defined WIN32 || !defined __GNUC__
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ BINX = $(CP) -O binary
|
|||||||
OBJDIR = .
|
OBJDIR = .
|
||||||
|
|
||||||
THIRDPARTY = ../../../thirdparty
|
THIRDPARTY = ../../../thirdparty
|
||||||
|
FATFSDIR = $(THIRDPARTY)/FatFs
|
||||||
|
|
||||||
ifeq ($(PCBREV), REV9E)
|
ifeq ($(PCBREV), REV9E)
|
||||||
MCU = cortex-m4
|
MCU = cortex-m4
|
||||||
@@ -81,7 +82,7 @@ endif
|
|||||||
# PCB revision
|
# PCB revision
|
||||||
PCBREV =
|
PCBREV =
|
||||||
|
|
||||||
EXTRAINCDIRS = $(THIRDPARTY)
|
EXTRAINCDIRS = $(THIRDPARTY) $(FATFSDIR) $(FATFSDIR)/option
|
||||||
|
|
||||||
STM32USBPATH = ../../../thirdparty/STM32_USB-Host-Device_Lib_V2.1.0/Libraries
|
STM32USBPATH = ../../../thirdparty/STM32_USB-Host-Device_Lib_V2.1.0/Libraries
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user