Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions Makefile.am

This file was deleted.

22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,23 @@ making it an invaluable asset for engineers working on complex projects.
3. libwinpthread-1.dll - pthread library for POSIX thread support.
4. libstdc++-6.dll - GNU Standard C++ library providing standard C++ library functions.

On Windows you'll want to grab:
```
choco install meson ninja pkgconfiglite
```

As well as a version of Visual Studio build tools, which are installed as part of the VS installer workflow.

## Building EUD:

1. autoreconf --verbose --force --install
2. ./configure --enable-dll (Ignore --enable-dll if building on linux)
3. make
```
# Windows prerequisite
mkdir subprojects
meson wrap install libusb

# On all platforms
meson build
ninja -C build
```

## License:
EUD is licensed on the GPL-2.0 OR BSD 3-clause "New" or "Revised" License. Check out the [LICENSE](LICENSE.txt) for more details.
EUD is licensed on the GPL-2.0 OR BSD 3-clause "New" or "Revised" License. Check out the [LICENSE](LICENSE.txt) for more details.
62 changes: 0 additions & 62 deletions configure.ac

This file was deleted.

4 changes: 2 additions & 2 deletions inc/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <string>

#if defined ( EUD_WIN_ENV )
#include <wtypes.h>
#include <windows.h>
#include <conio.h>
#include <winioctl.h>
#include <libusb-1.0/libusb.h>
#include <libusb.h>
#endif

#ifdef __cplusplus
Expand Down
41 changes: 41 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
project('eud',
'cpp',
version: '0.1',
# default_options: ['warning_level=1', 'buildtype=release']
)
libeud_srcs = [
'src/eud_error_defines.cpp',
'src/usb.cpp',
'src/device_manager.cpp',
'src/general_api_processing.cpp',
'src/rw_childprocess.cpp',
'src/eud.cpp',
'src/eud_api.cpp',
'src/jtag_eud.cpp',
'src/jtag_api.cpp',
'src/jtag_test.cpp',
'src/com_eud.cpp',
'src/com_api.cpp',
'src/ctl_eud.cpp',
'src/ctl_api.cpp',
'src/trc_eud.cpp',
'src/trc_api.cpp',
'src/swd_eud.cpp',
'src/swd_api.cpp',
]

if build_machine.system() == 'windows'
shared_library('eud',
libeud_srcs,
version: meson.project_version(),
dependencies: dependency('libusb-1.0'),
include_directories : include_directories('inc'),
)
else
static_library('eud',
libeud_srcs,
dependencies: dependency('libusb-1.0'),
include_directories : include_directories('inc'),
cpp_args: '-Wno-narrowing', # TODO: drop me
)
endif
4 changes: 3 additions & 1 deletion src/jtag_eud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

#include "eud.h"
#include "jtag_eud.h"

#include <algorithm>
#include <string>
#include <math.h>
#include <stdlib.h>
Expand Down Expand Up @@ -1102,7 +1104,7 @@ JtagEudDevice::BitsFreeTdi()
uint32_t available_in = ((JTAG_IN_BUFFER_SIZE - usb_num_bytes_pending_in_) * 8) - (full_in + partial_in);

#if defined ( EUD_WIN_ENV )
return std::min(available_out, available_in);
return min(available_out, available_in);
#elif defined (EUD_LNX_ENV)
return std::min(available_out, available_in);
Comment on lines +1107 to 1109
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these two defined distinctly from one another on the baseline?

And @quic-kdybcio - why add this difference for EUD_WIN_ENV? How does it fail with std::min() instead?

Aside: we should probably explicitly include stdint.h for the sake of these types. Unless I missed it in there somewhere.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@androm3da I purposefully touched the questionable code just enough to make it compile.. that said, it's going to need quite some cleanup, if not a rewrite, to be considered maintainable...

#endif
Expand Down
1 change: 0 additions & 1 deletion src/usb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <sstream>
#include <fstream>
#include <string>
#include "libusb-1.0/libusb.h"
#if defined ( EUD_WIN_ENV )
#include <ctime>
#endif
Expand Down