aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/usrp3/n230
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2015-12-23 17:25:49 -0800
committerAshish Chaudhari <ashish@ettus.com>2016-01-05 17:35:14 -0800
commite5880e648ca28067df5c38b8b905350848c63c27 (patch)
tree2809e92b36dbdb687d647038d5f7e8bfbc2c7034 /firmware/usrp3/n230
parente92913f81a8a44def64dfcb7c0001d9ca7d2d2c4 (diff)
downloaduhd-e5880e648ca28067df5c38b8b905350848c63c27.tar.gz
uhd-e5880e648ca28067df5c38b8b905350848c63c27.tar.bz2
uhd-e5880e648ca28067df5c38b8b905350848c63c27.zip
n230: Increased FW size to 8192
- Updated to X300 bootloader
Diffstat (limited to 'firmware/usrp3/n230')
-rw-r--r--firmware/usrp3/n230/CMakeLists.txt2
-rwxr-xr-xfirmware/usrp3/n230/n230_debug.py24
2 files changed, 11 insertions, 15 deletions
diff --git a/firmware/usrp3/n230/CMakeLists.txt b/firmware/usrp3/n230/CMakeLists.txt
index e473b2b6c..327b68910 100644
--- a/firmware/usrp3/n230/CMakeLists.txt
+++ b/firmware/usrp3/n230/CMakeLists.txt
@@ -22,7 +22,7 @@ include_directories(${CMAKE_SOURCE_DIR}/../../host/lib/usrp/n230)
list(APPEND n230_sources n230_eeprom.c n230_eth_handlers.c n230_init.c n230_main.c)
########################################################################
-set(GEN_OUTPUTS_BIN_SIZE 0x3fff)
+set(GEN_OUTPUTS_BIN_SIZE 0x7fff)
add_executable(n230_main.elf ${n230_sources})
target_link_libraries(n230_main.elf usrp3fw)
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<len(coe_words)-1))
+ draw_progress_bar(((i+1)*100)/len(coe_words))
+ print("\nRebooting...")
out_pkt = pack_fw_command(N230_FW_COMMS_CMD_POKE32, seq(), 1, N230_FW_LOADER_BOOT_DONE_ADDR, [1])
self._sock.send(out_pkt)
self._sock.settimeout(1)