truck was running but battery's were original. removed the battery's and got two new ones and replaced. tried to start all lites lit up except wait to start (glow plug). truck would not crank checked the fuses they are all good inside truck and under the hood. checked the ignition switch circuits 12 volts and it is good all the way to the ecm. starter switch not picking to crank over. tried other switches and didn't do anything still no crank. removed the cover and pushed the relay in and truck cranked but didn't start leads me to think the ecm may be bad. can ecm lose programming if battery's are off to long. tried to look at other post but most don't finish posting after problem is fixed.
any help would be appreciated. also can ecm be removed and flashed without truck.