Giter Club home page Giter Club logo

firmware-over-the-air's Introduction

Firmware-over-the-air

Update your MCU's flash code remotely over the web.

What is FOTA?

It's a SW that is used to flash MCU (update MCU code) wirelessly over internet.

Components Used

  1. stm32f103 MCU
  2. ESP8266 MCU
  3. Flask as web server

How to get started?

  1. Download repo code git clone "https://github.com/ahmedFarouk2020/Firmware-over-the-air.git"
  2. Install requirements.txt pip install -r requirements.txt
  3. Get HW components mentioned above

Important Features

  1. 2 Separate Banks (rooms) so if download fails in the middle you can go back to the old code
  2. Smooth transitions betwen banks

Future Improvements

  1. Authentication (using username and password provided by author) --> already implemented
  2. Data Encryption and decryption (security management)
  3. Data integrity check --> already implemented

First of all, Burn .hex file in FOTA-firmware/Debug on your MCU

Steps to use

  1. Run app.py using this command python app.py the following is displayed image
  2. Copy the link to user browser
  3. Click on "Choose File" button and choose hex file
  4. click "Submit"
  5. Reset MCU

Note: The Hex file used with this FOTA has a special format :)

How to create the Hex file

  1. Create empty .hex file
  2. Modify the ldscripts/mem.ld file in the project you want to upload to MCU as follows
MEMORY
{
  RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
  CCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 0
  FLASH (rx) : ORIGIN = 0x08002800, LENGTH = 27k
  FLASHB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB0 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB2 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB3 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  MEMORY_ARRAY (xrw)  : ORIGIN = 0x00000000, LENGTH = 0
}
  1. Compile
  2. Copy all the content of the generated hex file from step 3 and paste it in the empty file
  3. Add '*' in a new line just after the present data
  4. repeat the steps from 2 to 4 but with this new values
MEMORY
{
  RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
  CCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 0
  FLASH (rx) : ORIGIN = 0x08009400, LENGTH = 27k
  FLASHB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB0 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB2 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  EXTMEMB3 (rx) : ORIGIN = 0x00000000, LENGTH = 0
  MEMORY_ARRAY (xrw)  : ORIGIN = 0x00000000, LENGTH = 0
}
  1. Your file is ready to be uploaded I will add a sample file too

firmware-over-the-air's People

Contributors

ahmedfarouk2020 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.