Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
card10
firmware
Commits
69b55ee7
Verified
Commit
69b55ee7
authored
Aug 27, 2019
by
Rahix
Browse files
Merge 'Tool to enumerate CMSIS-DAP debuggers'
parents
7726c734
502d6d9f
Pipeline
#3557
passed with stages
in 55 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
69b55ee7
...
...
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on
[
Keep a Changelog
](
https://keepachangelog.com/en/1.0.0/
)
.
## [Unreleased]
### Added
-
`ls_cmsis_dap`
: A tool to enumerate CMSIS-DAP debuggers
### Changed
-
`main.py`
was moved into an app to allow easier reconfiguration of the
default app. The new
`main.py`
points to the "old" one so behavior is not
...
...
tools/ls_cmsis_dap/Makefile
0 → 100644
View file @
69b55ee7
.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
$@
$<
tools/ls_cmsis_dap/ls_cmsis_dap.c
0 → 100644
View file @
69b55ee7
#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
;
}
Rahix
@rahix
mentioned in merge request
!128 (closed)
·
Aug 27, 2019
mentioned in merge request
!128 (closed)
mentioned in merge request !128
Toggle commit list
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment