As wrote @justme, you need a charged battery, if there is a mess just in the firmware (not in erom) you are not able to charge the battery, moreover if the battery is completely dead, we are talking about mobile problem instead could be just a battery problem (once happen to me to get a red fixed light and was just the battery), and second I suggest to clean the contact to improve the comm and also the charge.
This is the first step to start undestanding what problem we are talking about