From 2106c6cf594866061f56b09d1396bb80df51802e Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 10 Jan 2011 12:23:08 -0800 Subject: 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 --- firmware/zpu/bin/bin_to_ram_macro_init.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) mode change 100755 => 100644 firmware/zpu/bin/bin_to_ram_macro_init.py (limited to 'firmware/zpu/bin/bin_to_ram_macro_init.py') diff --git a/firmware/zpu/bin/bin_to_ram_macro_init.py b/firmware/zpu/bin/bin_to_ram_macro_init.py old mode 100755 new mode 100644 index 65cf2dbdf..085045290 --- 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 -- cgit v1.2.3