Skip to content

Commit 548e221

Browse files
amathamkamathamk
authored andcommitted
Tools: simulink support for ArduCopter
Glue code to enable Simulink-generated controller with ArduCopter
1 parent 595aa6e commit 548e221

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Tools/ardupilotwaf/boards.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,27 @@ def srcpath(path):
162162
)
163163
cfg.msg("Enabled custom controller", 'no', color='YELLOW')
164164

165+
# Allow enabling for controller hook from Simulink for any board
166+
if cfg.options.enable_simulink_app:
167+
env.AP_LIBRARIES += [
168+
'AC_Simulink'
169+
]
170+
cfg.msg("Enabled Simulink controller", 'yes')
171+
env.DEFINES.update(
172+
# Add Defines for Simulink Controller
173+
SIMULINK_APP_ENABLED=1,
174+
# End of Defines for Simulink Controller
175+
)
176+
#Enable dwarf parser flags for Simulink external mode
177+
env.CFLAGS += [
178+
'-gdwarf-4',
179+
'-g3',
180+
]
181+
env.CXXFLAGS += [
182+
'-gdwarf-4',
183+
'-g',
184+
]
185+
165186
# support enabling any option in build_options.py
166187
for opt in build_options.BUILD_OPTIONS:
167188
enable_option = opt.config_option().replace("-","_")

0 commit comments

Comments
 (0)