Skip to content

Commit

Permalink
replace flag __DSPACE__ with __MABX2__ , since adaptions are very spe…
Browse files Browse the repository at this point in the history
…cific to this platform
  • Loading branch information
FreyJo committed Aug 31, 2021
1 parent 563c50b commit 4676d35
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion acados/utils/math.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include "acados/utils/math.h"
#include "acados/utils/types.h"

#if defined(__DSPACE__)
#if defined(__MABX2__)
double fmax(double a, double b)
{
return a > b ? a : b;
Expand Down
2 changes: 1 addition & 1 deletion acados/utils/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ extern "C" {

#include "acados/utils/types.h"

#if defined(__DSPACE__)
#if defined(__MABX2__)
double fmax(double a, double b);
#endif

Expand Down
2 changes: 1 addition & 1 deletion acados/utils/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

// external
#include <assert.h>
#if defined(__DSPACE__)
#if defined(__MABX2__)
#include <brtenv.h>
#define printf(...) \
msg_info_printf(MSG_SM_USER, 0, __VA_ARGS__); \
Expand Down
2 changes: 1 addition & 1 deletion acados/utils/timing.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ real_t acados_toc(acados_timer* t)
return (real_t) duration / 1e9;
}

#elif defined(__DSPACE__)
#elif defined(__MABX2__)

void acados_tic(acados_timer* t)
{
Expand Down
2 changes: 1 addition & 1 deletion acados/utils/timing.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ typedef struct acados_timer_
mach_timebase_info_data_t tinfo;
} acados_timer;

#elif defined(__DSPACE__)
#elif defined(__MABX2__)

#include <brtenv.h>

Expand Down
2 changes: 1 addition & 1 deletion cmake/Platform/dSpaceDS1401.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ set(CMAKE_C_FLAGS "\"-J${DSPACE_RTLIB}\"")
set(CMAKE_INCLUDE_FLAG_C "-J")
set(CMAKE_INCLUDE_FLAG_CXX "-J")

add_definitions(-D__DSPACE__)
add_definitions(-D__MABX2__)
remove_definitions(-DLINUX)
remove_definitions(-D__LINUX__)
2 changes: 2 additions & 0 deletions cmake/Toolchain-dSpaceDS1401.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

add_definitions(-D__MABX2__)

# Compiler flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -H -J{DSPACE_RTLIB}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -H -J{DSPACE_RTLIB}")
Expand Down

0 comments on commit 4676d35

Please sign in to comment.