CodeGen smartfirmware