This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Error: L6915E:

hi,

   i am using sdk 14.1 nrf52840.

i am getting these 2 errors in keil

.\_build\nrf52840_xxaa.axf: Error: L6915E: Library reports error: __use_no_heap was requested, but malloc was referenced
.\_build\nrf52840_xxaa.axf: Error: L6915E: Library reports error: __use_no_heap was requested, but free was referenced

but i am not getting these errors in ses. how to solve this in keil?

regards,

karthikeyan

Parents
  • Hi,

     

    What example are you compiling?

    Do you have the file \examples\802_15_4\experimental\wireless_uart\retarget.c in your project, or a file that includes the line "#pragma import(__use_no_heap)" in your project?

     

    Best regards,

    Håkon

  • hi hakon,

       i am using ble_proximity example as a base and developed my own application.

    i have commented this two line

    #pragma import(__use_no_heap)
    #pragma import(__use_no_heap_region)

    from retarget.c file.

    now it is compiling with out error.

    is this the correct format what i have done or is there any other option.

    regards,

    karthikeyan

  • I recommend using the retarget.c file from this folder: \components\libraries\uart\ 

    The one that you have included now (from the path examples\802_15_4\experimental\wireless_uart) is just an empty implementation.

     

    I do not see why this pragma is needed in the retarget.c file, or why this file is included at all.

    If this is required by some corner-case in our code base, it should still be wrapped around #pragma push and #pragma pop, like this:

    #pragma push
    #pragma import(__use_no_heap)
    #pragma import(__use_no_heap_region)
    
    /* functions and declarations */
    
    // Pop the options to ensure they're only valid for this file
    #pragma pop

    I'll input this as a bug internally.

     

    Best regards,

    Håkon

Reply
  • I recommend using the retarget.c file from this folder: \components\libraries\uart\ 

    The one that you have included now (from the path examples\802_15_4\experimental\wireless_uart) is just an empty implementation.

     

    I do not see why this pragma is needed in the retarget.c file, or why this file is included at all.

    If this is required by some corner-case in our code base, it should still be wrapped around #pragma push and #pragma pop, like this:

    #pragma push
    #pragma import(__use_no_heap)
    #pragma import(__use_no_heap_region)
    
    /* functions and declarations */
    
    // Pop the options to ensure they're only valid for this file
    #pragma pop

    I'll input this as a bug internally.

     

    Best regards,

    Håkon

Children
No Data
Related