How to use emIDE


Setting up your project

The projects panel

The projects panel on the left side of emIDE contains information about the currently opened projects and its files.
All open projects are organized in a workspace. These workspace can be saved to easily manage and restore multiple projects at once. All projects can also be saved and opened independent from the workspace and are loaded into the default workspace.
Within the project, you can see all files, which are directly included in the project. The files can be displayed as they are on the disk, relative to the topmost folder in the project. These folders are displayed blue.
The files can also be stored in virtual folders, to allow you sorting of files without moving them on the filesystem.

Build targets

The build targets are configuration sets of your project.
Each build target can have its own compiler, linker and debugger settings.
They can also contain different files, so all build targets can be for different purposes, for example debugging and release configurations, or different modules of the project.

Adding files to the project

You can add existing files to your project or create new files.

To add a single existing file to your project right-click on the project name in the projects panel and select "Add files...". Select the file you want to add and click Ok.
Now you can select the build targets the file belongs to. Select the correct ones and click OK. Now the file is added.
You can also add more files recursively. Right-click on the project name and select "Add files recursively...". Select the top folder you want to search in for files. Now you can select the files you really want to add to the project and afterwards the build targets the files belong to.

To create an empty file, select File -> New empty file. You will be asked to save the file and add it to a build target.
You can also create a new header or source file with File -> New file/project -> Files. Select the file type you want to create and click Go.
The wizard will guide you through the configuration of the file. Select the filename, a header guard word and the build targets it belongs to. Then click finish.

Compiler settings

The compiler settings can be accessed at Project -> Build options -> Compiler settings.
They can be set for the whole project, as well as for each build target. Whether the project settings shall be used can be set with the Policy.

In the compiler settings, you can select all flags you want the compiler to use for each file. All flags, which can not be selected in the Compiler Flags tab, can be typed in the Other options.
The #defines tab allows you to globally add defines for your project / build target.

Linker settings

The linker settings can be accessed at Project -> Build options -> Linker settings.
Like for the compiler settings, the Policy for linker settings can also be set.

In the linker settings the external libraries to use can be added.
You can also specify the options called by the linker.

Debugger settings

To be able to debug your application with J-Link and GDB Server, you have to set some debugger options.
They can be accessed at Project -> Properties... -> Debugger.
Here you can set the name of your target device, select if it is a big endian device and configure the target connection.
If you have a CMSIS-SVD file for your device, you can select it here, to be able to view the device specific registers.
You can also select whether the application shall run to main at start of the debug session and add custom commands for GDB and GDB Server.

The typical GDB commands after connection are:
#reset the target
monitor reset
#load the application
load

The commands can also include more GDB Server monitor commands e.g. to initialize your target.


Building your project

When all project configuration is done and all source files are added, you can build your application.
The sample projects and templates are pre-configured and build out-of-the-box.

To start the build process select Build -> Build, click on the icon in the build toolbar or hit F7.
The log tab Build messages will inform you about errors and warnings.