Hello v,
The reason that your application is crashing is because you are trying to write to a location in flash, which is read-only. The FLib_MemCpy() function will copy each byte from the source address to the destination address. In your case you are trying to write to the address pointed by aData which is the string "NXP_WU" located in flash.
To be able to write to the address pointed by aData, it needs to be pointing to an allocated memory in RAM. You could statically allocate some memory by declaring a global array as:
uint8_t gAData[6] = {0};
And then point aData to this new array:
gAppAdvertisingData.aAdStructures[i].aData = gAData;
Now you will be able to use FLib_MemCpy() as follows. Please note that the "&" is not needed as aData is a pointer and already holds the destination address.
FLib_MemCpy(gAppAdvertisingData.aAdStructures[i].aData,"NEW_WU",7);
Once gAppAdvertisingData contains the desired data, you need to call Gap_SetAdvertisingData() to set the advertising data:
Gap_SetAdvertisingData(&gAppAdvertisingData, &gAppScanRspData);
You can verify that your advertising data was setup successfully by adding the gAdvertisingDataSetupComplete_c case to the BleApp_GenericCallback().
Let me know if this works for you and if you have any question.
Best regards,
Gerardo