From e5880e648ca28067df5c38b8b905350848c63c27 Mon Sep 17 00:00:00 2001 From: Ashish Chaudhari Date: Wed, 23 Dec 2015 17:25:49 -0800 Subject: n230: Increased FW size to 8192 - Updated to X300 bootloader --- firmware/usrp3/n230/n230_debug.py | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'firmware/usrp3/n230/n230_debug.py') diff --git a/firmware/usrp3/n230/n230_debug.py b/firmware/usrp3/n230/n230_debug.py index 41772168b..7b9944672 100755 --- a/firmware/usrp3/n230/n230_debug.py +++ b/firmware/usrp3/n230/n230_debug.py @@ -52,8 +52,9 @@ N230_FW_COMMS_ERR_SIZE_ERROR = 0x20000000 N230_FW_COMMS_ID = 0x0001ACE3 -N230_FW_LOADER_BASE_ADDR = 0x4000 -N230_FW_LOADER_CHUNK_SIZE = 16 +N230_FW_LOADER_ADDR = 0xfa00 +N230_FW_LOADER_DATA = 0xfa04 +N230_FW_LOADER_NUM_WORDS = 8192 N230_FW_LOADER_BOOT_DONE_ADDR = 0xA004 N230_FW_LOADER_BOOT_TIMEOUT = 5 @@ -247,18 +248,13 @@ class ctrl_socket(object): coe_lines = [line.strip(',;\n ') for line in coe_file] start_index = coe_lines.index("memory_initialization_vector=") + 1 coe_words = coe_lines[start_index:] - for i in range(0, len(coe_words), N230_FW_LOADER_CHUNK_SIZE): - data_chunk = coe_words[i:i+(N230_FW_LOADER_CHUNK_SIZE)] - data = [0] * N230_FW_COMMS_MAX_DATA_WORDS - for j in range(len(data_chunk)): - data[j] = int(data_chunk[j], 16) - out_pkt = pack_fw_command( - N230_FW_COMMS_CMD_BLOCK_POKE32|N230_FW_COMMS_FLAGS_ACK, - seq(), len(data_chunk), N230_FW_LOADER_BASE_ADDR+(i*4), data) - in_pkt = self.send_and_recv(out_pkt) - (flags, ack_seq, block_size, addr, data) = unpack_fw_command(in_pkt) - draw_progress_bar(((i+N230_FW_LOADER_CHUNK_SIZE)*100)/len(coe_words)) - print("\nBooting...") + if len(coe_words) != N230_FW_LOADER_NUM_WORDS: + raise Exception("invalid COE file. Must contain 8192 words!") + self.poke(N230_FW_LOADER_ADDR, 0) #Load start address + for i in range(0, len(coe_words)): + self.poke(N230_FW_LOADER_DATA, int(coe_words[i],16), (i