nRF54l15 FLPR core not booting after including external library

Hi!

We're building a project for the nRF54 where we want to run an external library on the FLPR core.

Right now we have a prototype PCB with a module from Fanstel on it.

We have allocated enough RAM for the FLPR core to be able to load all the code for the library, and it compiles, but the issue right now is that once we flash the device it won't boot. Or at least we're not seeing any activity on UART. If we comment the library out of the build and leave the rest as is, then it acts as expected and we can read prints from main() over UART. We don't expect the library to interact with hardware or the OS before we initialize it in main, so this really has us stumped right now.

Any suggestions how we can debug this? Is there for example any way to get a log of what happens before we get to main() if we're not able to boot?

Any help appreciated, thanks!

  • Hi,

    Some quick tips as a start:

    1. Try to blink from the FLPR core:

      NRF_P1->DIRSET = 0xFFFFFFFF;     
      while(1){
        k_msleep(1000);
        NRF_P1->OUTSET = 0xFFFFFFFF;    
        k_msleep(1000);
        NRF_P1->OUTCLR = 0xFFFFFFFF;   
      }
    

    If UART fails for some reason, this at least lets you see if any code runs at all.

    2. Have you tested the library anywhere else? Like, does it work on the appcore?

    3. Try to give it more space?

    Regards,
    Sigurd Hellesvik

  • Sigurd, you're a genius!

    Following your first suggestion I tried running this in main:

    printk("hello\n");
    NRF_P1->DIRSET = 0xFFFFFFFF;
    for (size_t i = 0; i < 8; i++)
    {
    	k_msleep(1000);
    	NRF_P1->OUTSET = 0xFFFFFFFF;    
    	k_msleep(1000);
    	NRF_P1->OUTCLR = 0xFFFFFFFF;   
    }
    printk("goodbye\n");
    initLibrary();

    I then saw uart print hello, the leds blink 8 times, and then uart did not print goodbye, so it seems the init function of the library just made the program crash before the uart had time to print.

    For your second suggestion, I'm afraid we've had the library compiled specifically for the risc-v core, and we only have the binaries.

    But now we at least know the program crashes when we run the init function, and not on boot directly.

    Thanks a lot!

  • You probably already did, but try to enable logs with CONFIG_LOG=y. Sometimes with fatal errors, this needs to be set so you can see the error being logged.

    Also CONFIG_RESET_ON_FATAL_ERROR can at times be useful to try to set to either yes or no. 

    Perhaps you can try to compile something else to a binary library (e.g. hello world) and then run that on the FLPR core to see that it can run any binary at all?

  • Good suggestions!

    We already compiled with hello world before we added this library so we know it works yes.
    Turns out it would have been enough to call a delay between our prints and the init function to see that the prints worked, but blinking the leds made it very clear that things were working, thanks a lot!

    We have proceeded to debugging the library itself now, so closing this ticket.

Related