Skip to content

Commit

Permalink
Initial commit of all files.
Browse files Browse the repository at this point in the history
  • Loading branch information
compuphase committed Oct 3, 2019
1 parent ae33a1d commit df795b9
Show file tree
Hide file tree
Showing 80 changed files with 54,365 additions and 0 deletions.
Binary file added BlackMagicProbe.pdf
Binary file not shown.
Binary file added doc/BlackMagicProbe.odt
Binary file not shown.
Binary file added doc/DeviceManager.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/Zadig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/bmdebug.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/bmflash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/bmtrace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/footprints.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/gdbgui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/linux_dmesg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/pinheader-5x2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/tag-connect.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
201 changes: 201 additions & 0 deletions source/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
# -------------------------------------------------------------
#
# Makefile for Black Magic Probe utilities
# o uses Opus make & mkmf utility
# o uses Watcom C/C++ (32-bit)
#
# For release version, use NDEBUG=
# Do "make depend" to update dependencies in this makefile
#
# -------------------------------------------------------------

%include makefile.cfg


# -------------------------------------------------------------
# Defines
# -------------------------------------------------------------

%if %defined(NDEBUG)
# retail version
C_DEBUG=-of+s -dNDEBUG
L_DEBUG=d all op symf
R_DEBUG=-dNDEBUG
%else
# development version
C_DEBUG=-d2 -hd
L_DEBUG=d dwarf
R_DEBUG=
%endif

# -------------------------------------------------------------
# Autosearch paths macro's
# -------------------------------------------------------------

CCDIR = $(CDIR)\binnt
RCDIR = $(CDIR)\binnt
LIBDIR = $(CDIR)\lib
INCLUDE = $(PUBLIC)
ASSERT = $(PUBLIC)\assert

OBJDIR = .\obj
.PATH.obj = $(OBJDIR)
.PATH.res = $(OBJDIR)
.PATH.map = $(OBJDIR)

.PATH.exe = ..\bin


# -------------------------------------------------------------
# Compilers and their options
# -------------------------------------------------------------

####### C compiler
CL = $(CCDIR)\wcl386
CC = $(CCDIR)\wcc386
CFLAGS = -wx -e25 $(C_DEBUG) -dNOC_FILE_DIALOG_WIN32

####### Resource compiler
RC = $(RCDIR)\wrc
RCFLAGS = -bt=nt -dWIN32 -i=$(INCLUDE) $(R_DEBUG)

####### Linker
LNK = $(CCDIR)\wlink
LFLAGS = $(L_DEBUG) SYS win95 op maxe=25 op q


# -------------------------------------------------------------
# Inference rules
# -------------------------------------------------------------

%.exe : %.c
$(CL) -I$(INCLUDE) $(CFLAGS) -DSTANDALONE -bw -q -fe=$(.TARGET) $(.SOURCE)

%.obj : %.c
$(CC) -I$(INCLUDE) $(CFLAGS) -fo=$(.TARGET) $(.SOURCE)

%.res : %.rc
$(RC) -r $(RCFLAGS) -fo=$(.TARGET) $(.SOURCE)


# -------------------------------------------------------------
# Project
# -------------------------------------------------------------

OBJLIST_BMDEBUG = bmdebug.obj bmscan.obj bmp-script.obj elf-postlink.obj \
guidriver.obj minini.obj rs232.obj \
specialfolder.obj \
decodectf.obj parsetsdl.obj swotrace.obj \
nuklear.obj nuklear_gdip.obj noc_file_dialog.obj

OBJLIST_BMFLASH = bmflash.obj bmscan.obj bmp-script.obj bmp-support.obj crc32.obj \
elf-postlink.obj gdb-rsp.obj guidriver.obj minIni.obj rs232.obj \
specialfolder.obj xmltractor.obj \
nuklear.obj nuklear_gdip.obj noc_file_dialog.obj

OBJLIST_BMTRACE = bmtrace.obj bmscan.obj bmp-script.obj bmp-support.obj crc32.obj \
elf-postlink.obj gdb-rsp.obj guidriver.obj minini.obj rs232.obj \
specialfolder.obj xmltractor.obj \
decodectf.obj parsetsdl.obj swotrace.obj \
nuklear.obj nuklear_gdip.obj noc_file_dialog.obj

project : bmdebug.exe bmflash.exe bmtrace.exe bmscan.exe elf-postlink.exe tracegen.exe

