Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read out TRACESWO on Arduino Due (SAM3X8E) #1315

Open
RavuAlHemio opened this issue Nov 28, 2022 · 1 comment
Open

Cannot read out TRACESWO on Arduino Due (SAM3X8E) #1315

RavuAlHemio opened this issue Nov 28, 2022 · 1 comment
Labels
BMP Firmware Black Magic Probe Firmware (not PC hosted software) NativeHardware Official Black Magic Debug Hardware
Milestone

Comments

@RavuAlHemio
Copy link

RavuAlHemio commented Nov 28, 2022

Greetings,

I am having trouble convincing the official hardware to read out TRACESWO from an Arduino Due (SAM3X8E).

I have recently extended the SerialWireOutput library for Arduino to include Arduino Due (Microchip/Atmel SAM3X8E, Cortex-M3 core) support; it previously only supported some STM32-based Arduino-like boards.

Initial attempts were promising: I was able to convince OpenOCD and my J-Link EDU (which only supports Async TRACESWO) to transmit to my PC. However, I never managed to get my BMP (official hardware V2.3b, first with the latest official firmware, then with some of the latest firmware revisions built by GitHub Actions) to work; I did reconfigure the project to use Manchester TRACESWO instead, since that's the only TRACESWO protocol supported by the official BMP hardware.

I'm running GNU gdb (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 8.0.50.20171128-git as it ships with the Arduino IDE on Windows; my startup commands are:

targ ext COM9
moni freq 100k
moni swdp_scan
attach 1
moni traceswo decode

Opening the other serial port provided by the probe, COM12 in my configuration, causes the terminal emulator to stop responding to user input and eventually give up with the error message The semaphore timeout period has expired. (apparently Windows error ERROR_SEM_TIMEOUT = 121 = 0x79).

Also, if I attempt a connection with COM12 or follow moni traceswo decode with cont in gdb, the probe stops blinking its LEDs (only the green LED remains lit) and it stops responding to gdb commands.

Interestingly enough, the target appears unperturbed -- to be fair, it's just running a variant on the Blink example with some SerialWireOutput strewn in, but it appears that the freezes reported on other hardware are not happening here.

Am I missing something obvious?

Thanks in advance!

@dragonmux dragonmux added this to the v1.10 milestone Nov 28, 2022
@dragonmux dragonmux added Potential Bug A potential, unconfirmed or very special circumstance bug BMP Firmware Black Magic Probe Firmware (not PC hosted software) labels Nov 28, 2022
@dragonmux dragonmux modified the milestones: v1.10, v2.0 release Oct 29, 2023
@dragonmux dragonmux added NativeHardware Official Black Magic Debug Hardware and removed Potential Bug A potential, unconfirmed or very special circumstance bug labels Nov 9, 2024
@dragonmux
Copy link
Member

👋🏼 We finally got around to looking at the SWO subsystem in the firmware. This issue should have been fixed by #1934 - please let us know how you get on with the latest main and if there are any further issues you encounter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BMP Firmware Black Magic Probe Firmware (not PC hosted software) NativeHardware Official Black Magic Debug Hardware
Projects
None yet
Development

No branches or pull requests

2 participants