Alright folks,
Following Tommy's advise, I updated root level Confgure.ac, and added below
commands in the Makefile.am file at "src/jtag/drivers/"
noinst_LTLIBRARIES += %D%/libocdjtagdrivers.la
%C%_libocdjtagdrivers_la_LIBADD =
%C%_libocdjtagdrivers_la_LDFLAGS
if EUD
DRIVERFILES += %D%/eud.c
%C%_libocdjtagdrivers_la_LIBADD += -L%D%/eud -leud
%C%_libocdjtagdrivers_la_LDFLAGS += -Wl, -v
endif
The compilation was successful. Before testing this out, I wanted to see if
there is a way to see if our eud.lll linkage was done successfully or not. I
googled around and found _a_ command to check this out. Below is the output of
the command. I dont see EUD.dll in there. One of the critic I read is that this
command only list direct dependency, not any indirect ones.
My question is if there is any way to figure this out to list all the DLL
dependency for OpenOCD.exe?
c:\github\riscv-openocd\src>dumpbin /dependents openocd.exe
Microsoft (R) COFF/PE Dumper Version 14.14.26429.4
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file openocd.exe
File Type: EXECUTABLE IMAGE
Image has the following dependencies:
cygwin1.dll
cygftdi1-2.dll
cyghidapi-0.dll
cygusb-1.0.dll
cygusb0.dll
KERNEL32.dll
Summary
81000 .bss
1000 .buildid
17000 .data
47000 .debug_abbrev
4000 .debug_aranges
4B000 .debug_frame
611000 .debug_info
7A000 .debug_line
1000 .debug_loc
4000 .debug_ranges
1D000 .debug_str
3000 .idata
13000 .pdata
C4000 .rdata
1000 .rsrc
23A000 .text
13000 .xdata
Thanks,
Jay
-----------------------
Love All, Serve All
-----------------------
On 7/9/2018 10:48:42 PM, Tommy Murphy <[email protected]> wrote:
If you want to have a configure option to control whether or not your JTAG
driver gets built and your lib/DLL gets linked then you need to modify the
configure.ac [http://configure.ac] file at the root of the OpenOCD tree.
Then you can use that option in the relevant Makefile.am [http://Makefile.am]
to control things.
Looking at existing options in these files should guide you.
Hope this helps.
On Jay <[email protected]>, 10 Jul 2018 1:53 am wrote:
Greetings Tommy,
Yes, I've looked at the link you provided earlier. I do have 1) headers, 2)
.lib, and 3) .dll files.
I guess my question is what (and how) Makefiles, configure files I'd have to
edit to link with this library.
For example, I see that in order to link with LIBFTDI, there are quite a few
places it is mentioned in order to derive "LIBFTDI_LIB" variable in the
makefile. I'm assuming that I will have to do something similar, no?
after running ./configure, I see below,
../config.status:S["LIBFTDI_LIBS"]="-LC:/msys64/mingw64/bin
-LC:/msys64/mingw64/lib -lftdi1 -lusb-1.0"
src/jtag/drivers/Makefile.am
if USE_LIBFTDI
43 %C%_libocdjtagdrivers_la_CPPFLAGS += $(LIBFTDI_CFLAGS)
44 %C%_libocdjtagdrivers_la_LIBADD += $(LIBFTDI_LIBS)
45 endif
similarly, I'd probably have below, and somehow figure out how to setup
"USE_LIBEUD", no?
if USE_LIBEUD
%C%_libocdjtagdrivers_la_CPPFLAGS += $(LIBEUD_CFLAGS)
%C%_libocdjtagdrivers_la_LIBADD += $(LIBEUD_LIBS)
endif
Thanks,
Jay
-----------------------
Love All, Serve All
-----------------------
On Mon, Jul 9, 2018 at 5:31 PM Tommy Murphy <[email protected]
[mailto:[email protected]]> wrote:
For example...
https://msdn.microsoft.com/en-us/library/9yd93633.aspx
[https://msdn.microsoft.com/en-us/library/9yd93633.aspx]
On Mon, Jul 9, 2018 at 5:30 PM Tommy Murphy <[email protected]
[mailto:[email protected]]> wrote:
Your question is not that clear to me.
You seem to be asking "how can I use/link to a DLL?".
Is that correct?
Usually you'll need an import library to link to unless you're using completely
dynamic loading and resolution of API entry points.
But ultimately this is not really an OpenOCD specific question/issue as far as
I can see and is covered adequately elsewhere if you do a little
searching/research.
Hope this helps.
On Jay <[email protected] [mailto:[email protected]]>, 10 Jul
2018 12:21 am wrote:
Greetings,
I'm trying to add support for a new JTAG/SWD interface adapter called EUD
(embedded usb debugger) for openOCD. I'm adding a source file (eud.c) in
"src/jtag/drivers/" folder. I'm using proprietary "headers" and supplied DLL
file to link with my source.
Here is the topology I have.
src/jtag/drivers/
eud.c //my source file
eud/ //folder containing headers and DLL
*.h
eud.dll
I'm looking for if what kind of makefile changes I'd need to compile and link
with this DLL file. Can someone please help me or point me to any example
makefile(s) setup?
Thanks,
Jay
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel