The "firearm" will be electromagnetic, powered by batteries in a backpack. This is not a weapon we will need for fighting human enemies - conventional firearms are best for that. Big slugs of high velocity copper will be needed to disable combat robots in CQB. At longer ranges ordinary .50 cal will be effective when you have the luxury of follow-up shots, but in close we'll need something better tailored to disable a dangerous robot quickly. A cloud of copper particles created by a high-velocity impact will be deadly to electronic circuitry and wiring.
Also, we'll need flamethrowers. It's tough to design a combat robot which can "see" its surroundings and operate effectively while engulfed in flames.
We're gonna need massive high-velocity copper projectiles and flame throwers, and if we're lucky we'll only need that stuff for robots. I'll leave it at that.