Hi!
(The normal way)
You have to open the command line (F4) and type:
cd RetroPie-Setup
sudo ./retropie_setup.sh
Then, you elect “Setup” and then select “Register RetroArch Controller” and follow the steps. Finally you go back and select “Perform REBOOT”.
I hope you find it useful
If doesnt works, I can give you my config file (I use a GENERIC USB controller)
(Sorry , my English is bad)