On Mon, Mar 7, 2022, 13:04 José Rodrigues <[email protected]>
wrote:
> Hello there!
>
> I was taking a look in the file tcl/target/stm32h7x.cfg to solve a problem
> I've been having on Fedora...
>
> (Turns out the opencod shipped in the repo was rebuilt with jimtcl-0.81
> even though the scripts have the old 'expr' syntax.)
>
Is jimtcl compiled in openocd or is it provided as separate package/library?
> Anyway, on line 240 we have:
>
> 2240 proc stm32h7x_dbgmcu_mmw {reg_offset setbits clearbits} {
> 241 # "comment removed because of size"
> 242 if {![using_hla]} {
> 243 set _CHIPNAME [stm32h7x_get_chipname]
> 244 set used_target $_CHIPNAME.ap2
> 245 set reg_addr [expr 0xE00E1000 + $reg_offset]
> 246 } {
> 247 set used_target [target current]
> 248 set reg_addr [expr 0x5C001000 + $reg_offset]
> 249 }
> 250
> 251 stm32h7x_mmw $used_target $reg_addr $setbits $clearbits
> 252 }
>
> Shouldn't there be an else on line 246?
>
The 'else' is optional in TCL. Adding it improves readability.
Antonio
>