Hi Timothy,
If you have copied the CC2540 USB reference design you might have missed that you need to add a 32kHz crystal to enable low power mode (i.e. POWER_SAVING). If you do not have the sleep crystal, you cannot put the device in sleep and therefore you have to remove POWER_SAVING from the project defines in order for the application to work properly.
You can compare the reference designs:
CC2540EM Reference design
CC2540USB Reference design
Best Regards
I don't think you need to add those many lines in SimpleBLEPeripheral_Main.c file.
Just make change from uint8 initial_advertising_enable = FALSE; to TRUE; in void SimpleBLEPeripheral_Init( uint8 task_id ) function in SimpleBLEPeripheral.c file. This should make hardware advertise itself and becomes discoverable.
Hope that it helps.
Regards,
maharjanbk