Keil Logo


4.28 __rt_lib_init()

Defined in rt_misc.h, this is the library initialization function and is the companion to __rt_lib_shutdown().


extern value_in_regs struct __argc_argv __rt_lib_init(unsigned heapbase, unsigned heaptop);
is the start of the heap memory block.
is the end of the heap memory block.


This function is called immediately after __rt_stackheap_init() and is passed an initial chunk of memory to use as a heap. This function is the standard ARM® C library initialization function and it must not be reimplemented.


This function returns argc and argv ready to be passed to main(). The structure is returned in the registers as:
struct __argc_argv
{   int argc;
    char **argv;
    int r2, r3;   // optional extra arguments that on entry to main() are
};                // found in registers R2 and R3.
Non-ConfidentialPDF file icon PDF versionARM DUI0378H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.