I'm trying to emulate and debug a simple main.c project for HiFive, with Freedom E SDK, in vscode + PlatformIO, on Ubuntu. It builds but, when I try to start a debug session I get:
Reading symbols from /home/dan/Documents/PlatformIO/Projects/qwe/.pio/build/hifive1/firmware.elf...
PlatformIO Unified Debugger -> ...
PlatformIO: debug_tool = ftdi
PlatformIO: Initializing remote target...
Open On-Chip Debugger 0.10.0+dev (SiFive OpenOCD 0.10.0-2019.08.2)
Licensed under GNU GPL v2
For bug reports:
https://github.com/sifive/freedom-tools/issues
adapter speed: 10000 kHz
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description 'Dual RS232-HS', serial '*' at bus location '*'
.pioinit:11: Error in sourced command file:
Remote communication error. Target disconnected.: Connection reset by peer.
It seems it doesn't find a device, which makes sense because there isn't any, but I want to simulate de execution. How can I do that?
Related
Trying to debug ESP32-S3 with PlatformIO on VSCode with macOS on M1.
Installed ftdi drivers from their website. (installed the VCP drivers, not the D3XX ones as I couldn't find a way to compile and install them).
As ESP32-S3 has an internal debugger, I just created a USB that connects D-/D+ pins to the board gpio 19 and 20 (and grd). BTW, when I connect it to the macbook, I dont see any additional port under /dev/*
Getting the following error, regardless of my platform.ini configuration.
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz
adapter speed: 5000 kHz
Info : tcl server disabled
Info : telnet server disabled
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6014, description '*', serial '*' at bus location '*'
.pioinit:11: Error in sourced command file:
Remote connection closed
My platformio.ini:
[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
upload_port = /dev/cu.wchusbserial553C0085431
monitor_speed=115200
build_type = debug
debug_init_break = tbreak setup
;debug_tool = esp-builtin
debug_tool = esp-prog
Removed and installed the ftdi drivers.
Got a similar error when trying with ESP-IDF.
Any thoughts?
If you are connecting the USB conector directly on esp32s3 module, you should try to change the board parameter from esp32-s3-devkitc-1 to esp32s3-builtin. This way you specify that you are using the built-in debugger.
When i use ESP-IDF, use esp32-c3 board, i can`t frash, it show
OpenOCD Exit with non-zero error code 1
and output:
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
force hard breakpoints
adapter speed: 5000 kHz
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
❌ Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'
❌ Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6014, description '*', serial '*' at bus location '*'
[Stopped] : OpenOCD Server
[how it was wrong][1]
[1]: https://i.stack.imgur.com/YushI.jpg
I try to rebuild and frash and it doesn`t word correctly.
How to fix it?
I'm doing a university project on QNX RTOS (using an academic license). I'm following Building a BSP.
So far I've managed to build (using bios_mkusbimage script in the BSP archive) .img file for x86_64 target. Then I converted .img to .vdi file (VBoxManage convertdd input.img output.vdi) and finally loaded it. The result is:
Or, as text:
Loading IFS...decompressing...done
System page at phys:000000000010c000 user:ffff808000003000 kern 808000006000
Starting next program at vffff80000007388b MFLAGS=1 .11 ClockCycles offsets within tolerance elcome to Q. Neutrino SDP 7.0 on x8664 system
Starting slogger2 server ...
Starting PCI server ...
Set PCI device list ...
Starting EIDE block driver ...
unable to access /dev/hd0t179 'ot3Tt11:7.n:nele7i7la:TensleieCted
Starting USD host ...
Starting devb-umass o audio device has been detected
Starting input services ...
Starting serial driver ...
Starting consoles ...
Starting shells ...
#
The OS seems to boot successfully, but I'm unable to type anything.
I'm looking either for a way to fix the keyboard input, or get a SSH/telnet/... connection to the QNX shell.
I am trying to flash a blue-pill clone with a CS32F103C8T6 chip using the AC6 SystemWorkBench and a ST-LINK v2 device. It is a project built from STM32CubeMX - I am using a MacOS Mojave machine. Here is the output when trying to flash the device.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 8000 kHz
adapter_nsrst_delay: 100
Info : clock speed 8000 kHz
Info : STLINK v2 JTAG v31 API v2 SWIM v7 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.162004
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Stlink adapter speed set to 4000 kHz
Warn : UNEXPECTED idcode: 0x2ba01477
Error: expected 1 of 1: 0x1ba01477
in procedure 'program'
in procedure 'init' called at file "embedded:startup.tcl", line 495
in procedure 'ocd_bouncer'
** OpenOCD init failed **
shutdown command invoked
I have googled and found some similar posts about it, but have no luck solving it.
Does anyone have an idea ?
mvh
Ole K Hornnes
In the OpenOCD config file, you need to add:
set CPUTAPID 0x2ba01477
I've never used AC6 SystemWorkbench and I don't now how you configure the board and the debug adapter in it. So I can't really tell where to look for the config file.
OpenOCD comes with an entire directory of board configurations, usually in a directory OpenOCD / scripts / board. It contains a script called stm32f103c8_blue_pill.cfg, which might be used in your case. Start there...
set CPUTAPID 0x2ba01477 ; Will work for the clone but not for the genuine STM32…
Instead use: set CPUTAPID 0
The zero tells OpenOCD to ignore the id number, so any MCU will then work…
Information Source: OpenOCD TAPs
C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_2.5.0.201904120827\resources\openocd\st_scripts\target\stm32f1x.cfg
add this line before first if statement
set CPUTAPID 0
it solves all openocd stlink id errors
Can someone help me understand an "invalid command name" error with openocd? Some details:
openocd 0.7.0 windows binary
olimex arm-usb-ocd-h dongle
lpc3250 phytec based board
Steps I've done:
Downloaded file "openocd-0.7.0.7z" from http://www.freddiechopin.info/en/download/category/4-openocd
Extracted it to "c:\oocd7\".
Followed the instruction in "c:\oocd7\drivers\libusb-1.0drivers.txt" to run "sadig.exe" to install the "libusb-win32" drivers for the following three usb devices.
Then got the error detailed below.
Command and Error Screenshot:
c:\oocd7>c:\oocd7\bin-x64\openocd-x64-0.7.0.exe -f board\phytec_lpc3250.cfg -f interface\olimex-arm-usb-ocd-h.cfg
Open On-Chip Debugger 0.7.0 (2013-05-05-10:44)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Runtime Error: c:/oocd7/bin-x64/../scripts/target/lpc3250.cfg:34: invalid command name "jtag"
in procedure 'script'
at file "embedded:startup.tcl", line 58
at file "c:/oocd7/bin-x64/../scripts/board\phytec_lpc3250.cfg", line 1
at file "c:/oocd7/bin-x64/../scripts/target/lpc3250.cfg", line 34
Devices that have been installed with "libusb-win32" drivers:
Olimex OpenOCD JTAG ARM-USB-OCD-H Interface 0
Olimex OpenOCD JTAG ARM-USB-OCD-H Interface 1
USB component Device
Very much thanks to any comments!
You need to place the interface file before the board file.
Instead of:
> openocd -f board\phytec_lpc3250.cfg -f interface\olimex-arm-usb-ocd-h.cfg
You want :
> openocd -f interface\olimex-arm-usb-ocd-h.cfg -f board\phytec_lpc3250.cfg
Source: http://elinux.org/OpenOCD_Troubleshooting:_Invalid_Command_Name_JTAG