rewrite cmd file, and reflact spi module