Skip to content

Latest commit

 

History

History
35 lines (19 loc) · 1.69 KB

README.md

File metadata and controls

35 lines (19 loc) · 1.69 KB

alt text

Copyrights 2020-2024 Embedded AMS B.V. Amsterdam, www.EmbeddedAMS.nl, [email protected]

Looking for a more elaborate description of this example? Please visit: https://embeddedproto.com/how-to-set-up-a-project-with-embeddedproto-using-makefiles/

Introduction

This is a simple demo of a makefile toolchain for a STM 32bit ARM microcontroller. The goal of this demo is to demonstrate a possible method to generate Embedded Proto sourcecode and use it in a project.

Installation

  1. Install STM32CubeIDE if you have not already.
  2. Install the dependencies required by Embedded Proto. They are listed here.
  3. Checkout this example repository including the submodule of Embedded Proto: git clone --recursive https://github.com/Embedded-AMS/EmbeddedProto_Example_Makefile.git.
  4. Next setup the virtual environment for Embedded Proto by entering the folder and running the python setup.py script.

Folder layout

After generating and building the code this folder (stm32f4xx) the folling sub folders will be present:

  • build - The binary output of the makefiles
  • proto - The location where the .proto files are located
  • src - The sourcecode folder ** external - Sourcecode of the STM HAL and ARM CMSIS ** generated - This folder is created during the source code generation step. It includes the code generated by the Embedded Proto plugin for the .proto files.

Sourcecode

The main.cpp holds a very simple infinte loop which over and over sets a new value in the protobuf message.