Delving into the Generated Code

MicrocontrollerEmbedCode returns a MicrocontrollerCodeData object that can be used to inspect the generated source code and probe other properties of the generated code.

Load the package.

Use the "SourceCode" property to get the source code that was generated.

The source code.

Alternatively the source code can be sent to a specific working directory.

Create a temporary directory to put the source code.
The directory has the source code as well as other intermediate files.

While the source code provides the most complete information about all the generated code, you will also have to cross reference the microcontroller's datasheet to understand what the the specific settings of the microcontroller's registers mean.

Some of this information can be obtained upfront by using the properties.

The settings for serial communication.

Some other properties are specifications of the microcontroller for which the code was generated.

General microcontroller specifications.

Other properties provide diagnostic information.

Data sent to standard error by the programmer.
The exit code.
The file sizes.

All the available properties can be seen using the properties data.

All available properties.
Not all properties are available in every case.