Compiling for Radiomaster TX16s

openTx has introduced a range of new features, ideas and bling. It is fast becoming the firmware of choice for many users. openTx will run on ALL current hardware platforms, including the gruvin9x and sky9x boards. Work has already started to support the new FrSky X9D radio!
Post Reply
wilopaan
Posts: 155
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Compiling for Radiomaster TX16s

Post by wilopaan »

Hi all,

something changed in the last days. I was able to compile the firmware for tx16s the last weeks, but some days ago it started producing the following error:

Scanning dependencies of target datacopy
[ 3%] Generating datacopy.cpp
thirdparty/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include/../../../../Include/core_cm4.h:678:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
datastructs.h:25:10: note: in file included from datastructs.h:25:
targets/horus/board.h:26:10: note: in file included from targets/horus/board.h:26:
targets/common/arm/stm32/board_common.h:40:10: note: in file included from targets/common/arm/stm32/board_common.h:40:
thirdparty/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/../../CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:472:10: note: in file included from thirdparty/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/../../CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:472:
thirdparty/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include/../../../../Include/core_cm4.h:680:8: note: type is not C-compatible due to this member declaration
thirdparty/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include/../../../../Include/core_cm4.h:712:3: note: type is given name 'ITM_Type' for linkage purposes by this typedef declaration
make[3]: *** [radio/src/CMakeFiles/datacopy.dir/build.make:82: radio/src/datacopy.cpp] Fehler 255
make[3]: *** Datei „radio/src/datacopy.cpp“ wird gelöscht
make[2]: *** [CMakeFiles/Makefile2:764: radio/src/CMakeFiles/datacopy.dir/all] Fehler 2
make[1]: *** [CMakeFiles/Makefile2:744: radio/src/CMakeFiles/firmware.dir/rule] Fehler 2
make: *** [Makefile:258: firmware] Fehler 2

Any hints?

wilopaan
Posts: 155
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: Compiling for Radiomaster TX16s

Post by wilopaan »

Just a side note: compiling for the T12 or x9e is ok with the same tools (compiler version , ...).
wilopaan
Posts: 155
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: Compiling for Radiomaster TX16s

Post by wilopaan »

No help?
I just got my tx16s and I am very eager to build a new OpenTx for it.
jtaylor
Posts: 170
Joined: Fri Nov 01, 2013 1:31 am
Country: -
Location: Wexford (Pittsburgh), PA

Re: Compiling for Radiomaster TX16s

Post by jtaylor »

I am getting no errors compiling on openSUSE LEAP 15.2. I don't have the transmitter so don't know if the firmware works, but it compiles clean. Are you using the recommended version of gcc-arm-none-eabi? People seem to have problems if they don't use the recommended version. I think it's gcc-arm-none-eabi-4_7-2013q3-20130916, I'm not at my Linux system at the moment so can't check but I think that's what I'm using.

Jim
wilopaan
Posts: 155
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: Compiling for Radiomaster TX16s

Post by wilopaan »

I got it working.

There is a incompatibility in core_cm4.h. There is an anonymous typedef. After fixing that, it compiles fine.

User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Compiling for Radiomaster TX16s

Post by Kilrah »

I wouldn't have an idea apart from using the wrong compiler version, the one mentioned in the instructions must be used for firmware you intend to fly with.

Also you never give data about your problem so it's not easy to help you, we don't even know what OS you're compiling on.
wilopaan
Posts: 155
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: Compiling for Radiomaster TX16s

Post by wilopaan »

arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.7.4 20130913 (release) [ARM/embedded-4_7-branch revision 202601]
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
wilopaan
Posts: 155
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: Compiling for Radiomaster TX16s

Post by wilopaan »

uname -a
Linux h242-meier-t480 5.6.13-arch1-1 #1 SMP PREEMPT Thu, 14 May 2020 06:52:53 +0000 x86_64 GNU/Linux
wilopaan
Posts: 155
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: Compiling for Radiomaster TX16s

Post by wilopaan »

cmake -DUSB_SERIAL=ON -DHELI=OFF -DTRANSLATIONS=DE -DPCB=X10 -DPCBREV=TX16S -DINTERNAL_MODULE_MULTI=YES -DGVARS=YES -DLUA=YES ..
-- The C compiler identification is GNU 10.1.0
-- The CXX compiler identification is GNU 10.1.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:14 (cmake_policy):
The OLD behavior for policy CMP0023 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


