added Linux support to cmake

df8oe-master
df8oe 2017-06-06 09:23:55 +02:00
rodzic 0c3a4d5b72
commit faf8d3118a
2 zmienionych plików z 12 dodań i 8 usunięć

Wyświetl plik

@ -3,12 +3,16 @@ include(CMakeForceCompiler)
SET(CMAKE_SYSTEM_NAME "Generic")
SET(CMAKE_SYSTEM_VERSION 1)
set(TOOLCHAIN_DIR D:/Programy/arm_gcc/bin/)
CMAKE_FORCE_C_COMPILER(${TOOLCHAIN_DIR}/arm-none-eabi-gcc.exe GNU)
CMAKE_FORCE_CXX_COMPILER(${TOOLCHAIN_DIR}/arm-none-eabi-g++.exe GNU)
if(UNIX)
set(TOOLCHAIN_DIR /opt/gcc-arm-none-eabi-5_4-2016q3/bin/)
CMAKE_FORCE_C_COMPILER(${TOOLCHAIN_DIR}/arm-none-eabi-gcc GNU)
CMAKE_FORCE_CXX_COMPILER(${TOOLCHAIN_DIR}/arm-none-eabi-g++ GNU)
else()
set(TOOLCHAIN_DIR D:/Programy/arm_gcc/bin/)
CMAKE_FORCE_C_COMPILER(${TOOLCHAIN_DIR}/arm-none-eabi-gcc.exe GNU)
CMAKE_FORCE_CXX_COMPILER(${TOOLCHAIN_DIR}/arm-none-eabi-g++.exe GNU)
endif()
project(STM32_RTTY C ASM CXX)

6
main.c
Wyświetl plik

@ -172,8 +172,8 @@ int main(void) {
radio_enable_tx();
uint8_t rtty_before_aprs_left = RTTY_TO_APRS_RATIO;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmissing-noreturn"
//#pragma clang diagnostic push
//#pragma clang diagnostic ignored "-Wmissing-noreturn"
while (1) {
if (tx_on == 0 && tx_enable) {
if (rtty_before_aprs_left){
@ -197,7 +197,7 @@ int main(void) {
__WFI();
}
}
#pragma clang diagnostic pop
//#pragma clang diagnostic pop
}
void send_rtty_packet() {