→ dakiyo:check ISA version 01/19 21:55
→ JUSTLOVEAYU:請問從哪邊去check ISA version? 01/19 23:02
→ rawpacket:先 file 一下你的執行檔看是不是 for ARM 的. 01/20 00:01
→ JUSTLOVEAYU:the message is:a.out: ELF 32-bit LSB executable, 01/20 00:53
→ JUSTLOVEAYU:ARM, version 1, statically linked, not stripped 01/20 00:53
→ JUSTLOVEAYU:看來應該有for ARM,接下來我該朝哪個方向去debug呢? 01/20 00:56
→ badwork:你是照網頁教的用arm-elf-run ./hello來執行嗎? 01/20 13:37
推 shaopin:我覺得從一開始"更新toolchain"這件事就有問題..why? 01/20 15:03
→ shaopin:去讀ARM cp15的register就能獨到ARM version 01/20 15:04
→ JUSTLOVEAYU:對,我是用arm-elf-run ./hello來執行,這樣是ok的 01/20 16:54
→ JUSTLOVEAYU:後來我把hello執行檔傳送到板子執行卻是出錯的 01/20 16:55
→ JUSTLOVEAYU:因為廠商所附贈的cross compiler不支援gcc的某些參數 01/20 16:57
→ JUSTLOVEAYU:所以我才會想自行更新cross compiler 01/20 16:57
→ JUSTLOVEAYU:s大不好意思,現在在板子上執行hello都有問題了,更不 01/20 16:59
→ JUSTLOVEAYU:說是去讀register了@@ 01/20 16:59
推 dakiyo:你是放到板子上的linux跑嗎?如果是的話用arm-linux-gcc來編 01/20 22:30
推 askacis:EABI的問題?不知道原本的tool-chain版本是多少? 01/20 22:39
→ askacis:原po可以check一下kernel config裡面, Use the ARM EABI 01/20 22:41
→ askacis:to compile the kernel這行有沒有被勾選,沒有的話把他開啟 01/20 22:42
→ askacis:或者是用arm-linux-readelf -h 讀一下你的hello的header 01/20 22:43
→ askacis:以及kernel的,看他們的Flag屬性是不是一樣... 01/20 22:44
→ askacis:如果kernel跟userspace的ABI介面不一樣,userspace會有問題 01/20 22:47
→ JUSTLOVEAYU:是的,hello是在host端做編譯,之後再把編譯出來的執 01/21 01:16
→ JUSTLOVEAYU:行檔放到板子上的linux跑 01/21 01:16
→ JUSTLOVEAYU:感謝樓上兩位的指導,等我回LAB我再check看看 01/21 01:19
推 shaopin:也不用run linux, 你有debugger的話用jtag讀就好了 01/21 11:09