I recently set this up on my pi. What I did was blacklist xpad, and install the xbox 360 driver from the retropie-setup script. Search for the blacklisting thing if you haven’t already run across that. There are several posts on it in the forums and elsewhere.
After that I ran the retroarch-joyconfig, I think also using the retropie-setup script.
Once that was done, I then setup the emulation station controller config. I think if you do that first, you will have problems later after installing the new xbox driver from retropie-setup.
My first attempts at editing the .cfg files directly were a big fail, so I reloaded the img onto my sd card and started from scratch. The second attempt was much smoother.
HTH.