-- Found Git: /usr/bin/git (found version "2.26.2")
-- OpenTX 2.3.8 @e1be961f
-- Found PythonInterp: /usr/bin/python (found version "3.8.2")
-- Python found, version: 3.8.2
-- Qt Version: 5.14.2
CMake Warning (dev) at /usr/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
The package name passed to `find_package_handle_standard_args` (FOX) does
not match the name of the calling package (Fox). This can lead to problems
in calling code that expects `find_package` result variables (e.g.,
`_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindFox.cmake:59 (find_package_handle_standard_args)
CMakeLists.txt:151 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found FOX: /usr/include/fox-1.6
-- Foxlib found at /usr/lib/libFOX-1.6.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found SDL: /usr/lib/libSDL.so;-lpthread (found version "1.2.15")
-- SDL Lib: /usr/lib/libSDL.so;-lpthread; Headers: /usr/include/SDL; Version: 1.2.15
TARGET simu/libsimulator: cpp compiler /usr/bin/c++ v10.1.0
-- Added optional gtests target
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
TARGET bootloader: cpp compiler arm-none-eabi-g++ v4.7.4
TARGET firmware: cpp compiler arm-none-eabi-g++ v4.7.4
-- Simulators library search path: /usr/local/lib/companion23
TARGET companion23: cpp compiler /usr/bin/c++ v10.1.0
-- Added optional gtests-companion target
CMake Deprecation Warning at companion/src/CMakeLists.txt:363 (cmake_policy):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


-- install /home/lmeier/Projekte/opentx/opentx/build-rmtx16s to /usr/local/bin
-- Configuring done
-- Generating done
wilopaan
Posts: 155
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: Compiling for Radiomaster TX16s

Post by wilopaan »

Maybe it is an issue with the host-compiler? This is a gcc from trunk:

gcc --version
gcc (GCC) 10.0.1 20200422 (experimental)
Copyright (C) 2020 Free Software Foundation, Inc.
Dies ist freie Software; die Kopierbedingungen stehen in den Quellen. Es
gibt KEINE Garantie; auch nicht für MARKTGÄNGIGKEIT oder FÜR SPEZIELLE ZWECKE.
jtaylor
Posts: 170
Joined: Fri Nov 01, 2013 1:31 am
Country: -
Location: Wexford (Pittsburgh), PA

Re: Compiling for Radiomaster TX16s

Post by jtaylor »

Compiled again this morning using your cmake options (openSUSE Leap 15.1) with no errors. Pasted my cmake output and versions below in case you want to compare. One big difference is I'm using gcc 7.5.0

Jim

HP-Linux:~/frsky/opentx/git/opentx/build-test # cmake -DUSB_SERIAL=ON -DHELI=OFF -DTRANSLATIONS=DE -DPCB=X10 -DPCBREV=TX16S -DINTERNAL_MODULE_MULTI=YES -DGVARS=YES -DLUA=YES ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:14 (cmake_policy):
The OLD behavior for policy CMP0023 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


-- Found Git: /usr/bin/git (found version "2.26.1")
-- OpenTX 2.3.8 @e1be961f
-- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.10")
-- Python found, version: 3.6.10
-- Qt Version: 5.9.7
-- Found FOX: /usr/include/fox-1.6
-- Foxlib found at /usr/lib64/libFOX-1.6.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found SDL: /usr/lib64/libSDL.so;-lpthread (found version "1.2.15")
-- SDL Lib: /usr/lib64/libSDL.so;-lpthread; Headers: /usr/include/SDL; Version: 1.2.15
-- Googletest will be downloaded
TARGET simu/libsimulator: cpp compiler /usr/bin/c++ v7
-- Added optional gtests target
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
TARGET bootloader: cpp compiler arm-none-eabi-g++ v4.7.4
TARGET firmware: cpp compiler arm-none-eabi-g++ v4.7.4
-- Simulators library search path: /usr/local/lib/companion23
-- QT_TRANSLATIONS_DIR not found, unable to package pre-built Qt translations with application.
TARGET companion23: cpp compiler /usr/bin/c++ v7
-- Added optional gtests-companion target
CMake Deprecation Warning at companion/src/CMakeLists.txt:363 (cmake_policy):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


-- install /root/frsky/opentx/git/opentx/build-test to /usr/local/bin
-- Configuring done
-- Generating done
-- Build files have been written to: /root/frsky/opentx/git/opentx/build-test

HP-Linux:~/frsky/opentx/git/opentx/build-test # make -j8 firmware | tee output.txt
...Deleted Lines.....
100%] Linking CXX executable ../../firmware.elf
[100%] Built target firmware

HP-Linux:~/frsky/opentx/git/opentx/build-test # arm-none-eabi-gcc --versionarm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.7.4 20130913 (release) [ARM/embedded-4_7-branch revision 202601]
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

HP-Linux:~/frsky/opentx/git/opentx/build-test # uname -a
Linux HP-Linux 4.12.14-lp151.28.48-default #1 SMP Fri Apr 17 05:38:36 UTC 2020 (18849d1) x86_64 x86_64 x86_64 GNU/Linux

HP-Linux:~/frsky/opentx/git/opentx/build-test # gcc --version
gcc (SUSE Linux) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
wilopaan
Posts: 155
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: Compiling for Radiomaster TX16s

Post by wilopaan »

Thank you.

Yes, seems the error is introduced due my very new compiler: something change in C/C++ that typedef unnamed structs must have a tag name.

Maybe the CMSIS (thridparty) is outdated?

Post Reply

Return to “openTx”