High-resolution, multifrequency radio observations of M82