none
Using heap and C++ in bootloader for WEC2013 RRS feed

  • Question

  • I have to extend the bootloader that comes with the BSP. It will get additonal functions for updating a configuration area in the flash memory.

    For that purpose I need to allocate dynamically memory for the configuration items. The WEC7 bootlaoders have been linked with fulllibc. Microsoft now changed the libraries that are available for the bootloader (https://msdn.microsoft.com/en-us/library/jj733439.aspx). As suggested I use the bootcrt.lib in instead of the fulllibc.lib. But now the function malloc as well as the whole heap implementation is not available.

    • What library do I have to link to get a heap implementation?
    • What library do I have to link to get support for C++ (new, delete, STL, ...)?

    Thursday, August 27, 2015 7:08 AM

Answers

  • Hi Helge,

     try BootAlloc instead of malloc - https://msdn.microsoft.com/en-us/library/dn169258.aspx

    I'm not sure that using of C++ is feasible for bootloader.

    Good luck, Igor

    • Marked as answer by Harper23 Monday, August 31, 2015 11:30 AM
    Thursday, August 27, 2015 10:44 AM