openTx build server options?

Post Reply
jtaylor
Posts: 170
Joined: Fri Nov 01, 2013 1:31 am
Country: -
Location: Wexford (Pittsburgh), PA

openTx build server options?

Post by jtaylor »

What make options are used by the build server for the companion9x downloads when none of the check box options are checked? I would like to build locally using the same options, but not sure how to determine what was used.

I am using:
make PCB=TARANIS EXT=FRSKY SDCARD=YES PPM_CENTER_ADJUSTABLE=YES FLIGHT_MODES=YES AUTOSWITCH=YES PPM_LIMITS_SYMETRICAL=YES AUTOSOURCE=YES DBLKEYS=YES HELI=YES TEMPLATES=YES PPM_UNIT=PERCENT_PREC1 GVARS=YES FAI=CHOICHE TRANSLATIONS=EN

My builds are coming out bigger and I don't know if that is because the code has grown or something in my environment or toolchain is causing it. Or if there is enough flash that it doesn't really matter. I'm still on Aloft's waiting list and don't have a radio to try the code on yet, but trying to get ready and see if there is any chance I can understand the code

2834 downloaded by Companion 192,520 bytes
git/next compiled on openSUSE12.3 279,840 bytes
git/next compiled on Windows 7 with mingw 279,840 bytes
svn trunk 2903 compiled on Windows 7 with cygwin 280,632 bytes

Jim

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

Re: openTx build server options?

Post by Kilrah »

Pretty much correct except for FAI, it's not included by default.
If you want to compare sizes you'd need to compile the exact same revision, i.e. svn r2834. Anything else will definitely not result in the same size even with the same compiler version (we use 4.7.2 if I remember well). Git next definitely not as it has a ton of new features since then.

But yes the radio has 512kB of flash, so it's not really a big deal.
User avatar
dvogonen
Posts: 453
Joined: Tue Jan 31, 2012 9:38 pm
Country: Sweden
Location: Stockholm

Re: Sv: openTx build server options?

Post by dvogonen »

If you are using the build method detailed on the OpenTX home page, it is natural to get a somewhat bigger binary than from the build server. The server is using another ARM tool chain than the standard one linked on the page. The advantage of using the linked toolchain is that it is easy to install.
jtaylor
Posts: 170
Joined: Fri Nov 01, 2013 1:31 am
Country: -
Location: Wexford (Pittsburgh), PA

Re: openTx build server options?

Post by jtaylor »

Thank you both........now if I just had a radio.
RaJa
Posts: 7
Joined: Wed Jan 22, 2014 10:46 pm
Country: -

Re: openTx build server options?

Post by RaJa »

jtaylor wrote: svn trunk 2903 compiled on Windows 7 with cygwin 280,632 bytes

Jim
How did you done this in Windows 7?
I wish to compile under win 7 but I can't. Could you please explain win 7 compilation in details? toolchain, cygwin options.

jtaylor
Posts: 170
Joined: Fri Nov 01, 2013 1:31 am
Country: -
Location: Wexford (Pittsburgh), PA

Re: openTx build server options?

Post by jtaylor »

RaJa wrote:
jtaylor wrote: svn trunk 2903 compiled on Windows 7 with cygwin 280,632 bytes

Jim
How did you done this in Windows 7?
I wish to compile under win 7 but I can't. Could you please explain win 7 compilation in details? toolchain, cygwin options.
I have compiled the firmware on Windows 7 using both cygwin and mingw. It's not too difficult setting up the tool chain if you don't want to try to make the simulator (make simu PCB=TARANIS) which needs the fox toolkit (which you have to build) . I have managed to get the simulator to run under cygwin x with fox toolkit compiled for x, but I have had problems with keyboard input not working when I build it as a native windows program with fox toolkit compiled for native windows. In any case you don't need fox toolkit to just build the firmware.

Actually it's a lot easier under Linux. I had no problems compiling Companion and the firmware on openSUSE 12.3 and I haven't even tried to set up for Companion on Windows. But my laptop runs Windows 7 and I am on it more often so I thought I would set up a build environment there too.

Make sure Cygwin has python 4, gcc, g++, bin utils, and everything else you need to compile.
Unzip avr-gcc and gcc-arm and make sure they are in the path.
Make sure the path picks up the avr and gcc-arm tools before the gcc ones (see my scripts)

My toolchain:

Cygwin for python
Cygwin or mingw for gcc and build utilities
mingw-get-setup-0.6.2-mingw32-beta-20131004-1-dll.tar.xz - Only needed if using mingw
avr-gcc-4.7.2-mingw32.zip
gcc-arm-none-eabi-4_7-2013q3-20130916-win32.zip
Optional for simu: fox-1.6.49.zip

My Build scripts for cygwin (run under bash with . scriptname.sh) That's (dot) space scriptname
setpath.sh
C:\opentx>cat setpath.sh
export PATH=/cygdrive/c/windows/system32:/cygdrive/c/opentx/avr-gcc/bin:/cygdrive/c/opentx/avr-gcc/avr/bin
export PATH=$PATH:/cygdrive/c/opentx/gcc-arm/bin:/cygdrive/c/opentx/gcc-arm/gcc-arm-none-eabi/bin
export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/cygdrive/c/programs/cygwin/bin:/cygdrive/c/programs/cygwin/X11R6/bin:/cygdrive/c/utilities
export FOXPATH=/cygdrive/c/opentx/fox-1.6
echo $PATH

start.sh
C:\opentx>cat start.sh
make PCB=TARANIS EXT=FRSKY SDCARD=YES PPM_CENTER_ADJUSTABLE=YES FLIGHT_MODES=YES AUTOSWITCH=YES PPM_LIMITS_SYMETRICAL=YES AUTOSOURCE=YES DBLKEYS=YES HELI=YES TE
MPLATES=YES PPM_UNIT=PERCENT_PREC1 GVARS=YES FAI=CHOICHE TRANSLATIONS=EN

Path script for mingw msys (use same compile start script):

C:\opentx>cat setpathmingw.sh
export PATH=/c/windows/system32:/c/opentx/avr-gcc/bin:/c/opentx/avr-gcc/avr/bin
export PATH=$PATH:/c/opentx/gcc-arm/bin:/c/opentx/gcc-arm/gcc-arm-none-eabi/bin
export PATH=$PATH:/c/programs/mingw/bin
export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/c/programs/cygwin/bin:/c/program
s/cygwin/X11R6/bin:/c/utilities
export FOXPATH=/c/opentx/fox-1.6
echo $PATH

Can also use a windows command line with batch file:
C:\opentx>cat start.bat
set path=c:\windows\system32;c:\opentx\avr-gcc\bin;c:\opentx\avr-gcc\avr\bin
set path=%path%;c:\opentx\gcc-arm\bin;c:\opentx\gcc-arm\gcc-arm-none-eabi\bin
set path=%path%;c:\programs\cygwin\bin;c:\utilities

make PCB=TARANIS EXT=FRSKY SDCARD=YES PPM_CENTER_ADJUSTABLE=YES FLIGHT_MODES=YES
AUTOSWITCH=YES PPM_LIMITS_SYMETRICAL=YES AUTOSOURCE=YES DBLKEYS=YES HELI=YES TE
MPLATES=YES PPM_UNIT=PERCENT_PREC1 GVARS=YES FAI=CHOICHE TRANSLATIONS=EN
RaJa
Posts: 7
Joined: Wed Jan 22, 2014 10:46 pm
Country: -

Re: openTx build server options?

Post by RaJa »

I've already compiled firmware in linux too. Yes, it's easy, but there is no tools, which I need to comfort work, so I can't use Ubuntu as a main development OS.
That's why I'm loking for a way to compile under windows. I've adopted openTX project for EmBlocks, but being compiled it doesn't work on Taranis. I don't know why.
simu isn't usefull for me if it cannot get uart telemetry data. So main purpose is to build under win 7 firmware.
Thank you very much for explanation, could you, please, add links to the tools versions you used? I'm not very familiar with mingw or cygwin. They weren't usefull for me earlier.
jtaylor
Posts: 170
Joined: Fri Nov 01, 2013 1:31 am
Country: -
Location: Wexford (Pittsburgh), PA

Re: openTx build server options?

Post by jtaylor »

I work and build from a command line so if you are looking for a GUI solution I'm not sure any of this will help you. I use cygwin for vi, git, python, gdb, xwindows and the other unix commands. If you already have git and python installed you probably don't need cygwin just to build the firmware. I think you could probably build the firmware with just mingw, avr-gcc, and gcc-arm.

I have been using FrSky modules in Futaba and Hitec transmitters for a couple of years but have just started looking at OpenTx and trying to understand it since the Taranis came out so I'm not a very good resource. Perhaps somebody else can give you a better build environment for Windows.

In any case here are links to the tools I'm using:

avr-gcc-4.7.2-mingw32.zip from
http://sourceforge.net/projects/mobilec ... 8Win32%29/

gcc-arm-none-eabi-4_7-2013q3-20130916-win32.zip from
https://launchpad.net/gcc-arm-embedded/+download

http://www.mingw.org/

http://cygwin.com/install.html

Post Reply

Return to “openTx for FrSky radios”