GPIO pin definitions

Greetings. I have been working to gain experience building Ardupilot on different board targets. Most recently, I built on a Raspberry Pi 3 with the recommended Ubuntu OS. The build completed normally, and even runs, though of course cannot find the sensors, as they aren’t there.

I’m trying to understand where the GPIO pins for the board are mapped to the AP functions. The HAL seems most obvious, and the HAL gpio files more so. Yet, I don’t find what I expect to find in these files. I was assuming there’d be a table mapping function to pin, but that wasn’t what I found.

If I wanted to say change the pins used by the I2C interface or the serial ports, or esc output for example, where would I do this?

Thank you very much.

Hello
The RPI BCM chip differ from STM microcontroller as it offer much less flexibility in the gpio configurations.

If you want control of particular pins you have to set it in the directory tree and load the configuration at boot and then you can acces through user space using file acces type io commands

Thank you. I appreciate that. I guess I was looking for something like hwdef.dat but it makes sense on Linux it would be different. So I2C is all just handled through the Linux dev drivers I guess. What about esc signals? I watched some of the ArduPilot Linux port videos on Youtube today, but they were kind of old, and I think still figuring that out with PRCs on BBB. But on RPI, which pins drive the ESCs, and can they be changed? Is that in the AP_HAL_Linux? Copter that is. I was trying to follow the code, but I’d follow through the ifdefs for specific variants until the end, and a lot of things just looked stubbed out. Is that correct or am I completely off. Thanks.