Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/no cmake #115

Merged
merged 4 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ include all the necessary files and define a few options.
* Source files in `src/cpp/mip/extras` as needed for your project
* Source files in `src/cpp/mip/metadata` if using metadata

Note: When using MSVC with C++, build the C and C++ code separately as libraries. Some C and C++ files
having the same name, and MSVC will try to compile both to the same object file. This causes one to
microstrain-sam marked this conversation as resolved.
Show resolved Hide resolved
be overwritten by the other.

#### Required #defines for building without CMake

Pass these to your compiler as appropriate, e.g. `arm-none-eabi-gcc -DMICROSTRAIN_TIMESTAMP_TYPE=uint32_t -DMICROSTRAIN_ENABLE_LOGGING=0`
Expand All @@ -196,6 +200,18 @@ MUST be consistent between compiling the MIP SDK and any other code which includ
headers from the MIP SDK. (If you change them after building, make sure everything gets
rebuilt properly. Normally CMake takes care of this for you).

#### Include directories
* `src/c`
* `src/cpp` (if using C++)
* `examples` (if building/using example code)

#### Other compiler settings
* C++14 or later is required (if using C++)
* For gcc: --std=c++14
* For msvc: /std:c++14
* Use C++17 or later if using metadata.
* If building TCP socket support on Windows, link against ws2_32.lib.

Known Issues
------------

Expand Down
2 changes: 1 addition & 1 deletion src/c/microstrain/connections/serial/serial_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ bool serial_port_open(serial_port *port, const char *port_str, int baudrate)
}

//Connect to the provided com port
port->handle = CreateFile(tmp_port_str, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
port->handle = CreateFileA(tmp_port_str, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
microstrain-sam marked this conversation as resolved.
Show resolved Hide resolved

// Ensure that the free() call in the following 'if' block doesn't clobber an error value
DWORD last_error = GetLastError();
Expand Down