Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
firmware
Commits
c913b7f4
Verified
Commit
c913b7f4
authored
5 years ago
by
Wolfgang Draxinger
Committed by
rahix
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added tool to enumerate CMSIS-DAP debugging boards
parent
7726c734
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tools/ls_cmsis_dap/Makefile
+16
-0
16 additions, 0 deletions
tools/ls_cmsis_dap/Makefile
tools/ls_cmsis_dap/ls_cmsis_dap.c
+28
-0
28 additions, 0 deletions
tools/ls_cmsis_dap/ls_cmsis_dap.c
with
44 additions
and
0 deletions
tools/ls_cmsis_dap/Makefile
0 → 100644
+
16
−
0
View file @
c913b7f4
.PHONY
:
all clean
all
:
ls_cmsis_dap-hidraw ls_cmsis_dap-libusb
clean
:
-
rm
*
.o ls_cmsis_dap-hidraw ls_cmsis_dap-libusb
ls_cmsis_dap.o
:
ls_cmsis_dap.c
ls_cmsis_dap-hidraw
:
LDFLAGS=-lhidapi-hidraw
ls_cmsis_dap-hidraw
:
ls_cmsis_dap.o
$(
CC
)
$(
LDFLAGS
)
-o
$@
$<
ls_cmsis_dap-libusb
:
LDFLAGS=-lhidapi-libusb
ls_cmsis_dap-libusb
:
ls_cmsis_dap.o
$(
CC
)
$(
LDFLAGS
)
-o
$@
$<
This diff is collapsed.
Click to expand it.
tools/ls_cmsis_dap/ls_cmsis_dap.c
0 → 100644
+
28
−
0
View file @
c913b7f4
#include
<stddef.h>
#include
<stdlib.h>
#include
<stdio.h>
#include
<hidapi/hidapi.h>
int
main
(
int
argc
,
char
*
argv
[])
{
int
rc
=
0
;
if
(
(
rc
=
hid_init
())
){
fprintf
(
stderr
,
"hid_init: %d
\n
"
,
rc
);
goto
done
;
}
struct
hid_device_info
*
hid_devs
=
hid_enumerate
(
0x0d28
,
0x0204
);
if
(
!
hid_devs
){
fprintf
(
stderr
,
"hid_enumerate: NULL
\n
"
);
rc
=
1
;
goto
done
;
}
for
(
struct
hid_device_info
*
dev
=
hid_devs
;
dev
;
dev
=
dev
->
next
){
fprintf
(
stdout
,
"%s
\n
"
,
dev
->
path
);
}
done:
if
(
hid_devs
){
hid_free_enumeration
(
hid_devs
);
}
hid_exit
();
return
-
1
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment