add firmware code