Merge with latest 2.3
This commit is contained in:
@@ -20,9 +20,9 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
#if defined(INTMODULE_HEARTBEAT_GPIO)
|
||||
volatile HeartbeatCapture heartbeatCapture;
|
||||
|
||||
#if defined(INTMODULE_HEARTBEAT_GPIO)
|
||||
void init_intmodule_heartbeat()
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
@@ -69,11 +69,13 @@ void check_intmodule_heartbeat()
|
||||
{
|
||||
if (EXTI_GetITStatus(INTMODULE_HEARTBEAT_EXTI_LINE) != RESET) {
|
||||
#if defined(INTMODULE_USART)
|
||||
heartbeatCapture.timestamp = RTOS_GET_MS();
|
||||
nextMixerTime[INTERNAL_MODULE] = RTOS_GET_MS();
|
||||
#else
|
||||
heartbeatCapture.timestamp = getTmr2MHz();
|
||||
#endif
|
||||
#if defined(DEBUG_LATENCY)
|
||||
heartbeatCapture.count++;
|
||||
#endif
|
||||
EXTI_ClearITPendingBit(INTMODULE_HEARTBEAT_EXTI_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,11 +204,46 @@ set(STM32LIB_SRC
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma2d.c
|
||||
)
|
||||
|
||||
MACRO(GET_GCC_INCLUDE_PATH gcc_include_path)
|
||||
if (WIN32)
|
||||
execute_process(COMMAND arm-none-eabi-gcc -v -x c -E NUL ERROR_VARIABLE _gcc_output OUTPUT_QUIET)
|
||||
else()
|
||||
execute_process(COMMAND arm-none-eabi-gcc -v -x c -E - INPUT_FILE /dev/null ERROR_VARIABLE _gcc_output OUTPUT_QUIET)
|
||||
endif()
|
||||
|
||||
# Build an array of string from the GCC output
|
||||
string(REPLACE "\n" ";" _gcc_output "${_gcc_output}")
|
||||
|
||||
set(_capture_include FALSE)
|
||||
set(_include_path "")
|
||||
|
||||
# Go through the lines and capture between '"#include <...> search starts here:"' and 'End of search list.'
|
||||
foreach(_line ${_gcc_output})
|
||||
if(${_line} STREQUAL "End of search list.")
|
||||
set(_capture_include FALSE)
|
||||
endif()
|
||||
|
||||
if(_capture_include)
|
||||
# Remove the leading and trailing empty characters
|
||||
string(REPLACE "\r" "" _line ${_line})
|
||||
string(SUBSTRING "${_line}" 1 -1 _line)
|
||||
set(_include_path "${_include_path}" "-I${_line}")
|
||||
endif()
|
||||
|
||||
if(${_line} STREQUAL "#include <...> search starts here:")
|
||||
set(_capture_include TRUE)
|
||||
endif()
|
||||
endforeach()
|
||||
set(${gcc_include_path} ${_include_path})
|
||||
ENDMACRO()
|
||||
|
||||
if(PYTHONINTERP_FOUND)
|
||||
GET_GCC_INCLUDE_PATH(arm_gcc_include_path)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${PROJECT_BINARY_DIR}/radio/src/datacopy.cpp
|
||||
WORKING_DIRECTORY ${RADIO_DIRECTORY}/src
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${RADIO_DIRECTORY}/util/generate_datacopy.py datastructs.h -DPCBHORUS -DPCBX10 -DCPUARM -DCOLORLCD -DBACKUP -Itargets/horus > ${PROJECT_BINARY_DIR}/radio/src/datacopy.cpp
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${RADIO_DIRECTORY}/util/generate_datacopy.py datastructs.h -DPCBHORUS -DPCBX10 -DCPUARM -DSTM32F4 -DSTM32F429_439xx -DCOLORLCD -DBACKUP -DSIMU -I. -Itargets/horus -Itargets/common/arm/stm32 -I${THIRDPARTY_DIR} -I${THIRDPARTY_DIR}/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include ${arm_gcc_include_path} > ${PROJECT_BINARY_DIR}/radio/src/datacopy.cpp
|
||||
DEPENDS ${RADIO_DIRECTORY}/src/datastructs.h ${RADIO_DIRECTORY}/util/generate_datacopy.py
|
||||
)
|
||||
add_custom_target(datacopy
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
#ifndef _BOARD_H_
|
||||
#define _BOARD_H_
|
||||
|
||||
#include "../definitions.h"
|
||||
#include "../opentx_constants.h"
|
||||
#include "definitions.h"
|
||||
#include "opentx_constants.h"
|
||||
#include "board_common.h"
|
||||
#include "hal.h"
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#define _BOARD_H_
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "../definitions.h"
|
||||
#include "../opentx_constants.h"
|
||||
#include "definitions.h"
|
||||
#include "opentx_constants.h"
|
||||
#include "board_common.h"
|
||||
#include "hal.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user