Giter Site home page Giter Site logo

compiling_arduino_stm32_bootloaders's Introduction

Introduction

This repo is a result of painstaking quest to find answer for How to compile STM32duino bootloaders ? Here I walk you through some steps so that you can compile the bootloaders provided by Roger Clark. The steps shown here are for compiling in Windows platform.

Procedure:

Follow the step carefully, so that you don't land up in soup.

Install 7z if you dont have.

STEP_1

Install WinAVR to get make command in Windows commandline from here.

Download this DLL file and keep the file in your WinAVR installation directory under utils/bin/. If you have installed in C:/ directory then drop the file inside C:\WinAVR-20100110\utils\bin.

STEP_2

Now download this zip, extract it, copy and paste the folders in the WinAVR installation directory. Yes! just replace the folders.

STEP_3

In System Variables and User Variables under Environment variables click on NEW and add the following directory to the PATH variable:

  • C:\WinAVR-20100110\utils\bin
  • C:\WinAVR-20100110\bin

If it is already present skip this step.

STEP_4(Optional)

Open command window and type avr-gcc -v and hit enter. The command prompt window should show gcc version 4.8.0 20130306 (experimental) (GCC) in the last line. If you see this you are good to go, else go through the previous steps once more.

STEP_5

This step is the most essential to successfully compile bootloaders. Download this ARM GCC Toolchain and extract(just extract here wil do) it in your desired location. You should see a folder named GNU Tools ARM Embedded. Inside the subfolder named 4.8.3-2014q1 you will find a folder named arm-none-eabi. Again moving inside you will find bin folder.

For example:

If you have extracted the folder inside C:\Program Files (x86) then the directory address should read C:\Program Files (x86)\GNU Tools ARM Embedded\4.8.3-2014q1\bin

Copy the directory of this bin folder and add it to the PATH variable of System Variables and User Variables

STEP_6(Optional)

Open command window and type arm-none-eabi-gcc and hit enter. If you see the following:

arm-none-eabi-gcc: fatal error: no input files

compilation terminated.

then, you have successfully completed STEP 5.

STEP_7

Download the bootloaders from here. Extract it and open command window in the same directory. If you are unable to open the command window in the extracted STM32duino-bootloader folder run the registry file provided in this repo. This will edit your registry, so that you can open command window in any of your desired directory. It makes your life a lot easier!!.

Right click on the bootloader directory and you show see Open Command Window here as Administrator option. Clicking on it will open a command window after a prompt.

If you want to compile bootloader for STM32F103C variant then refer to the make all.bat file in the STM32duino-bootloader folder. In this case I am using the popular BluePill board where the LED is connected to PC13 pin.

So in the command window run make generic-pc13. If everything goes good then you should see the following at the end of the process:

Copying to binaries folder

cp build/maple_boot.bin bootloader_only_binaries/generic_boot20_pc13.bin

Viola, you have successfully compiled bootloader in Windows !!! Go and get two beers ๐Ÿป, will have it together. Cheers!!

N.B Your compiled binary file is stored in bootloader_only_binaries folder.

compiling_arduino_stm32_bootloaders's People

Contributors

armazenamentourl avatar tamojitsaha 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.