Writing custom microcode (ucode) for the N64 was only done by a couple of studios for officially released games. Most studios used the microcode provided by Nintendo. The few developers that did write it complained about poor documentation, lack of debugging tools and little to no support from Nintendo.
For the brave few that care to venture this far here are some things to know and the workflow that I used.
Tools:
Technical Notes: