summaryrefslogtreecommitdiffstats
path: root/firmware/zpu/bin
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-01-10 12:23:08 -0800
committerJosh Blum <josh@joshknows.com>2011-01-10 12:23:08 -0800
commit2106c6cf594866061f56b09d1396bb80df51802e (patch)
tree65c94c63d5737d88653d87e7285627650318b55a /firmware/zpu/bin
parent916223ef3544452bee57b08f9593aa9da66212a5 (diff)
downloaduhd-2106c6cf594866061f56b09d1396bb80df51802e.tar.gz
uhd-2106c6cf594866061f56b09d1396bb80df51802e.tar.bz2
uhd-2106c6cf594866061f56b09d1396bb80df51802e.zip
usrp2: firmware pad bins to zero to deal with optimizing out the static vars that init to zero
removed the spi flash init in favor of an initialization constant at zero tweaked the cmakelists flags list added pad option to the gen binaries macro
Diffstat (limited to 'firmware/zpu/bin')
-rw-r--r--[-rwxr-xr-x]firmware/zpu/bin/bin_to_ram_macro_init.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/zpu/bin/bin_to_ram_macro_init.py b/firmware/zpu/bin/bin_to_ram_macro_init.py
index 65cf2dbdf..085045290 100755..100644
--- a/firmware/zpu/bin/bin_to_ram_macro_init.py
+++ b/firmware/zpu/bin/bin_to_ram_macro_init.py
@@ -12,8 +12,9 @@ def bin_to_ram_macro_init(bin_input_file, ram_init_output_file):
ifile = open(bin_input_file, 'rb')
ofile = open(ram_init_output_file, 'w')
idata = ifile.read()
- fmt = ">%dI" % ((len(idata) / 4),)
- words = struct.unpack(fmt, idata)
+ idata_words = len(idata) / 4
+ fmt = ">%dI"%idata_words
+ words = struct.unpack(fmt, idata[:idata_words*4])
# pad to a multiple of 8 words
r = len(words) % 8