From f2f64227514ad457331f4040ae3c00aa748e46c0 Mon Sep 17 00:00:00 2001 From: sergiu arpadi Date: Mon, 7 Sep 2020 19:14:48 +0300 Subject: [PATCH] sysid: Fix board/project name underscore issue --- projects/scripts/adi_board.tcl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/projects/scripts/adi_board.tcl b/projects/scripts/adi_board.tcl index caec9fb90..017dc55ce 100644 --- a/projects/scripts/adi_board.tcl +++ b/projects/scripts/adi_board.tcl @@ -902,11 +902,13 @@ proc sysid_gen_sys_init_file {custom_string} { # set version set comh_ver_hex "00000001" - # project name - set projname_hex [hexstr_flip [stringtohex [lindex [split [current_project] _] 0] 32]] + set boardname [lindex [split [current_project] _] [expr [llength [split [current_project] _]] - 1]] # board name - set boardname_hex [hexstr_flip [stringtohex [lindex [split [current_project] _] 1] 32]] + set boardname_hex [hexstr_flip [stringtohex $boardname 32]] + + # project name + set projname_hex [hexstr_flip [stringtohex [string trimright [string trimright [current_project] $boardname] _] 32]] # custom string set custom_hex [hexstr_flip [stringtohex $custom_string 64]]