Giter Club home page Giter Club logo

stm32h7xx-startup's Introduction

STM32H7xx MCUs Startup Code

Most IDEs provide us an Assembly code startup file for all STM32 microcontrollers. And this startup file depends on the ARM CMSIS library, so you cannot develop your own standalone application that can access the internal registers directly using their addresses and does not depend on any library.

This is an independent, easy to read Startup Code written in "C" for STM32H743xx microcontrollers that works with the ARM GCC tool chain. It comes with a compatible linker script file and a demonstration example. You can easily use this repository as an eclipse template project and port it for your STM32H7xx device.

If you don't know about the Startup Code, you can read the:

Theory on Startup Code

Startup code is a small block of assembly language code that prepares the way for the execution of software written in a high-level language. Each high-level language has its own set of expectations about the runtime environment. For example, C both utilize an implicit stack. Space for the stack has to be allocated and initialized before software written in either language can be properly executed. The location and contents of this file are usually described in the documentation supplied with the compiler.

Startup code usually consists of the following actions :

  • Initialize the stacks.
  • Disable all interrupts.
  • Copy any initialized data from ROM to RAM.
  • Zero the uninitialized data area.
  • Allocate space for and initialize the stack.
  • Enable interrupts.
  • Initialize the heap.
  • Call constructors.
  • Initialize the .bss section to zero.
  • If compiled with FULL_LIBRARY, get the command line from the host using debug_getargs and set registers to supply argc and argv to main.
  • Call main.

On return from main or when exit is called :

  • If compiled with FULL_LIBRARY, call destructors.
  • If compiled with FULL_LIBRARY, call atexit functions.
  • If compiled with FULL_LIBRARY, call debug_exit while supplying the return result from main.
  • Wait in exit loop.

The instruction from the main code will be executed only in the event that the high-level language program exits Depending on the nature of the embedded system, you might want to use these instructions to halt the processor, reset the entire system, or transfer control to a debugging tool.

Because the startup code is not inserted automatically, the programmer must usually assemble it himself and include the resulting object file among the list of input files to the linker. Every microcontroller has its own startup code, so before creating a project make sure you have the necessary startup code for the specific microcontroller. [more]

License

Video Download Manager is distributed under the terms of the MIT license. See LICENSE for details. Opening a pull requests is assumed to signal agreement with these licensing terms.

stm32h7xx-startup's People

Contributors

elzoughby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

stm32h7xx-startup's Issues

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.