depend :
mkmf -c -dS -s -f makefile.dep $(OBJLIST_BMDEBUG) $(OBJLIST_BMFLASH) $(OBJLIST_BMTRACE)


##### C files #####

bmdebug.obj : bmdebug.c

bmflash.obj : bmflash.c

bmscan.obj : bmscan.c

bmtrace.obj : bmtrace.c

bmp-script.obj : bmp-script.c

bmp-support.obj : bmp-support.c

crc32.obj : crc32.c

elf-postlink.obj : elf-postlink.c

gdb-rsp.obj : gdb-rsp.c

guidriver.obj : guidriver.c

minIni.obj : minIni.c

rs232.obj : rs232.c

specialfolder.obj : specialfolder.c

swotrace.obj : swotrace.c

xmltractor.obj : xmltractor.c

decodectf.obj : decodectf.c

parsetsdl.obj : parsetsdl.c

noc_file_dialog.obj : noc_file_dialog.c

nuklear.obj : nuklear.c

nuklear_gdip.obj : nuklear_gdip.c


##### Resource files #####

bmdebug.res : bmdebug.rc

bmflash.res : bmflash.rc

bmtrace.res : bmtrace.rc


##### Executables #####

bmdebug.exe : $(OBJLIST_BMDEBUG) bmdebug.res
$(LNK) $(LFLAGS) @<<
NAME $(.TARGET)
FIL $(.SOURCES,M"*.obj",W\,)
LIBR winmm.lib,shell32.lib,shlwapi,setupapi.lib,lib/gdiplus-w.lib,lib/winusb-w.lib
op resource=$(.SOURCES,M"*.res")
op m =$(.PATH.map)\$(.TARGET,B)
<<

bmflash.exe : $(OBJLIST_BMFLASH) bmflash.res
$(LNK) $(LFLAGS) @<<
NAME $(.TARGET)
FIL $(.SOURCES,M"*.obj",W\,)
LIBR winmm.lib,shell32.lib,shlwapi,lib/gdiplus-w.lib
op resource=$(.SOURCES,M"*.res")
op m =$(.PATH.map)\$(.TARGET,B)
<<

bmtrace.exe : $(OBJLIST_BMTRACE) bmtrace.res
$(LNK) $(LFLAGS) @<<
NAME $(.TARGET)
FIL $(.SOURCES,M"*.obj",W\,)
LIBR winmm.lib,shell32.lib,shlwapi,setupapi.lib,lib/gdiplus-w.lib,lib/winusb-w.lib
op resource=$(.SOURCES,M"*.res")
op m =$(.PATH.map)\$(.TARGET,B)
<<

bmscan.exe : bmscan.c
$(CL) -I$(INCLUDE) $(CFLAGS) -DSTANDALONE -bw -q -fe=$(.TARGET) $(.SOURCE)

elf-postlink.exe : elf-postlink.c
$(CL) -I$(INCLUDE) $(CFLAGS) -DSTANDALONE -bw -q -fe=$(.TARGET) $(.SOURCE)

tracegen.exe : tracegen.c parsetsdl.c
$(CL) -I$(INCLUDE) $(CFLAGS) -bw -q -fe=$(.TARGET) $(.SOURCES)

# put generated dependencies at the end, otherwise it does not blend well with
# inference rules, if an item also has an explicit rule.
%include makefile.dep

160 changes: 160 additions & 0 deletions source/Makefile.linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# -------------------------------------------------------------
#
# Makefile for BlackMagic utilities
#
# For release version, use NDEBUG=
# Do "make depend" to update dependencies in this makefile
#
# -------------------------------------------------------------

include makefile.cfg


# -------------------------------------------------------------
# Autosearch paths macro's
# -------------------------------------------------------------

OBJDIR := ./obj
.path %.o $(OBJDIR)
.path %.map $(OBJDIR)

#.path % ../bin


# -------------------------------------------------------------
# Compilers and their options
# -------------------------------------------------------------

####### C compiler
CL = gcc
CC = gcc -c
CFLAGS = -Wall
INCLUDE = -I../glfw-3.3/include

####### Linker
LNK = gcc
LFLAGS = -L../glfw-3.3/lib


ifdef NDEBUG
# retail version
CFLAGS += -DNDEBUG
LFLAGS += -strip
else
# development version
CFLAGS += -g
LFLAGS += -g
endif

# -------------------------------------------------------------
# Inference rules
# -------------------------------------------------------------

