![ARML6915E:Libraryreportserror](http://img.aihuau.com/images/31101031/31045244t01ee24d0c8b9f2f0ae.jpg)
- Information
L6915E: Libraryreports error: The semihosting __user_initial_stackheap cannotreliably set up a usable heap region if scatter loading is inuse
L6915E:Libraryreports error:
The message istypically one of the following: or
Error:L6915E: Library reports error: The semihosting__user_initial_stackheap cannot reliably set up a usable heapregion if scatter loading is in use
It is mostlikely that you have notre-implemented__user_setup_stackheap()oryou have notdefinedARM_LIB_STACKorARM_LIB_HEAPregionsin the respective scatter file.
Note
__user_setup_stackheap()supersedesthe deprecatedfunction__user_initial_stackheap().
See thefollowing inDeveloping SoftwareforARM®Processors:
See thefollowing inC and C++ Libraries andFloating-Point Support Reference:
See thefollowing inUsing theLinker:
- Error: L6915E: Library reports error: __use_no_semihosting wasrequested but was referenced.
Whererepresents__user_initial_stackheap,_sys_exit,_sys_open,_sys_tmpnam,_ttywrch,system,remove,rename,_sys_command_string,time,orclock
This errorcan appear when retargeting semihosting-using functions, in orderto avoidanySVC/BKPTinstructions beinglinked-in from the C libraries.
Ensure thatno semihosting-using functions are linked in from the C library byusing:
#pragmaimport(__use_no_semihosting)
See thefollowing inUsing C and C++ Libraries andFloating-Point Support:
If there arestill semihosting-using functions being linked in, the linkerreports this error.
To resolvethis, you must provide your own implementations of these C libraryfunctions.
Theemb_sw_devdirectorycontains examples of how to re-implement some of the more commonsemihosting-using functions. See thefileretarget.c.
SeeUsing Cand C++ Libraries and Floating-PointSupportfor more information on usingsemihosting-using C library functions.
Note
The linkerdoes not report any semihosting-using functions such as, forexample,__semihost(), in your own applicationcode.
To identifywhich semihosting-using functions are still being linked-in fromthe C libraries:
Forexample:
… Loadingmember sys_exit.o from c_4.l. reference : __I_use_semihostingdefinition: _sys_exit …
This showsthat the semihosting-usingfunction_sys_exitis linked-infrom the C library. To prevent this, you must provide your ownimplementation of this function.
Ifrepresentsmalloc,free,__heapstats,or__heapvalid, the useof__use_no_heapconflicts withthese functions.
Ifrepresentsmalloc,free,__heapstats,__heapvalid,or__argv_alloc, the useof__use_no_heap_regionconflicts with thesefunctions.