- Open the command window and navigate to the folder where your makefile is located.
- Execute the following command to run the makefile with‘mingw32-make.exe’:
Run a makefile created by simulink
22 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am doing a simple project and i try to run a makefile (Projects.mk) that is generated when i compiled code. I try to use bash cmd and gcc tools that i found in internet but nothing works. I can't run the makefile. Do anyone can take me how to run the matlab makefile? Thanks so much. Sorry for my bad english. This .mk code below:. I want to know the general method to run the makefile file. It will help me a lot. I have try to find solution for 3 days :((
###########################################################################
## Makefile generated for Simulink model 'ADC_Arduino'.
##
## Makefile : ADC_Arduino.mk
## Generated on : Thu Mar 14 13:51:19 2024
## MATLAB Coder version: 5.0 (R2020a)
##
## Build Info:
##
## Final product: $(RELATIVE_PATH_TO_ANCHOR)/ADC_Arduino.elf
## Product type : executable
## Build type : Top-Level Standalone Executable
##
###########################################################################
###########################################################################
## MACROS
###########################################################################
# Macro Descriptions:
# PRODUCT_NAME Name of the system to build
# MAKEFILE Name of this makefile
PRODUCT_NAME = ADC_Arduino
MAKEFILE = ADC_Arduino.mk
MATLAB_ROOT = C:/PROGRA~1/POLYSP~1/R2020a
MATLAB_BIN = C:/PROGRA~1/POLYSP~1/R2020a/bin
MATLAB_ARCH_BIN = $(MATLAB_BIN)/win64
MASTER_ANCHOR_DIR =
START_DIR = D:/Simulink_Matlab/ADC_Texas
SOLVER =
SOLVER_OBJ =
CLASSIC_INTERFACE = 0
TGT_FCN_LIB = None
MODEL_HAS_DYNAMICALLY_LOADED_SFCNS = 0
RELATIVE_PATH_TO_ANCHOR = ..
C_STANDARD_OPTS =
CPP_STANDARD_OPTS =
###########################################################################
## TOOLCHAIN SPECIFICATIONS
###########################################################################
# Toolchain Name: Arduino AVR
# Supported Version(s):
# ToolchainInfo Version: 2020a
# Specification Revision: 1.0
#
#-------------------------------------------
# Macros assumed to be defined elsewhere
#-------------------------------------------
# ARDUINO_ROOT
# ARDUINO_PORT
# ARDUINO_MCU
# ARDUINO_BAUD
# ARDUINO_PROTOCOL
# ARDUINO_F_CPU
#-----------
# MACROS
#-----------
SHELL = %SystemRoot%/system32/cmd.exe
PRODUCT_HEX = $(RELATIVE_PATH_TO_ANCHOR)/$(PRODUCT_NAME).hex
PRODUCT_BIN = $(RELATIVE_PATH_TO_ANCHOR)/$(PRODUCT_NAME).eep
ARDUINO_TOOLS = $(ARDUINO_ROOT)/hardware/tools/avr/bin
ELF2EEP_OPTIONS = -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
DOWNLOAD_ARGS = >tmp.trash 2>&1 -P$(ARDUINO_PORT) -V -q -q -q -q -F -C$(ARDUINO_ROOT)/hardware/tools/avr/etc/avrdude.conf -p$(ARDUINO_MCU) -c$(ARDUINO_PROTOCOL) -b$(ARDUINO_BAUD) -D -Uflash:w:
SLIB_PATH = C:/Users/lenovo/DOCUME~1/MATLAB/R2020a/ARDUIN~1/ARDUIN~1/FASTER~1
TOOLCHAIN_SRCS =
TOOLCHAIN_INCS =
TOOLCHAIN_LIBS = -lm -lcore
#------------------------
# BUILD TOOL COMMANDS
#------------------------
# Assembler: Arduino AVR Assembler
AS_PATH = $(ARDUINO_TOOLS)
AS = "$(AS_PATH)/avr-gcc"
# C Compiler: Arduino AVR C Compiler
CC_PATH = $(ARDUINO_TOOLS)
CC = "$(CC_PATH)/avr-gcc"
# Linker: Arduino AVR Linker
LD_PATH = $(ARDUINO_TOOLS)
LD = "$(LD_PATH)/avr-gcc"
# C++ Compiler: Arduino AVR C++ Compiler
CPP_PATH = $(ARDUINO_TOOLS)
CPP = "$(CPP_PATH)/avr-g++"
# C++ Linker: Arduino AVR C++ Linker
CPP_LD_PATH = $(ARDUINO_TOOLS)
CPP_LD = "$(CPP_LD_PATH)/avr-gcc"
# Archiver: Arduino AVR Archiver
AR_PATH = $(ARDUINO_TOOLS)
AR = "$(AR_PATH)/avr-ar"
# MEX Tool: MEX Tool
MEX_PATH = $(MATLAB_ARCH_BIN)
MEX = "$(MEX_PATH)/mex"
# Binary Converter: Binary Converter
OBJCOPY_PATH = $(ARDUINO_ROOT)/hardware/tools/avr/bin
OBJCOPY = "$(OBJCOPY_PATH)/avr-objcopy"
# Hex Converter: Hex Converter
OBJCOPY_PATH = $(ARDUINO_ROOT)/hardware/tools/avr/bin
OBJCOPY = "$(OBJCOPY_PATH)/avr-objcopy"
# Download: Download
DOWNLOAD_PATH = $(ARDUINO_TOOLS)
DOWNLOAD = "$(DOWNLOAD_PATH)/avrdude"
# Execute: Execute
EXECUTE = $(PRODUCT)
# Builder: Make Tool
MAKE_PATH = %MATLAB%\bin\win64
MAKE = "$(MAKE_PATH)/gmake"
#-------------------------
# Directives/Utilities
#-------------------------
ASDEBUG = -g
AS_OUTPUT_FLAG = -o
CDEBUG = -g
C_OUTPUT_FLAG = -o
LDDEBUG = -g
OUTPUT_FLAG = -o
CPPDEBUG = -g
CPP_OUTPUT_FLAG = -o
CPPLDDEBUG = -g
OUTPUT_FLAG = -o
ARDEBUG =
STATICLIB_OUTPUT_FLAG =
MEX_DEBUG = -g
RM =
ECHO = echo
MV =
RUN =
#--------------------------------------
# "Faster Runs" Build Configuration
#--------------------------------------
ARFLAGS = rcs
ASFLAGS = -MMD -MP -MF"$(@:%.o=%.dep)" -MT"$@" \
-Wall \
-x assembler-with-cpp \
$(ASFLAGS_ADDITIONAL) \
$(DEFINES) \
$(INCLUDES) \
-c
OBJCOPYFLAGS_BIN = $(ELF2EEP_OPTIONS) $(PRODUCT) $(PRODUCT_BIN)
CFLAGS = -std=gnu11 \
-c \
-w \
-ffunction-sections \
-fdata-sections \
-MMD \
-DARDUINO=10801 \
-MMD -MP -MF"$(@:%.o=%.dep)" -MT"$@" \
-Os
CPPFLAGS = -std=gnu++11 -fpermissive -fno-exceptions -fno-threadsafe-statics \
-c \
-w \
-ffunction-sections \
-fdata-sections \
-MMD \
-DARDUINO=10801 \
-MMD -MP -MF"$(@:%.o=%.dep)" -MT"$@" \
-Os
CPP_LDFLAGS = -w -Os -Wl,--gc-sections,--relax
CPP_SHAREDLIB_LDFLAGS =
DOWNLOAD_FLAGS = $(DOWNLOAD_ARGS)$(PRODUCT_HEX):i
EXECUTE_FLAGS =
OBJCOPYFLAGS_HEX = -O ihex -R .eeprom $(PRODUCT) $(PRODUCT_HEX)
LDFLAGS = -w -Os -Wl,--gc-sections,--relax
MEX_CPPFLAGS =
MEX_CPPLDFLAGS =
MEX_CFLAGS =
MEX_LDFLAGS =
MAKE_FLAGS = -f $(MAKEFILE)
SHAREDLIB_LDFLAGS =
###########################################################################
## OUTPUT INFO
###########################################################################
PRODUCT = $(RELATIVE_PATH_TO_ANCHOR)/ADC_Arduino.elf
PRODUCT_TYPE = "executable"
BUILD_TYPE = "Top-Level Standalone Executable"
###########################################################################
## INCLUDE PATHS
###########################################################################
INCLUDES_BUILDINFO = -I$(START_DIR) -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2020a/toolbox/target/shared/svd/include -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2020a/toolbox/target/SUPPOR~1/ARDUIN~2/include -I$(START_DIR)/ADC_Arduino_ert_rtw -I$(MATLAB_ROOT)/extern/include -I$(MATLAB_ROOT)/simulink/include -I$(MATLAB_ROOT)/rtw/c/src -I$(MATLAB_ROOT)/rtw/c/src/ext_mode/common -I$(MATLAB_ROOT)/rtw/c/ert -I$(MATLAB_ROOT)/toolbox/coder/rtiostream/src -I$(MATLAB_ROOT)/toolbox/coder/rtiostream/src/utils -I$(ARDUINO_ROOT)/hardware/arduino/avr/cores/arduino -I$(ARDUINO_ROOT)/hardware/arduino/avr/variants/mega -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2020a/toolbox/target/SUPPOR~1/ARDUIN~1/include -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2020a/toolbox/target/SUPPOR~1/ARDUIN~1/SCHEDU~1/include -I$(ARDUINO_ROOT)/hardware/tools/avr/avr/include/avr -IC:/PROGRA~3/MATLAB/SUPPOR~1/R2020a/toolbox/target/shared/EXTERN~1/include
INCLUDES = $(INCLUDES_BUILDINFO)
###########################################################################
## DEFINES
###########################################################################
DEFINES_ = -DMODEL=ADC_Arduino -DNUMST=2 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -DON_TARGET_WAIT_FOR_START=1 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DEXT_MODE=1 -DINTEGER_CODE=0 -DMT=1 -DXCP_CUSTOM_PLATFORM -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -DMW_TIMERID=5 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=64911 -DMW_SCHEDULERCOUNTER=1 -D_RTT_BAUDRATE_SERIAL0_=9600 -D_RTT_BAUDRATE_SERIAL1_=9600 -D_RTT_BAUDRATE_SERIAL2_=9600 -D_RTT_BAUDRATE_SERIAL3_=9600 -D_RTT_ANALOG_REF_=0
DEFINES_BUILD_ARGS = -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DEXT_MODE=1 -DINTEGER_CODE=0 -DMT=1
DEFINES_CUSTOM =
DEFINES_OPTS = -DON_TARGET_WAIT_FOR_START=1 -DTID01EQ=0
DEFINES_SKIPFORSIL = -DXCP_CUSTOM_PLATFORM -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -DRT
DEFINES_STANDARD = -DMODEL=ADC_Arduino -DNUMST=2 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0
DEFINES = $(DEFINES_) $(DEFINES_BUILD_ARGS) $(DEFINES_CUSTOM) $(DEFINES_OPTS) $(DEFINES_SKIPFORSIL) $(DEFINES_STANDARD)
###########################################################################
## SOURCE FILES
###########################################################################
SRCS = C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinobase/src/MW_PWM.cpp C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinobase/src/MW_PWMDriver.c C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinobase/src/ArduinoPinHandleMap.cpp C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinobase/src/MW_AnalogInput.cpp $(START_DIR)/ADC_Arduino_ert_rtw/ADC_Arduino.c $(START_DIR)/ADC_Arduino_ert_rtw/ADC_Arduino_data.c $(MATLAB_ROOT)/rtw/c/src/ext_mode/common/updown.c $(MATLAB_ROOT)/rtw/c/src/ext_mode/common/ext_work.c $(MATLAB_ROOT)/toolbox/coder/rtiostream/src/utils/rtiostream_utils.c C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinotarget/registry/../src/MW_ArduinoHWInit.cpp C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinobase/src/io_wrappers.cpp C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinotarget/registry/../scheduler/src/arduinoAVRScheduler.cpp $(MATLAB_ROOT)/rtw/c/src/ext_mode/common/rtiostream_interface.c C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/shared/externalmode_daemon/src/ext_svr_daemon.c C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinotarget/registry/../src/rtiostream_serial_daemon.cpp C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/shared/externalmode_daemon/src/daemon_checksum.c
MAIN_SRC = $(START_DIR)/ADC_Arduino_ert_rtw/ert_main.c
ALL_SRCS = $(SRCS) $(MAIN_SRC)
###########################################################################
## OBJECTS
###########################################################################
OBJS = MW_PWM.o MW_PWMDriver.o ArduinoPinHandleMap.o MW_AnalogInput.o ADC_Arduino.o ADC_Arduino_data.o updown.o ext_work.o rtiostream_utils.o MW_ArduinoHWInit.o io_wrappers.o arduinoAVRScheduler.o rtiostream_interface.o ext_svr_daemon.o rtiostream_serial_daemon.o daemon_checksum.o
MAIN_OBJ = ert_main.o
ALL_OBJS = $(OBJS) $(MAIN_OBJ)
###########################################################################
## PREBUILT OBJECT FILES
###########################################################################
PREBUILT_OBJS =
###########################################################################
## LIBRARIES
###########################################################################
LIBS = $(SLIB_PATH)/MW_RebuildSrc_Core.o
###########################################################################
## SYSTEM LIBRARIES
###########################################################################
SYSTEM_LIBS =
###########################################################################
## ADDITIONAL TOOLCHAIN FLAGS
###########################################################################
#---------------
# C Compiler
#---------------
CFLAGS_SKIPFORSIL = -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_MEGA2560_
CFLAGS_BASIC = $(DEFINES) $(INCLUDES)
CFLAGS += $(CFLAGS_SKIPFORSIL) $(CFLAGS_BASIC)
#-----------------
# C++ Compiler
#-----------------
CPPFLAGS_SKIPFORSIL = -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_MEGA2560_
CPPFLAGS_BASIC = $(DEFINES) $(INCLUDES)
CPPFLAGS += $(CPPFLAGS_SKIPFORSIL) $(CPPFLAGS_BASIC)
#---------------
# C++ Linker
#---------------
CPP_LDFLAGS_ = -L"$(SLIB_PATH)"
CPP_LDFLAGS_SKIPFORSIL = -mmcu=atmega2560
CPP_LDFLAGS += $(CPP_LDFLAGS_) $(CPP_LDFLAGS_SKIPFORSIL)
#------------------------------
# C++ Shared Library Linker
#------------------------------
CPP_SHAREDLIB_LDFLAGS_ = -L"$(SLIB_PATH)"
CPP_SHAREDLIB_LDFLAGS_SKIPFORSIL = -mmcu=atmega2560
CPP_SHAREDLIB_LDFLAGS += $(CPP_SHAREDLIB_LDFLAGS_) $(CPP_SHAREDLIB_LDFLAGS_SKIPFORSIL)
#-----------
# Linker
#-----------
LDFLAGS_ = -L"$(SLIB_PATH)"
LDFLAGS_SKIPFORSIL = -mmcu=atmega2560
LDFLAGS += $(LDFLAGS_) $(LDFLAGS_SKIPFORSIL)
#--------------------------
# Shared Library Linker
#--------------------------
SHAREDLIB_LDFLAGS_ = -L"$(SLIB_PATH)"
SHAREDLIB_LDFLAGS_SKIPFORSIL = -mmcu=atmega2560
SHAREDLIB_LDFLAGS += $(SHAREDLIB_LDFLAGS_) $(SHAREDLIB_LDFLAGS_SKIPFORSIL)
###########################################################################
## INLINED COMMANDS
###########################################################################
DERIVED_SRCS = $(subst .o,.dep,$(OBJS))
build:
%.dep:
-include codertarget_assembly_flags.mk
-include *.dep
###########################################################################
## PHONY TARGETS
###########################################################################
.PHONY : all build buildobj clean info prebuild postbuild download execute
all : build postbuild
echo "### Successfully generated all binary outputs."
build : prebuild $(PRODUCT)
buildobj : prebuild $(OBJS) $(PREBUILT_OBJS) $(LIBS)
echo "### Successfully generated all binary outputs."
prebuild :
postbuild : $(PRODUCT)
echo "### Invoking postbuild tool "Binary Converter" ..."
$(OBJCOPY) $(OBJCOPYFLAGS_BIN)
echo "### Done invoking postbuild tool."
echo "### Invoking postbuild tool "Hex Converter" ..."
$(OBJCOPY) $(OBJCOPYFLAGS_HEX)
echo "### Done invoking postbuild tool."
download : postbuild
echo "### Invoking postbuild tool "Download" ..."
$(DOWNLOAD) $(DOWNLOAD_FLAGS)
echo "### Done invoking postbuild tool."
execute : download
echo "### Invoking postbuild tool "Execute" ..."
$(EXECUTE) $(EXECUTE_FLAGS)
echo "### Done invoking postbuild tool."
###########################################################################
## FINAL TARGET
###########################################################################
#-------------------------------------------
# Create a standalone executable
#-------------------------------------------
$(PRODUCT) : $(OBJS) $(PREBUILT_OBJS) $(LIBS) $(MAIN_OBJ)
echo "### Creating standalone executable "$(PRODUCT)" ..."
$(CPP_LD) $(CPP_LDFLAGS) -o $(PRODUCT) $(OBJS) $(MAIN_OBJ) $(LIBS) $(SYSTEM_LIBS) $(TOOLCHAIN_LIBS)
echo "### Created: $(PRODUCT)"
###########################################################################
## INTERMEDIATE TARGETS
###########################################################################
#---------------------
# SOURCE-TO-OBJECT
#---------------------
%.o : %.c
$(CC) $(CFLAGS) -o "$@" "$<"
%.S.o : %.s
$(AS) $(ASFLAGS) -o "$@" "$<"
%.S.o : %.S
$(AS) $(ASFLAGS) -o "$@" "$<"
%.o : %.cpp
$(CPP) $(CPPFLAGS) -o "$@" "$<"
%.o : $(RELATIVE_PATH_TO_ANCHOR)/%.c
$(CC) $(CFLAGS) -o "$@" "$<"
%.S.o : $(RELATIVE_PATH_TO_ANCHOR)/%.s
$(AS) $(ASFLAGS) -o "$@" "$<"
%.S.o : $(RELATIVE_PATH_TO_ANCHOR)/%.S
$(AS) $(ASFLAGS) -o "$@" "$<"
%.o : $(RELATIVE_PATH_TO_ANCHOR)/%.cpp
$(CPP) $(CPPFLAGS) -o "$@" "$<"
%.o : $(START_DIR)/%.c
$(CC) $(CFLAGS) -o "$@" "$<"
%.S.o : $(START_DIR)/%.s
$(AS) $(ASFLAGS) -o "$@" "$<"
%.S.o : $(START_DIR)/%.S
$(AS) $(ASFLAGS) -o "$@" "$<"
%.o : $(START_DIR)/%.cpp
$(CPP) $(CPPFLAGS) -o "$@" "$<"
%.o : C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinobase/src/%.c
$(CC) $(CFLAGS) -o "$@" "$<"
%.S.o : C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinobase/src/%.s
$(AS) $(ASFLAGS) -o "$@" "$<"
%.S.o : C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinobase/src/%.S
$(AS) $(ASFLAGS) -o "$@" "$<"
%.o : C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinobase/src/%.cpp
$(CPP) $(CPPFLAGS) -o "$@" "$<"
%.o : $(START_DIR)/ADC_Arduino_ert_rtw/%.c
$(CC) $(CFLAGS) -o "$@" "$<"
%.S.o : $(START_DIR)/ADC_Arduino_ert_rtw/%.s
$(AS) $(ASFLAGS) -o "$@" "$<"
%.S.o : $(START_DIR)/ADC_Arduino_ert_rtw/%.S
$(AS) $(ASFLAGS) -o "$@" "$<"
%.o : $(START_DIR)/ADC_Arduino_ert_rtw/%.cpp
$(CPP) $(CPPFLAGS) -o "$@" "$<"
%.o : $(MATLAB_ROOT)/rtw/c/src/%.c
$(CC) $(CFLAGS) -o "$@" "$<"
%.S.o : $(MATLAB_ROOT)/rtw/c/src/%.s
$(AS) $(ASFLAGS) -o "$@" "$<"
%.S.o : $(MATLAB_ROOT)/rtw/c/src/%.S
$(AS) $(ASFLAGS) -o "$@" "$<"
%.o : $(MATLAB_ROOT)/rtw/c/src/%.cpp
$(CPP) $(CPPFLAGS) -o "$@" "$<"
%.o : $(MATLAB_ROOT)/simulink/src/%.c
$(CC) $(CFLAGS) -o "$@" "$<"
%.S.o : $(MATLAB_ROOT)/simulink/src/%.s
$(AS) $(ASFLAGS) -o "$@" "$<"
%.S.o : $(MATLAB_ROOT)/simulink/src/%.S
$(AS) $(ASFLAGS) -o "$@" "$<"
%.o : $(MATLAB_ROOT)/simulink/src/%.cpp
$(CPP) $(CPPFLAGS) -o "$@" "$<"
%.o : $(MATLAB_ROOT)/rtw/c/src/ext_mode/common/%.c
$(CC) $(CFLAGS) -o "$@" "$<"
%.S.o : $(MATLAB_ROOT)/rtw/c/src/ext_mode/common/%.s
$(AS) $(ASFLAGS) -o "$@" "$<"
%.S.o : $(MATLAB_ROOT)/rtw/c/src/ext_mode/common/%.S
$(AS) $(ASFLAGS) -o "$@" "$<"
%.o : $(MATLAB_ROOT)/rtw/c/src/ext_mode/common/%.cpp
$(CPP) $(CPPFLAGS) -o "$@" "$<"
%.o : $(MATLAB_ROOT)/toolbox/coder/rtiostream/src/utils/%.c
$(CC) $(CFLAGS) -o "$@" "$<"
%.S.o : $(MATLAB_ROOT)/toolbox/coder/rtiostream/src/utils/%.s
$(AS) $(ASFLAGS) -o "$@" "$<"
%.S.o : $(MATLAB_ROOT)/toolbox/coder/rtiostream/src/utils/%.S
$(AS) $(ASFLAGS) -o "$@" "$<"
%.o : $(MATLAB_ROOT)/toolbox/coder/rtiostream/src/utils/%.cpp
$(CPP) $(CPPFLAGS) -o "$@" "$<"
MW_PWM.o : C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinobase/src/MW_PWM.cpp
$(CPP) $(CPPFLAGS) -o "$@" "$<"
MW_PWMDriver.o : C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinobase/src/MW_PWMDriver.c
$(CC) $(CFLAGS) -o "$@" "$<"
ArduinoPinHandleMap.o : C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinobase/src/ArduinoPinHandleMap.cpp
$(CPP) $(CPPFLAGS) -o "$@" "$<"
MW_AnalogInput.o : C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinobase/src/MW_AnalogInput.cpp
$(CPP) $(CPPFLAGS) -o "$@" "$<"
ADC_Arduino.o : $(START_DIR)/ADC_Arduino_ert_rtw/ADC_Arduino.c
$(CC) $(CFLAGS) -o "$@" "$<"
ADC_Arduino_data.o : $(START_DIR)/ADC_Arduino_ert_rtw/ADC_Arduino_data.c
$(CC) $(CFLAGS) -o "$@" "$<"
ert_main.o : $(START_DIR)/ADC_Arduino_ert_rtw/ert_main.c
$(CC) $(CFLAGS) -o "$@" "$<"
updown.o : $(MATLAB_ROOT)/rtw/c/src/ext_mode/common/updown.c
$(CC) $(CFLAGS) -o "$@" "$<"
ext_work.o : $(MATLAB_ROOT)/rtw/c/src/ext_mode/common/ext_work.c
$(CC) $(CFLAGS) -o "$@" "$<"
rtiostream_utils.o : $(MATLAB_ROOT)/toolbox/coder/rtiostream/src/utils/rtiostream_utils.c
$(CC) $(CFLAGS) -o "$@" "$<"
MW_ArduinoHWInit.o : C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinotarget/registry/../src/MW_ArduinoHWInit.cpp
$(CPP) $(CPPFLAGS) -o "$@" "$<"
io_wrappers.o : C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinobase/src/io_wrappers.cpp
$(CPP) $(CPPFLAGS) -o "$@" "$<"
arduinoAVRScheduler.o : C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinotarget/registry/../scheduler/src/arduinoAVRScheduler.cpp
$(CPP) $(CPPFLAGS) -o "$@" "$<"
rtiostream_interface.o : $(MATLAB_ROOT)/rtw/c/src/ext_mode/common/rtiostream_interface.c
$(CC) $(CFLAGS) -o "$@" "$<"
ext_svr_daemon.o : C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/shared/externalmode_daemon/src/ext_svr_daemon.c
$(CC) $(CFLAGS) -o "$@" "$<"
rtiostream_serial_daemon.o : C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/supportpackages/arduinotarget/registry/../src/rtiostream_serial_daemon.cpp
$(CPP) $(CPPFLAGS) -o "$@" "$<"
daemon_checksum.o : C:/ProgramData/MATLAB/SupportPackages/R2020a/toolbox/target/shared/externalmode_daemon/src/daemon_checksum.c
$(CC) $(CFLAGS) -o "$@" "$<"
###########################################################################
## DEPENDENCIES
###########################################################################
$(ALL_OBJS) : rtw_proj.tmw $(MAKEFILE)
###########################################################################
## MISCELLANEOUS TARGETS
###########################################################################
info :
echo "### PRODUCT = $(PRODUCT)"
echo "### PRODUCT_TYPE = $(PRODUCT_TYPE)"
echo "### BUILD_TYPE = $(BUILD_TYPE)"
echo "### INCLUDES = $(INCLUDES)"
echo "### DEFINES = $(DEFINES)"
echo "### ALL_SRCS = $(ALL_SRCS)"
echo "### ALL_OBJS = $(ALL_OBJS)"
echo "### LIBS = $(LIBS)"
echo "### MODELREF_LIBS = $(MODELREF_LIBS)"
echo "### SYSTEM_LIBS = $(SYSTEM_LIBS)"
echo "### TOOLCHAIN_LIBS = $(TOOLCHAIN_LIBS)"
echo "### ASFLAGS = $(ASFLAGS)"
echo "### CFLAGS = $(CFLAGS)"
echo "### LDFLAGS = $(LDFLAGS)"
echo "### SHAREDLIB_LDFLAGS = $(SHAREDLIB_LDFLAGS)"
echo "### CPPFLAGS = $(CPPFLAGS)"
echo "### CPP_LDFLAGS = $(CPP_LDFLAGS)"
echo "### CPP_SHAREDLIB_LDFLAGS = $(CPP_SHAREDLIB_LDFLAGS)"
echo "### ARFLAGS = $(ARFLAGS)"
echo "### MEX_CFLAGS = $(MEX_CFLAGS)"
echo "### MEX_CPPFLAGS = $(MEX_CPPFLAGS)"
echo "### MEX_LDFLAGS = $(MEX_LDFLAGS)"
echo "### MEX_CPPLDFLAGS = $(MEX_CPPLDFLAGS)"
echo "### OBJCOPYFLAGS_BIN = $(OBJCOPYFLAGS_BIN)"
echo "### OBJCOPYFLAGS_HEX = $(OBJCOPYFLAGS_HEX)"
echo "### DOWNLOAD_FLAGS = $(DOWNLOAD_FLAGS)"
echo "### EXECUTE_FLAGS = $(EXECUTE_FLAGS)"
echo "### MAKE_FLAGS = $(MAKE_FLAGS)"
clean :
$(ECHO) "### Deleting all derived files..."
$(RM) $(PRODUCT)
$(RM) $(ALL_OBJS)
$(RM) *.dep
$(ECHO) "### Deleted all derived files."
0 Commenti
Risposta accettata
Abhaya
il 16 Set 2024
Modificato: Abhaya
il 16 Set 2024
Hi Hoang,
I faced a similar issue when trying to execute a MATLAB makefile using bash and gcc. However, I found a solution by using‘mingw32-make.exe’.
To successfully run the makefile generated during the model build, you can follow these steps:
"C:\PROGRA~3\MATLAB\SUPPOR~1\R2024a\3P778C~1.INS\MINGW_~1.INS\bin\mingw32-make.exe" -f makefile_name.mk all
If you encounter any errors, ensure that all necessary files are present and correctly located.
I hope this solution helps you resolve the issue.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Test Execution in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!