What is the difference between "Build" and "Generate code"?

In the Simulink CoderTM App, you can choose between "Build" and "Generate Code":

What is the difference between "Build" and "Generate code"? 1:

If you have set TwinCatGrt.tlc as target, both options have the same function, because the TwinCatGrt.tlc does not run through the makefile of MathWorks®.

If you do not want to run the build process, but only generate the C++ code, uncheck the checkbox Run the publish step after project generation under TC Build.

What is the difference between "Build" and "Publish"?

"Publish" refers to the successive execution of the build process for specific TwinCAT platforms. From Simulink®, the corresponding binaries are then created one after the other for the platforms activated under TC Build, so that it can be decided afterwards for which target platform the compiled functions are to be used.