Menu

#268 command_print does't print

0.9.0
new
nobody
None
2020-06-05
2020-06-05
CarlFK
No

https://sourceforge.net/p/openocd/code/ci/master/tree/src/pld/pld.c#l159

command_print(CMD, "loaded file %s to pld device %u in %jis %jius",
or
command_print(CMD_CTX, "loaded file %s to pld device %u in %jis %jius",

noice the lack of "loaded file...." in the2nd run:

pi@pi4a:~/carlfk $ sudo ../sourceforge/openocd/src/openocd -f fpga-jtag.cfg
Open On-Chip Debugger 0.10.0+dev-00849-g2caa3455-dirty (2020-06-05-02:33)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO: peripheral_base = 0x3f000000
BCM2835 GPIO: speed_coeffs = 100000, speed_offset = 5
BCM2835 GPIO config: tck = 4, tms = 17, tdi = 27, tdo = 22
BCM2835 GPIO config: srst = 24
none separate
adapter speed: 10000 kHz
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : JTAG only mode enabled (specify swclk and swdio gpio to add SWD mode)
Info : clock speed 10000 kHz
Info : JTAG tap: xc7.tap tap/device found: 0x0362d097 (mfg: 0x04b (Protocol Engines), part: 0x362d, ver: 0x0)
Warn : JTAG tap: xc7.tap UNEXPECTED: 0x0362d097 (mfg: 0x04b (Protocol Engines), part: 0x362d, ver: 0x0)
Error: JTAG tap: xc7.tap expected 1 of 27: 0x0362e093 (mfg: 0x049 (Xilinx), part: 0x362e, ver: 0x0)
...
Error: JTAG tap: xc7.tap expected 27 of 2: 0x036db093 (mfg: 0x049 (Xilinx), part: 0x36db, ver: 0x0)
Error: Trying to use configured scan chain anyway...
Warn : Bypassing JTAG setup events due to errors
Warn : gdb services need one or more targets defined
loaded file /home/pi/AlphamaxMedia/netv2-fpga/production-images/user-35.bit to pld device 0 in 1s 413028us

pi@pi4a:~/carlfk $ sudo ../sourceforge/openocd/src/openocd -f fpga-jtag.cfg
Open On-Chip Debugger 0.10.0+dev-00861-g4f9ad166-dirty (2020-06-05-03:09)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : JTAG only mode enabled (specify swclk and swdio gpio to add SWD mode)
Info : clock speed 10000 kHz
Info : JTAG tap: xc7.tap tap/device found: 0x0362d097 (mfg: 0x04b (Protocol Engines), part: 0x362d, ver: 0x0)
Warn : JTAG tap: xc7.tap UNEXPECTED: 0x0362d097 (mfg: 0x04b (Protocol Engines), part: 0x362d, ver: 0x0)
Error: JTAG tap: xc7.tap expected 1 of 27: 0x0362e093 (mfg: 0x049 (Xilinx), part: 0x362e, ver: 0x0)
...
Error: JTAG tap: xc7.tap expected 27 of 2: 0x036db093 (mfg: 0x049 (Xilinx), part: 0x36db, ver: 0x0)
Error: Trying to use configured scan chain anyway...
Warn : Bypassing JTAG setup events due to errors
Warn : gdb services need one or more targets defined

Discussion

  • CarlFK

    CarlFK - 2020-06-05

    git bisect blames this:

    commit 31c67cc83083ccc2db49d136a9b0d7227e336dba (HEAD, refs/bisect/bad)
    Author: Antonio Borneo borneo.antonio@gmail.com
    Date: Sat Apr 6 16:26:31 2019 +0200

    target: fix output of command "targets"
    
    Part of the output is generated with log functions.
    
    Change prototype of find_target() and use command_print() for all
    the output of the command.
    
    Change-Id: Ia9fdb653fd5b27be427381053a037545faa34414
    Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
    Reviewed-on: http://openocd.zylin.com/5092
    Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
    Tested-by: jenkins
    
     
  • Antonio Borneo

    Antonio Borneo - 2020-06-05

    It is not a bug, but it is the expected behavior after that commit.
    After that commit the output of the commands are not sent to LOG directly but only on demand.
    You can get that effect in your script fpga-jtag.cfg by printing the result of "pld load pld_num filename", e.g.
    echo [pld load pld_num filename]

    If you think that the specific message of "pld load" should instead be LOG-out unconditionally, you can provide in gerrit a patch that replaces the command_print with LOG_USER, as I have proposed in http://openocd.zylin.com/5704
    Actually I'm not sure this is the good way to proceed, and so far no review on 5704.

     

Log in to post a comment.

MongoDB Logo MongoDB