Midgard

Midgard uses an easy to use STM32F7 Microcontroller, perfect for learning how to write embedded low-level software but still powerful enough for the majority of projects.

Setup

To start developing on the Yggdrasil platform using Midgard, the following things are needed:

After starting the IDE for the first time, close the welcome screen and click on File -> Import.... Then import the Midgard Template using the Existing Project into Workspace option.

Import

Getting Started

For starting with embedded C development, simply open Core/main.c, scroll down to find the main function and in there scroll further down until you find a block of code that looks like this:

/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */

/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */

All code goes between one of the /* USER CODE BEGIN XXX*/ and /*USER CODE END XXX*/ blocks. This is important since everything outside of these blocks will be deleted when the project is regenerated with the .ioc file.

Troubleshooting

Debugging works but execution doesn’t follow the code

If the wrong boot mode is selected, Midgard will start running code from the internal Boot ROM instead of the flash. These are mapped to the same addresses so when debugging, gdb thinks its executing your code but the actual executed code is the Boot ROM. Since your code and the Boot ROMs code differ, it looks as if your code jumps to seemingly random places at weird points.