Git Product home page Git Product logo

makefile4cubemx's Introduction

#Makefile for STM32CubeMX

This program generates a Makefile from STM32CubeMX (http://www.st.com/stm32cube) created project.

author: Juraj Dudak

Date: 16/03/2016


Changes and Improvements:

  • support only SW4STM32 projects, because there is (was) bug in generation code for TrueStudio in Linux
  • add all .c files in Src directory into project and Makefile
  • makefile is prepared for Code::Blocks IDE (flashing bin program after compile)
  • create project file for Code::Blocks
  • support of user defined preprocessor directives

Instalation

sudo ./install

Dependencies

Usage

Before using the script CubeMX2Makefile.py make sure the software STM32CubeMX are set these preferences: In Project/Settings:

  • Toolchain IDE: SW4STM32
  • Generate under root is unchecked

Open terminal in directory, where CubeMX generated the SW4STM32 project:

CubeMX2Makefile.py .	

Configuration

The script look for make_args (located in project direcory) where is predefined preprocessor directives. Syntax for this file:

   =DIRECTIVE_NAME
   +DIRECTIVE_VALUE1 
   +DIRECTIVE_VALUE2

In version 1.5.1, are supported:

  • C_DEFS (to add some definitions to compiler)
  • LIBS (to link precompiled libraries)

Usage: CubeMX2Makefile.py <path_to_cube_project> [-opt={0|1|2|s}]

Example of make_args file:

=C_DEFS
+MY_OWN_DIRECTIVE
+LIBRARY_VERSION=1.5.0
=LIBS
+LMiddlewares/mpl
+llibmplmpu
 

You can overwrtie default setting by editing local.settings file. See the local.setting file for details.

Usage of generated Makefile

  • "make" : compile, build and flash program to MCU
  • "make Release" : the same as "make". It is for Code::Blocks environment
  • "make Debug" : compile and build only (there is no real debug)
  • "make clean" : clean builded files
  • "make flash" : flash code to MCU

##Output

  • Makefile with prepared rules for Code::Block IDE
  • Code::Block project file

Disclaimer

Copyright 2015 Juraj Dudak

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

makefile4cubemx's People

Contributors

duro80 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.