> On 20 Jul 2023, at 10:50, Tomas Vanek <tom_...@users.sourceforge.net> wrote:
> 
> So 'cortex_m maskisr on' didn't work and interrupts was not masked.
> 
> Try:
> 
> openocd "-c" "gdb_port disabled" "-c" "tcl_port disabled" "-c" "telnet_port 
> disabled" "-f" "interface/stlink-dap.cfg" "-f" "target/stm32f7x.cfg"
> "-c" "program rtos-apis-test.elf verify" "-c" "arm semihosting enable" "-c" 
> "arm semihosting_cmdline rtos-apis-test" "-c" "reset halt" -c "cortex_m 
> maskisr on" -c "resume"

I checked out 2c57d11c78108c6547f31ca07f1ff672fa855f10, built it, and the test 
failed with:

1: Test command: 
/Users/ilg/Work/xpack-dev-tools-build/openocd-0.12.0-2/darwin-x64/application/bin/openocd
 "-c" "gdb_port disabled" "-c" "tcl_port disabled" "-c" "telnet_port disabled" 
"-f" "interface/stlink.cfg" "-f" "target/stm32f7x.cfg" "-c" "program 
rtos-apis-test.elf verify" "-c" "arm semihosting enable" "-c" "arm 
semihosting_cmdline rtos-apis-test" "-c" "reset halt" "-c" "cortex_m maskisr 
on" "-c" "resume"
1: Test timeout computed to be: 10000000
1: xPack Open On-Chip Debugger 0.12.0+dev-01275-g2c57d11c7-dirty 
(2023-07-21-16:23)
1: Licensed under GNU GPL v2
1: For bug reports, read
1:      http://openocd.org/doc/doxygen/bugs.html
1: Info : auto-selecting first available session transport "hla_swd". To 
override use 'transport select <transport>'.
1: Info : The selected transport took over low-level target control. The 
results might differ compared to plain JTAG/SWD
1: Info : clock speed 2000 kHz
1: Info : STLINK V2J42M27 (API v2) VID:PID 0483:3752
1: Info : Target voltage: 3.238973
1: Info : [stm32f7x.cpu] Cortex-M7 r1p0 processor detected
1: Info : [stm32f7x.cpu] target has 8 breakpoints, 4 watchpoints
1: Info : gdb port disabled
1: Info : Unable to match requested speed 2000 kHz, using 1800 kHz
1: Info : Unable to match requested speed 2000 kHz, using 1800 kHz
1: [stm32f7x.cpu] halted due to debug-request, current mode: Thread 
1: xPSR: 0x01000000 pc: 0x080001f8 msp: 0x20080000
1: Info : Unable to match requested speed 8000 kHz, using 4000 kHz
1: Info : Unable to match requested speed 8000 kHz, using 4000 kHz
1: ** Programming Started **
1: Info : device id = 0x10016451
1: Info : flash size = 2048 KiB
1: Info : Single Bank 2048 kiB STM32F76x/77x found
1: ** Programming Finished **
1: ** Verify Started **
1: ** Verified OK **
1: semihosting is enabled
1: semihosting command line is [rtos-apis-test]
1: Info : Unable to match requested speed 2000 kHz, using 1800 kHz
1: Info : Unable to match requested speed 2000 kHz, using 1800 kHz
1: [stm32f7x.cpu] halted due to debug-request, current mode: Thread 
1: xPSR: 0x01000000 pc: 0x080001f8 msp: 0x20080000, semihosting
1: invalid command name "cortex_m"
1/3 Test #1: rtos-apis-test ...................***Failed    8.54 sec


I then did a `git pull https://review.openocd.org/openocd 
refs/changes/19/7819/1` and rebuilt, but the error is still there:

1: Test command: 
/Users/ilg/Work/xpack-dev-tools-build/openocd-0.12.0-2/darwin-x64/application/bin/openocd
 "-c" "gdb_port disabled" "-c" "tcl_port disabled" "-c" "telnet_port disabled" 
"-f" "interface/stlink.cfg" "-f" "target/stm32f7x.cfg" "-c" "program 
rtos-apis-test.elf verify" "-c" "arm semihosting enable" "-c" "arm 
semihosting_cmdline rtos-apis-test" "-c" "reset halt" "-c" "cortex_m maskisr 
on" "-c" "resume"
1: Test timeout computed to be: 10000000
1: xPack Open On-Chip Debugger 0.12.0+dev-01276-g8e3e5b323-dirty 
(2023-07-21-16:29)
1: Licensed under GNU GPL v2
1: For bug reports, read
1:      http://openocd.org/doc/doxygen/bugs.html
1: Info : auto-selecting first available session transport "hla_swd". To 
override use 'transport select <transport>'.
1: Info : The selected transport took over low-level target control. The 
results might differ compared to plain JTAG/SWD
1: Info : clock speed 2000 kHz
1: Info : STLINK V2J42M27 (API v2) VID:PID 0483:3752
1: Info : Target voltage: 3.238973
1: Info : [stm32f7x.cpu] Cortex-M7 r1p0 processor detected
1: Info : [stm32f7x.cpu] target has 8 breakpoints, 4 watchpoints
1: Info : gdb port disabled
1: Info : Unable to match requested speed 2000 kHz, using 1800 kHz
1: Info : Unable to match requested speed 2000 kHz, using 1800 kHz
1: [stm32f7x.cpu] halted due to debug-request, current mode: Thread 
1: xPSR: 0x01000000 pc: 0x080001f8 msp: 0x20080000
1: Info : Unable to match requested speed 8000 kHz, using 4000 kHz
1: Info : Unable to match requested speed 8000 kHz, using 4000 kHz
1: ** Programming Started **
1: Info : device id = 0x10016451
1: Info : flash size = 2048 KiB
1: Info : Single Bank 2048 kiB STM32F76x/77x found
1: ** Programming Finished **
1: ** Verify Started **
1: ** Verified OK **
1: semihosting is enabled
1: semihosting command line is [rtos-apis-test]
1: Info : Unable to match requested speed 2000 kHz, using 1800 kHz
1: Info : Unable to match requested speed 2000 kHz, using 1800 kHz
1: [stm32f7x.cpu] halted due to debug-request, current mode: Thread 
1: xPSR: 0x01000000 pc: 0x080001f8 msp: 0x20080000, semihosting
1: invalid command name "cortex_m"
1/3 Test #1: rtos-apis-test ...................***Failed    8.55 sec


I have no idea why the command is not recognised.

If you have suggestions for further tests, please be sure you pass the full 
openocd command to use, since I do not know the correct order of command line 
options.


Liviu


Reply via email to