0
0
Simulinkdata~10 mins

Embedded Coder for MCU deployment in Simulink - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the target hardware for MCU deployment in Simulink.

Simulink
set_param(gcs, '[1]', 'ARM Cortex')
Drag options to blanks, or click blank then click option'
ASimulationMode
BTargetHardware
CSolver
DStopTime
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'SimulationMode' instead of 'TargetHardware'.
Confusing solver settings with hardware target.
2fill in blank
medium

Complete the code to generate code for the Simulink model using Embedded Coder.

Simulink
rtwbuild('[1]')
Drag options to blanks, or click blank then click option'
Acodegen
Bbuild_model
Cgenerate_code
Dmodel_name
Attempts:
3 left
💡 Hint
Common Mistakes
Passing function names instead of model filename.
Including the file extension.
3fill in blank
hard

Fix the error in the code to set the code generation toolchain for MCU deployment.

Simulink
set_param(gcs, 'Toolchain', '[1]')
Drag options to blanks, or click blank then click option'
Agcc-arm-none-eabi
Bgcc
Carmcc
Dmsvc
Attempts:
3 left
💡 Hint
Common Mistakes
Using generic 'gcc' instead of ARM-specific toolchain.
Using Windows compiler 'msvc' which is not for MCU.
4fill in blank
hard

Fill both blanks to configure optimization and code interface for MCU deployment.

Simulink
set_param(gcs, '[1]', 'on'); set_param(gcs, '[2]', 'ert.tlc')
Drag options to blanks, or click blank then click option'
AOptimizeCode
BSimulationMode
CSystemTargetFile
DStopTime
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing simulation parameters with code generation parameters.
Using wrong parameter names for optimization or target file.
5fill in blank
hard

Fill all three blanks to create a dictionary of code generation settings for MCU deployment.

Simulink
settings = {'[1]': 'gcc-arm-none-eabi', '[2]': 'ert.tlc', '[3]': 'on'}
Drag options to blanks, or click blank then click option'
AToolchain
BSystemTargetFile
COptimizeCode
DSimulationMode
Attempts:
3 left
💡 Hint
Common Mistakes
Using simulation parameters instead of code generation keys.
Mixing up the keys and their values.