Skip to content

Commit

Permalink
Allow building from both firmware/build/ and firmware/hackrf_usb/build
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicgs committed Mar 7, 2019
1 parent 4fcfbec commit 509c8f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
18 changes: 0 additions & 18 deletions firmware/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,5 @@ set(CMAKE_TOOLCHAIN_FILE toolchain-arm-cortex-m.cmake)

project (hackrf_firmware_all C)

SET(PATH_HACKRF_FIRMWARE ${CMAKE_CURRENT_LIST_DIR})
SET(PATH_HACKRF_CPLD_XSVF ${PATH_HACKRF_FIRMWARE}/cpld/sgpio_if/default.xsvf)
SET(PATH_HACKRF ${PATH_HACKRF_FIRMWARE}/..)
SET(PATH_HACKRF_FIRMWARE_COMMON ${PATH_HACKRF_FIRMWARE}/common)
SET(LIBOPENCM3 ${PATH_HACKRF_FIRMWARE}/libopencm3)
SET(PATH_DFU_PY ${PATH_HACKRF_FIRMWARE}/dfu.py)
SET(PATH_CPLD_BITSTREAM_TOOL ${PATH_HACKRF_FIRMWARE}/tools/cpld_bitstream.py)
set(PATH_HACKRF_CPLD_DATA_C ${CMAKE_CURRENT_BINARY_DIR}/hackrf_cpld_data.c)

include(ExternalProject)
ExternalProject_Add(libopencm3
SOURCE_DIR "${LIBOPENCM3}"
BUILD_IN_SOURCE true
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
INSTALL_COMMAND ""
)

add_subdirectory(blinky)
add_subdirectory(hackrf_usb)
3 changes: 3 additions & 0 deletions firmware/hackrf-common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@
enable_language(C CXX ASM)

SET(PATH_HACKRF_FIRMWARE ${CMAKE_CURRENT_LIST_DIR})
SET(PATH_HACKRF_CPLD_XSVF ${PATH_HACKRF_FIRMWARE}/cpld/sgpio_if/default.xsvf)
SET(PATH_HACKRF ${PATH_HACKRF_FIRMWARE}/..)
SET(PATH_HACKRF_FIRMWARE_COMMON ${PATH_HACKRF_FIRMWARE}/common)
SET(LIBOPENCM3 ${PATH_HACKRF_FIRMWARE}/libopencm3)
SET(PATH_DFU_PY ${PATH_HACKRF_FIRMWARE}/dfu.py)
SET(PATH_CPLD_BITSTREAM_TOOL ${PATH_HACKRF_FIRMWARE}/tools/cpld_bitstream.py)
set(PATH_HACKRF_CPLD_DATA_C ${CMAKE_CURRENT_BINARY_DIR}/hackrf_cpld_data.c)

include(${PATH_HACKRF_FIRMWARE}/dfu-util.cmake)

Expand Down

0 comments on commit 509c8f4

Please sign in to comment.