Hi,
I am using acados to implement NMPC in Simulink 2021a and then build a real time application for dSPACE DS1403 (MABX III). I confirmed that acados is working correctly in Simulink simulation and the model with acados can be built using the dSPACE ConfigurationDesk software. However, when I download the .sdf file generated by ConfigurationDesk to ControlDesk, I get the following error:
ControlDesk MicroAutoBox III: Could not download real-time application:***.rta. (0x3B,11824)
It seems the error means that the application cannot be run in real time. I suspect that the problem comes from the Toolchain-dSpaceDS1403.cmake file which I have modified according to the recommended workflow. Can anyone offer some advice for this problem?
Thank you.
Hi,
have you tried following the workflow with the examples from the getting_started
folder (simulink_model_closed_loop.slx
and minimal_example_ocp.m
)?
There are several posts on the forum regarding MABX III, you should be able to find them easily.
If those don’t help, is there any additional information from the error output?
Kind regards,
Josip
Thank you for the suggestion!
I didn’t try the minimal example, but I doubt that the problem comes from the Matlab code or Simulink model because the model runs as expected in Simulink.
Most of the posts here regarding MABX III are about build issues, but the problem here is that the build is not suitable for the ControlDesk software from dSPACE. Without the acados block, the application runs on the MABX III just fine.
I suspect the problem is either 1) incompatible versions of acados/dSPACE software or 2) incorrect Toolchain settings. I would be grateful if someone could check the following information.
-
Environment version
PC OS: Windows10
CMake: cmake-3.31.1-windows-x86_64
acados: Install 2024.12
Matlab/Simulink: 2021A
Platform: dSPACE DS1403(MABX3)
dSPACE applications: RCP-HIL 2021.4
-
Toolchain setting
# Platform ds1403(MABX3)
# get below infomation from Configrationdesk(dSPACE RCPHIL 2021-A(Configrationdesk6.7 p4))
# Target compiler is "ARMV7-GNU" at "C:\Program Files\dSPACE RCPHIL 2021-A\Compiler\Linux440_550\target\arm-linux-gnueabihf"
SET(CMAKE_SYSTEM_NAME "dSpaceDS1403")
#list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
#SET(CMAKE_SYSTEM_PROCESSOR "ppc")
#SET(CMAKE_SYSTEM_PROCESSOR "arm")
SET(CMAKE_SYSTEM_PROCESSOR "ARMV7-GNU")
file(TO_CMAKE_PATH "C:/dSPACE_RCPHIL_2021A/" DSPACE_TOOLS)
set(DSPACE_RTLIB "C:/dSPACE_RCPHIL_2021A/DS1403/Lib")
set(DSPACE_COMPILER "${DSPACE_TOOLS}/Compiler/Linux440_550/target/arm-linux-gnueabihf")
# C Compiler
find_program(CMAKE_C_COMPILER NAMES ${DSPACE_COMPILER}/bin/arm-linux-gnueabihf-gcc.exe)
# C++ Compiler -- not used
find_program(CMAKE_CXX_COMPILER NAMES ${DSPACE_COMPILER}/bin/arm-linux-gnueabihf-g++.exe)
# Assembler
find_program(CMAKE_ASM_COMPILER NAMES ${DSPACE_COMPILER}/bin/arm-linux-gnueabihf-as.exe)
set(CMAKE_RANLIB ":")
#find_program(CMAKE_MAKE_PROGRAM NAMES "C:/dSPACE_RCPHIL_2021A/Exe/DSMAKE.exe")
find_program(CMAKE_MAKE_PROGRAM NAMES "C:/dSPACE_RCPHIL_2021A/DS1403/bin/DSMAKE.exe")
I see, thank you for the clarification. My initial though was to check the minimal example and make sure that the problem is not caused by, e.g., memory or runtime requirements when deploying on dSPACE.
Unfortunately, I can’t help much more for now since I haven’t gone through the whole process for our platform (MicroLabBox).
Perhaps you could directly ping some of the other users with more experience with MABX III.
Good luck,
Josip
Hi!
I am having the exact same problem as you except my system is:
PC OS: Windows11
Matlab/Simulink: 2023A
Platform: dSPACE DS1403(MABX3)
dSPACE applications: RCP-HIL 2023 A
ControlDesk gives me the same error 45% into the process of loading the .rta file once i try to do “go online”.
Have you had any progress regarding this issue?
Plus, I was wondering if ConfigurationDesk, ControlDesk and RTI are indeed the only dSpace products needed for this setup or if I may be missing any required product?
Here is my toolchain file for reference:
SET(CMAKE_SYSTEM_NAME "dSpaceDS1403")
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
set(CMAKE_SYSTEM_PROCESSOR "arm")
file(TO_CMAKE_PATH "C:/Users/USRG_SJ/Documents/acados/buildDS1403/dSPACE_RCPHIL_2023-A/" DSPACE_TOOLS)
set(DSPACE_RTLIB "${DSPACE_TOOLS}/DS1401/RTLib")
set(DSPACE_COMPILER "${DSPACE_TOOLS}/Compiler/Linux_4.14_GCC_10.3/target/arm-linux-gnueabihf")
# C Compiler
find_program(CMAKE_C_COMPILER NAMES ${DSPACE_COMPILER}/bin/arm-linux-gnueabihf-gcc.exe)
# C++ Compiler -- not used
find_program(CMAKE_CXX_COMPILER NAMES ${DSPACE_COMPILER}/bin/arm-linux-gnueabihf-gcc.exe)
# Assembler
find_program(CMAKE_ASM_COMPILER NAMES ${DSPACE_COMPILER}/bin/arm-linux-gnueabihf-as.exe)
set(CMAKE_RANLIB ":")
find_program(CMAKE_MAKE_PROGRAM NAMES "${DSPACE_TOOLS}/Exe/DSMAKE.exe")
SET(CMAKE_FIND_ROOT_PATH ${DSPACE_COMPILER})
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# Compiler flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${DSPACE_RTLIB}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${DSPACE_RTLIB}")
set(CMAKE_C_FLAGS "-D_INLINE" CACHE STRING "" FORCE)
# acados flags
set(BLASFEO_TARGET "GENERIC" CACHE STRING "BLASFEO Target architecture")
set(HPIPM_TARGET "GENERIC" CACHE STRING "HPIPM Target architecture")
set(BUILD_SHARED_LIBS OFF CACHE STRING "Build shared libraries")
set(BLASFEO_EXAMPLES OFF CACHE BOOL "Examples disabled")
set(EXT_DEP OFF CACHE BOOL "Compile external dependencies in BLASFEO")
set(ACADOS_INSTALL_DIR "install" CACHE PATH "Installation path to ACADOS_INSTALL_DIR")
# import from platform folder
set(CMAKE_IMPORT_LIBRARY_PREFIX "")
set(CMAKE_SHARED_LIBRARY_PREFIX "")
set(CMAKE_SHARED_MODULE_PREFIX "")
set(CMAKE_STATIC_LIBRARY_PREFIX "")
# set(CMAKE_EXECUTABLE_SUFFIX ".exe")
# set(CMAKE_IMPORT_LIBRARY_SUFFIX ".lib")
# set(CMAKE_SHARED_LIBRARY_SUFFIX ".lib")
# set(CMAKE_SHARED_MODULE_SUFFIX ".lib")
# set(CMAKE_STATIC_LIBRARY_SUFFIX ".lib")
# GCC-compatible file suffixes
set(CMAKE_EXECUTABLE_SUFFIX "") # No .exe on embedded Linux
set(CMAKE_IMPORT_LIBRARY_SUFFIX ".a")
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
set(CMAKE_SHARED_MODULE_SUFFIX ".so")
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
# set(CMAKE_C_FLAGS "\"-J${DSPACE_RTLIB}\"")
set(CMAKE_INCLUDE_FLAG_C "-I")
set(CMAKE_INCLUDE_FLAG_CXX "-I")
# add_definitions(-D__MABX2__)
remove_definitions(-DLINUX)
remove_definitions(-DOS_WINDOWS)
remove_definitions(-D__LINUX__)
also i had to run
cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-dSpaceDS1403.cmake" -DCMAKE_INSTALL_PREFIX=install ../
instead of
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-dSPACEDS1403.cmake -G "Unix Makefiles" -S ../ -B ./