Mine got recognized automatically by the default driver xpad(and xboxdrv), so I was just able to get it going using the emulationstation configure input option.
I'm not quite sure how you could get it working, easiest option I think is to make sure you've tried all possible ports so it's not a faulty port or something. Also, you could try it out on a pc to see if it's working or a faulty controller. I'm not sure this is the best advice, but it's probably something I'd check for myself if I had that problem.
As for the software and drivers, RetroPie should be fully equipped to handle most controllers plug and play, including the F310. So if you did anything really custom besides just flashing the stock image to sd card, it may be worth trying it out again with a stock install. I doubt this would be the reason, unless your install isn't recognizing any controllers at all.