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

[feature] Programmer serial should be displayed when no target is connected #432

Closed
xor-gate opened this issue Jun 15, 2016 · 7 comments · Fixed by #933 or #943
Closed

[feature] Programmer serial should be displayed when no target is connected #432

xor-gate opened this issue Jun 15, 2016 · 7 comments · Fixed by #933 or #943

Comments

@xor-gate
Copy link
Member

When there is currently no target connected the programmer is found but no serial is displayed. This is not handy when we extract the serial number (and OpenOCD hla_serial) when the target is powered on.

@xor-gate xor-gate added this to the v2.0.0 milestone Jun 15, 2016
@xor-gate xor-gate self-assigned this Jun 15, 2016
@xor-gate xor-gate modified the milestones: Unplanned (Contributions Welcome), v2.0.0, v2.1.0 Aug 3, 2016
@xor-gate xor-gate modified the milestones: Unplanned (Contributions Welcome), v2.1.0 Sep 19, 2016
@Nightwalker-87 Nightwalker-87 modified the milestones: Unplanned (Contributions Welcome), Next Feb 19, 2020
@Nightwalker-87 Nightwalker-87 removed this from the General milestone Feb 21, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: v1.7.0, Feedback required Mar 16, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: Feedback required, v1.6.1 Mar 30, 2020
@Nightwalker-87 Nightwalker-87 changed the title Programmer serial should be displayed when no target is connected [feature] Programmer serial should be displayed when no target is connected Mar 31, 2020
@Nightwalker-87
Copy link
Member

@grevaillot: You just won this ticket, because I have found that your commit 804c38e somehow seems to address the issue above (per accident?) I find my STlink-v2 programmer to behave differently since (exactly) this commit. I don't know really what causes this change.

Here is the output of st-info --probe if no device is attached to the programmer:

Before:

Found 1 stlink programmers

Afterwards:

Found 1 stlink programmers
 serial:     3f76050132124647524b4e00
 hla-serial: "\x3f\x76\x05\x01\x32\x12\x46\x47\x52\x4b\x4e\x00"
 flash:      0 (pagesize: 0)
 sram:       0
 chipid:     0x0000
 descr:      unknown device

I don't really understand why this is the case.
However, as you are the author, it just makes sense to let you have a look at this.

@grevaillot
Copy link
Collaborator

I was not aware of that ticket, but yes, this is intended. I've got a couple of fixes for st-flash and gdb server to push to usb probe returning some st-link info with no target connected, i'll tag them with that ticket number.

@grevaillot
Copy link
Collaborator

hmm, the commit you referenced is not the good one, it was fixed in the probe rework patchset

@Nightwalker-87
Copy link
Member

@grevaillot I don't really know what causes the observed change there then. Maybe it is only a partial fix that leads to the change with this device or only a few others as seen from the code side, but is not a complete fix that addresses all devices by then - no clue on that yet. I'll try my second programmer with this commit as well (before and after). They are both CKS32F103C8T6 devices.

@Nightwalker-87
Copy link
Member

Here is the output of st-info --probe with commit 804c38e for the second programmer, which appears to be the same result:

Found 1 stlink programmers
 serial:     3f70050132124647524b4e00
 hla-serial: "\x3f\x70\x05\x01\x32\x12\x46\x47\x52\x4b\x4e\x00"
 flash:      0 (pagesize: 0)
 sram:       0
 chipid:     0x0000
 descr:      unknown device

while the previous commit 46bf0ab returns:

Found 1 stlink programmers

Still wondering why...

@grevaillot
Copy link
Collaborator

sorry, got lost in my tree, let's sum up:

an intermediary commit the probe rework stuff could allow to get some stlink with not target connected to show as "found 1 stlink programmers" with no serial. This was an issue, probe was returning the number of stlink found instead of the number of stlink probed.

in no way 804c38e can change probe behaviour, i would suspect some local not-so-clean rebuild and test issue :)

my PR #933 should close that issue.

BTW, i think that --probe call should maybe display cpuid. This one should never be null and would help new chip support / bug report. but that's an other issue.

@Nightwalker-87
Copy link
Member

Nightwalker-87 commented Apr 20, 2020

@grevaillot: You are right it must have been a local not-so-clean rebuild: By now I figured out that my findings derive from the changes introduced by the older manual merge-commit aad5cf1, and thus none of yours. Also refer to #863 which derives from the same branch. So we should stay with what you mentioned before. However this explains the observed behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment