The 6-foot-3, 321-pound Martin could compete for time at center or guard. The 49ers lost starting center Jonathan Goodwin.
The signing Thursday means all 12 of the 49ers' draft picks are now signed.
Martin, the 70th overall pick out of Southern California, played 38 games - with 33 starts - over three seasons with the Trojans. Martin started all 13 games at center last season while helping the Trojans rush for 2,419 yards and 29 touchdowns, and earning First-Team All-Pac-12 honors.
AP NFL website: www.pro32.ap.org and www.twitter.com/AP-NFL