I really like to use the EmBitz IDE for STM32 projects. Unfortunately the current version (1.11) does not yet support STM32F7 devices. So I decided to write this guide how to get the "blink" example running for the STM32F767 Nucleo 144 Board.
The first thing I did was to install the SEGGER J-Link software package. After that I plugged in the nucleo board and reflashed the STLinkv2 to a SEGGER J-Link using the ST-Link Reflash Utility (more infos).
The next step was to unpack the STM32CubeF7 package somewhere you like.
Now open up EmBitz and create an empty project. Mine will be called "nucleo". Make sure to select the packaged ARM-GCC-compiler for the project.
Now it's time to collect all the source files we need for the blink example. The syntax of this code copying guide is like the following:
Subfolder of the STM32 CubeF7 package --> Destination Folder in the EmBitz project root
/Srcto a new directory
/Drivers/BSP/STM32F7xx_Nucleo_144to a new
/Drivers/CMSIS/Device/ST/STM32F7xx/Includeto a new
/Drivers/CMSIS/Includeto a new
/Srcto a new
/Projects/STM32F767ZI-Nucleo/Examples/GPIO/GPIO_IOToggle/SW4STM32to the root dir /
Now that all files are collected we will now add them to EmBitz. Right click on your project and select "Add files recursively" and select the root directory of your project. A lot of files should come up for adding. Make sure the linker script (file extension .ld) is also added.
Unfortunately we need to remove some of the files right away. In the EmBitz project view select all files in the /Source/HAL/ directory which contain _ll or _template. Right click an remove form project. The same has to be done for the _ll or _template files in /Headers/HAL folder.
The following image shows the folder structure for my example project. The folders with a lot of files are not expanded.
Now we will set up the project. Right click on your project and select build options. Make sure your project name (nucleo in my case) is selected from the list in the far left and fill in the values as seen from the screenshot below.
Next select Compiler Settings -> #defines and define the following constants:
USE_HAL_DRIVER STM32F767xx USE_STM32F7XX_NUCLEO_144
From the Linker Settings -> Linker Flags -> All categories section check the following options:
Now select "Debug" from the list in the far left, go to Assembler settings and check "Generate debugging information". Make sure the option --gdwarf-2 from the assemblers "other options" field is removed.
Click OK to save everything.
Now you should be set up for compiling. Select Build->Build Target to compile the project.
Now we need to configure the EmBitz end of the debugging bridge. So in EmBitz select Debug->Interfaces go to GDB server and select JLink in the top combo box. Select the ST device family and click on settings. In the window that just opened fill in "STM32F767ZI" (although it might not get auto completed) into the device field and select swd for the interface. Click OK to close the window.
My settings are shown in the following screenshot.
Go back to the target settings tab and select Run to main() if you want. Now everything should be ready.
Press F8 to start a debugging session. The JLink server should pop up and the chip will be programmed and you can start debugging.
Please notify me if something in this guide is wrong or impractical.