%.o : %.c
$(CC) $(INCLUDE) $(CFLAGS) -o$(.TARGET) $(.SOURCE)


# -------------------------------------------------------------
# Project
# -------------------------------------------------------------

OBJLIST_BMDEBUG = bmdebug.o bmscan.o bmp-script.o elf-postlink.o \
guidriver.o minIni.o rs232.o \
specialfolder.o \
decodectf.o parsetsdl.o swotrace.o \
nuklear.o nuklear_glfw_gl2.o noc_file_dialog.o \
findfont.o lodepng.o

OBJLIST_BMFLASH = bmflash.o bmscan.o bmp-script.o bmp-support.o crc32.o \
elf-postlink.o gdb-rsp.o guidriver.o minIni.o rs232.o \
specialfolder.o xmltractor.o \
nuklear.o nuklear_glfw_gl2.o noc_file_dialog.o \
findfont.o lodepng.o

OBJLIST_BMTRACE = bmtrace.o bmscan.o bmp-script.o bmp-support.o crc32.o \
elf-postlink.o gdb-rsp.o guidriver.o minIni.o rs232.o \
specialfolder.o xmltractor.o \
decodectf.o parsetsdl.o swotrace.o \
nuklear.o nuklear_glfw_gl2.o noc_file_dialog.o \
findfont.o lodepng.o

project: bmdebug bmflash bmtrace bmscan elf-postlink tracegen

depend :
makedepend -b -fmakefile.dep $(OBJLIST_BMDEBUG:.o=.c) $(OBJLIST_BMFLASH:.o=.c) $(OBJLIST_BMTRACE:.o=.c)


##### C files #####

bmdebug.o : bmdebug.c

bmflash.o : bmflash.c

bmscan.o : bmscan.c

bmtrace.o : bmtrace.c

bmp-script.o : bmp-script.c

bmp-support.o : bmp-support.c

crc32.o : crc32.c

elf-postlink.o : elf-postlink.c

findfont.o : findfont.c

gdb-rsp.o : gdb-rsp.c

guidriver.o : guidriver.c

lodepng.o : lodepng.c

minIni.o : minIni.c

rs232.o : rs232.c

specialfolder.o : specialfolder.c

swotrace.o : swotrace.c

xmltractor.o : xmltractor.c

decodectf.o : decodectf.c

parsetsdl.o : parsetsdl.c

noc_file_dialog.o : CFLAGS += -DNOC_FILE_DIALOG_GTK
noc_file_dialog.o : INCLUDE += `pkg-config --cflags gtk+-3.0`
noc_file_dialog.o : noc_file_dialog.c

nuklear.o : nuklear.c

nuklear_glfw_gl2.o : nuklear_glfw_gl2.c


##### Executables #####

bmdebug : $(OBJLIST_BMDEBUG)
$(LNK) $(LFLAGS) -o$(.TARGET) $^ -lfontconfig -lglfw3 -lGL -lm -lbsd -ldl -lpthread -lX11 -lxcb -lXau -lXdmcp `pkg-config --libs gtk+-3.0` -lusb-1.0

bmflash : $(OBJLIST_BMFLASH)
$(LNK) $(LFLAGS) -o$(.TARGET) $^ -lfontconfig -lglfw3 -lGL -lm -lbsd -ldl -lpthread -lX11 -lxcb -lXau -lXdmcp `pkg-config --libs gtk+-3.0`

bmtrace : $(OBJLIST_BMTRACE)
$(LNK) $(LFLAGS) -o$(.TARGET) $^ -lfontconfig -lglfw3 -lGL -lm -lbsd -ldl -lpthread -lX11 -lxcb -lXau -lXdmcp `pkg-config --libs gtk+-3.0` -lusb-1.0

bmscan : bmscan.c
$(CL) $(INCLUDE) $(CFLAGS) -DSTANDALONE -o$(.TARGET) $(.SOURCES)

elf-postlink : elf-postlink.c
$(CL) $(INCLUDE) $(CFLAGS) -DSTANDALONE -o$(.TARGET) $(.SOURCES)

tracegen : tracegen.c parsetsdl.c
$(CL) $(INCLUDE) $(CFLAGS) -o$(.TARGET) $(.SOURCES) -lbsd


# put generated dependencies at the end, otherwise it does not blend well with
# inference rules, if an item also has an explicit rule.
-include makefile.dep

Loading

0 comments on commit df795b9

Please sign in to comment.