I would say that camaraderie, as either spoken or written, is used of situations having some of the following characteristics,
Brought about by shared dangers or hardships
Being on the same side in the struggle against something threatening
Having shared values and objectives
A wish to acknowledge and encourage each other
A sense that some misfortune can be overcome by shared willpower.
Friendship is usually quieter, but could develop from camaraderie, as when two old combatants enjoy reminiscing in old age. But in general, friendship lacks the tension and the urgency of camaraderie.