Add Windows build art(e|i)facts (#561)

This includes:
 * Cmake clean up - thanks @Qyriad
 * Windows binaries saved after each appveyor build
 * A bump to the Visual Studio version that we use to build it
 * An appveyor cygwin script for building firmware, it doesn't work but it seems like someone might pick it up and make it work, or blow it away if we switch to Travis firmware artefacts
This commit is contained in:
Dominic Spill
2018-12-05 18:45:26 -07:00
committed by GitHub
parent 290df811a3
commit 9da826e9ef
7 changed files with 42 additions and 10 deletions

View File

@ -1,4 +1,4 @@
os: Visual Studio 2015
os: Visual Studio 2017
clone_depth: 1
configuration:
@ -7,18 +7,25 @@ configuration:
init:
- C:\"Program Files (x86)"\"Microsoft Visual Studio 14.0"\VC\vcvarsall.bat %PLATFORM%
install:
# Dependencies for libHackRF
- appveyor DownloadFile "https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.7z" -FileName "C:\libusb.7z"
- 7z x -y "C:\libusb.7z" -o"C:\libusb"
- appveyor DownloadFile "http://mirrors.kernel.org/sourceware/pthreads-win32/pthreads-w32-2-9-1-release.zip" -FileName "C:\pthreads-w32-release.zip"
- 7z x -y "C:\pthreads-w32-release.zip" -o"C:\pthreads"
- appveyor DownloadFile "http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.26-1_win32.zip" -FileName "C:\pkg-config_win32.zip"
- 7z x -y "C:\pkg-config_win32.zip" -o"C:\pkg-config"
# FFTW for hackrf_sweep
- curl -fsS -o "C:\fftw-3.3.5.zip" "ftp://ftp.fftw.org/pub/fftw/fftw-3.3.5-dll64.zip"
- 7z x -y "C:\fftw-3.3.5.zip" -o"C:\fftw"
- cd c:\fftw
- ps: lib /machine:x64 /def:libfftw3f-3.def
# ARM GCC for firmware builds
# - appveyor DownloadFile "https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-win32.zip" -FileName "C:\gcc-arm-none-eabi-win32.zip"
# - 7z x -y "C:\gcc-arm-none-eabi-win32.zip" -o"C:\gcc-arm-none-eabi"
# - set PATH=%PATH%;c:\gcc-arm-none-eabi\bin
build_script:
# Host library and tools
- mkdir c:\projects\hackrf\host\build
- cd c:\projects\hackrf\host\build
- cmake -G "Visual Studio 14 2015 Win64" \
@ -31,3 +38,15 @@ build_script:
-DFFTW_LIBRARIES=C:\fftw\libfftw3f-3.lib \
..
- msbuild HackRF.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
# Firmware
# - cd c:\projects\hackrf\
# - git submodule init
# - git submodule update
# - '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER && firmware/appveyor.sh"'
after_build:
- 7z a %APPVEYOR_BUILD_FOLDER%\HackRF-Windows-%APPVEYOR_REPO_COMMIT%.zip %APPVEYOR_BUILD_FOLDER%\host\build\libhackrf\src\Release\* %APPVEYOR_BUILD_FOLDER%\host\build\hackrf-tools\src\Release\*
artifacts:
- path: HackRF-Windows-%APPVEYOR_REPO_COMMIT%.zip
name: HackRF-Windows-%APPVEYOR_REPO_COMMIT%

View File

@ -20,7 +20,7 @@
# Top directory CMake project for HackRF firmware
cmake_minimum_required(VERSION 2.8.9)
cmake_minimum_required(VERSION 3.1.3)
set(CMAKE_TOOLCHAIN_FILE toolchain-arm-cortex-m.cmake)
project (hackrf_firmware_all C)

14
firmware/appveyor.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/sh
/usr/bin/env python -m ensurepip
/usr/bin/env python -m pip install pyyaml
cd firmware/libopencm3
export SRCLIBDIR='c:\projects\hackrf\firmware\libopencm3\lib\'
make lib/lpc43xx/m0
make lib/lpc43xx/m4
cd ..
mkdir build-hackrf-one
cd build-hackrf-one
cmake -G "Unix Makefiles" ..
make VERBOSE=1

View File

@ -19,7 +19,7 @@
# Boston, MA 02110-1301, USA.
#
cmake_minimum_required(VERSION 2.8.9)
cmake_minimum_required(VERSION 3.1.3)
set(CMAKE_TOOLCHAIN_FILE ../toolchain-arm-cortex-m.cmake)
project(blinky C)

View File

@ -70,7 +70,7 @@ SET(LDSCRIPT_M4_DFU "-T${PATH_HACKRF_FIRMWARE_COMMON}/${MCU_PARTNO}_M4_memory.ld
SET(LDSCRIPT_M0 "-T${PATH_HACKRF_FIRMWARE_COMMON}/LPC43xx_M0_memory.ld -Tlibopencm3_lpc43xx_m0.ld")
SET(CFLAGS_COMMON "-Os -g3 -Wall -Wextra ${HACKRF_OPTS} ${COMMON_FLAGS} -fno-common -MD")
SET(CFLAGS_COMMON "-Os -g3 -Wall -Wextra ${HACKRF_OPTS} -fno-common -MD")
SET(LDFLAGS_COMMON "-nostartfiles -Wl,--gc-sections")
if(V STREQUAL "1")
@ -80,7 +80,7 @@ endif()
SET(CPUFLAGS_M0 "-mthumb -mcpu=cortex-m0 -mfloat-abi=soft")
SET(CFLAGS_M0 "-std=gnu99 ${CFLAGS_COMMON} ${CPUFLAGS_M0} -DLPC43XX_M0")
SET(CXXFLAGS_M0 "-std=gnu++0x ${CFLAGS_COMMON} ${CPUFLAGS_M0} -DLPC43XX_M0")
SET(LDFLAGS_M0 "${LDFLAGS_COMMON} ${CPUFLAGS_M0} ${LDSCRIPT_M0} -Xlinker -Map=m0.map --specs=nano.specs")
SET(LDFLAGS_M0 "${LDFLAGS_COMMON} ${CPUFLAGS_M0} ${LDSCRIPT_M0} -Xlinker -Map=m0.map")
SET(CPUFLAGS_M4 "-mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16")
SET(CFLAGS_M4 "-std=gnu99 ${CFLAGS_COMMON} ${CPUFLAGS_M4} -DLPC43XX_M4")

View File

@ -18,7 +18,7 @@
# Boston, MA 02110-1301, USA.
#
cmake_minimum_required(VERSION 2.8.9)
cmake_minimum_required(VERSION 3.1.3)
set(CMAKE_TOOLCHAIN_FILE ../toolchain-arm-cortex-m.cmake)
project(hackrf_usb C)

View File

@ -22,10 +22,9 @@ set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR arm)
include(CMakeForceCompiler)
CMAKE_FORCE_C_COMPILER(arm-none-eabi-gcc GNU)
CMAKE_FORCE_CXX_COMPILER(arm-none-eabi-g++ GNU)
set(CMAKE_C_COMPILER arm-none-eabi-gcc)
set(CMAKE_CXX_COMPILER arm-none-eabi-g++)
set(CMAKE_EXE_LINKER_FLAGS_INIT "--specs=nosys.specs")
execute_process(
COMMAND ${CMAKE_C_COMPILER} -print-file-name=libc.a