Fix building hosted
under FreeBSD
#1696
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Detailed description
<alloca.h>
and missing hidapi-hidraw.Tested on NomadBSD 13.2-RELEASE and a bunch of cheap adapters I have.
HOSTED_BMP_ONLY=0
. CMSIS-DAP (Picoprobe, free-dap) are detected, opened in v2/bulk mode and result in successful scan of an empty chain (nothing wired up). BMP-compatibles work only after indicating a--device /dev/ttyU0
and under root privileges (there is no/dev/serial/by-id
); including scanning SWD and attaching to a Cortex-M target. JLink and STLink/v2 result in a crash inlibusb.so.3.0.0
due to write into zero page on first bulk write transaction.ASAN=1
also works btw. FTDI MPSSE not tested. Noting thatdevel/openocd-0.11.0
works on the same machine with the same JLink/STLink without crashing, anddevel/gdb
looks like built with multiarch support.Building:
sudo pkg install libftdi1 hidapi
and thengmake -C src/ PROBE_HOST=hosted HOSTED_BMP_ONLY=0 CC=gcc12 -j6
because Makefiles of this project are incompatible with defaultbmake
to whichmake
aliases.This PR does not cover building BMF and libopencm3 under *BSD. I could not install https://www.freshports.org/devel/gcc-arm-embedded/ due to symlink collisions, but python 3.9 is present (for GENHDR) and there may not be other problems to that.
Your checklist for this pull request
make PROBE_HOST=native
)make PROBE_HOST=hosted
)Closing issues
@DanielO may try using BMDA on his FreeBSD machine now, in addition to the Orbuculum suite (see orbcode/orbuculum#134)