[英]error in first gcc cross compiler compile stage (arm-none-eabi/bin/as: unrecognized option '--64')
[英]Building project due arm-none-eabi causes no such instruction error
首先,請對不起,我的英語不太好...我正在嘗試為stm32f746g-disco寫一些項目。 我正在使用arm-none-eabi工具包。 完整的源代碼位於http://github.com/Andrew-Bezzubtsev/stm-glib.git 。 當我正在嘗試構建它時:
./set_toolchain.sh
cmake ./
make
我收到下一個錯誤:錯誤:沒有這樣的指令:
`rbit %eax,%eax'
但是發生錯誤的代碼片段是:
__attribute__((always_inline)) __STATIC_INLINE uint32_t __RBIT(uint32_t value)
{
uint32_t result;
#if (__CORTEX_M >= 0x03) || (__CORTEX_SC >= 300)
__ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) );
#else
int32_t s = 4 /*sizeof(v)*/ * 8 - 1; // extra shift needed at end
result = value; // r will be reversed bits of v; first get LSB of v
for (value >>= 1; value; value >>= 1)
{
result <<= 1;
result |= value & 1;
s--;
}
result <<= s; // shift when v's highest bits are zero
#endif
return(result);
}
請幫我。
(由於低代表仍然無法使用評論,請盡可能將其轉換為評論)
eax - 是來自intel(x86)平台的寄存器,ARM上沒有這樣的寄存器。
你需要找出為什么“rbit%0,%1”變成“rbit%eax,%eax”
upd:正如@Notlikethat指出的那樣 - 你需要正確設置交叉編譯環境,因為目前你正在編譯x86而不是ARM。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.