Skip to content

Instantly share code, notes, and snippets.

View sidprice's full-sized avatar
💭
So much to learn ... what a cool life!

Sid Price sidprice

💭
So much to learn ... what a cool life!
View GitHub Profile
I decided to roll back the BMDA testing to a minimum configuration, involving VSCode, PowerShell, and MSYS2 shell was stepping into areas with their own learning curve and challenges.
So, I went with the simplest of shells, the Windows (formally DOS) Command Line (cmd.exe).
First I checked the "PKG_CONFIG_PATH" variable value in the shell, I found what appeared to be a couple of errors in the environment variable "PKG_CONFIG_PATH". First, the variable doi not have a drive specification, I thought this was a good idea since all my working folders are on a secondary drive. Second, at some point we decided to use the UCRT64 toolchain and had not changed "PKG_CONFIG_PATH" to reflect this. With these corrects the variable looks like:
D:\DataRoot\Projects\blackmagic\src>echo %PKG_CONFIG_PATH%
c:/msys64/ucrt64/lib/pkgconfig
Browsing the MSYS2 installation folder to that folder reveales the libusb-1.0.pc and libftdi1.pc files required by "pkg-config." Note that the "hidapi" library is not installed at present, ho
Usage: D:\DataRoot\Projects\blackmagic\src\blackmagic.exe
[-h | -l | [-vBITMASK] [-d PATH | -P NUMBER | -s SERIAL | -c TYPE]
[-n NUMBER] [-j] [-C] [-t | -T] [-e] [-p] [-R[h]] [-H] [-M STRING ...]
[-E | -w | -V | -r] [-a ADDR] [-S number] [file]]
Probe selection options (if used choose one):
-d, --device <path> Use a serial device at the given path (Deprecated!)
-P, --probe <number> Use the <number>th debug probe found while scanning the
system, see the output from list for the order
-s, --serial <serNumber> Select the debug probe with the given serial number
Usage: D:\DataRoot\Projects\blackmagic\src\blackmagic.exe [options]
-h, --help This help
-l, --list List available supported probes
-v, --verbosity <bitmask> Set the output verbosity, some combination of:
1 = INFO, 2 = GDB, 4 = TARGET, 8 = PROBE, 16 = WIRE
Probe selection options (if used choose one):
-d, -device <path> Use a serial device at the given path (Deprecated!)
-P, probe <number> Use the <number>th debug probe found while scanning the
system, see the output from list for the order
Usage: D:\DataRoot\Projects\blackmagic\src\blackmagic.exe [-h | -l | [-vBITMASK] [-d PATH | -P NUMBER | -s SERIAL | -c TYPE]
[-n NUMBER] [-j] [-C] [-t | -T] [-e] [-p] [-R[h]] [-H] [-M STRING ...]
[-E | -w | -V | -r] [-a ADDR] [-S number] [file]]
Single-shot and verbosity options [-h | -l | -vBITMASK]:
-h Show the version version and this help, then exit
-l List available supported probes
-v<bitmask> Set the output verbosity level based on some combination of:
1 = INFO, 2 = GDB, 4 = TARGET, 8 = PROBE, 16 = WIRE
PS D:\DataRoot\Projects\blackmagic\src> make PROBE_HOST=hosted CC=gcc
CC platforms/pc/cl_utils.c
CC platforms/pc/utils.c
CC platforms/hosted/bmp_remote.c
CC platforms/hosted/remote_swdptap.c
CC platforms/hosted/remote_jtagtap.c
CC platforms/hosted/bmp_serial.c
LD blackmagic
C:/Program Files (x86)/mingw-w64/i686-8.1.0-posix-dwarf-rt_v6-rev0/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.1.0/../../../../i686-w64-mingw32/bin/ld.exe: adiv5.o: Relocations in generic ELF (EM: 40)
C:/Program Files (x86)/mingw-w64/i686-8.1.0-posix-dwarf-rt_v6-rev0/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.1.0/../../../../i686-w64-mingw32/bin/ld.exe: adiv5.o: Relocations in generic ELF (EM: 40)
PS D:\DataRoot\Projects\blackmagic\src> make PROBE_HOST=hosted CC=gcc
CC platforms/pc/serial_win.c
CC platforms/pc/cl_utils.c
In file included from platforms/pc/cl_utils.c:37:
platforms/pc/cl_utils.c: In function 'cl_help':
platforms/hosted/bmp_hosted.h:54:38: error: implicit declaration of function 'L' [-Werror=implicit-function-declaration]
#define PRINT_INFO(fmt, ...) wprintf(L(fmt), ##__VA_ARGS__)
^
platforms/pc/cl_utils.c:133:2: note: in expansion of macro 'PRINT_INFO'
PRINT_INFO(
<<<<<<<<<<<<<<<< Startup pof the Powershell CLI: >>>>>>>>>>>>>>>>>>>>
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
Setting PYTHONNOUSERSITE, was not set
Using Python in C:/esp/tools/.espressif/python_env/idf4.2_py3.8_env/Scripts
Python 3.8.7
@sidprice
sidprice / gist:fb3900f9f97daa6d27305be7e72e74a4
Last active December 13, 2020 18:17
hosted_jlink_apollo3__1.txt
INFO: Open USB 046d:c318 class 0 failed
BMP hosted v1.7.1-116-g897b3ca42
for ST-Link V2/3, CMSIS_DAP, JLINK and LIBFTDI/MPSSE
Using 1366:0101 000203200575 SEGGER
J-Trace CM3
Send ( 1): 01 Rec (2/2)7000
Rec (112/112)4a2d547261636520.436f727465782d4d.205265762e332063.6f6d70696c656420
J-Trace Cortex-M Rev.3 compiled Nov 23 2017 16:43:50
Send ( 1): e8 Rec (4/4)b77bfef9
Caps f9fe7bb7