aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/zpu/CMakeLists.txt
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-01-10 13:36:36 -0800
committerJosh Blum <josh@joshknows.com>2011-01-10 13:36:36 -0800
commitd52cf5e16d6d3769071da4ae23408ddac300beeb (patch)
tree2c467535099e1e5f5e9861eb062abb00d37dce8b /firmware/zpu/CMakeLists.txt
parent901bfcbd2bbfe537dead32d08cdf06b7319d9ec6 (diff)
downloaduhd-d52cf5e16d6d3769071da4ae23408ddac300beeb.tar.gz
uhd-d52cf5e16d6d3769071da4ae23408ddac300beeb.tar.bz2
uhd-d52cf5e16d6d3769071da4ae23408ddac300beeb.zip
usrp2: replaced pad argument to gen bins macro with a setting variable, simplifies code
Diffstat (limited to 'firmware/zpu/CMakeLists.txt')
-rw-r--r--firmware/zpu/CMakeLists.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/firmware/zpu/CMakeLists.txt b/firmware/zpu/CMakeLists.txt
index 9a32d1834..2df0a6140 100644
--- a/firmware/zpu/CMakeLists.txt
+++ b/firmware/zpu/CMakeLists.txt
@@ -79,7 +79,8 @@ FIND_PROGRAM(HEXDUMP hexdump)
########################################################################
# helper functions to build output formats
########################################################################
-MACRO(GEN_OUTPUTS target pad)
+SET(GEN_OUTPUTS_BIN_SIZE "bin_size_not_set") #set before calling
+MACRO(GEN_OUTPUTS target)
GET_FILENAME_COMPONENT(name ${target} NAME_WE)
#command to create a map from elf
ADD_CUSTOM_COMMAND(
@@ -89,12 +90,14 @@ MACRO(GEN_OUTPUTS target pad)
#command to create a bin from elf
ADD_CUSTOM_COMMAND(
OUTPUT ${name}.bin DEPENDS ${target}
- COMMAND ${OBJCOPY} --pad-to ${pad} -O binary ${target} ${name}.bin
+ COMMAND ${OBJCOPY} -O binary ${target} ${name}.bin
+ --pad-to ${GEN_OUTPUTS_BIN_SIZE}
)
#command to create a ihx from elf
ADD_CUSTOM_COMMAND(
OUTPUT ${name}.ihx DEPENDS ${target}
- COMMAND ${OBJCOPY} --pad-to ${pad} -O ihex ${target} ${name}.ihx
+ COMMAND ${OBJCOPY} -O ihex ${target} ${name}.ihx
+ --pad-to ${GEN_OUTPUTS_BIN_SIZE}
)
#command to create a dump from elf
ADD_CUSTOM_COMMAND(