andestech / amazon-freertos

MIT License
4 stars 5 forks source link

binary generation error #5

Open bloom5 opened 3 years ago

bloom5 commented 3 years ago

after Linking C executable aws_tests.elf and Creating .bin file, "iscv32-elf-objcopy-NOTFOUND: not found" was reported image

Thank you!

kevinwang821020 commented 3 years ago

Hi @bloom5, Sorry for replying so late. I have tried to reproduce your problem on ubuntu 20.04. But unfortunately, I can't reproduce it. Can you tell me that where is your riscv toolchain get from? Is it from the Andestech? The source is mentioned on start up guide.

Thank you.

bloom5 commented 3 years ago

Hi Kevin, I used the toolchain in your aws_development_tools repo(https://github.com/andestech/aws_development_tools)

kevinwang821020 commented 3 years ago

Hi @bloom5, thank you for your replying, because the problem can't be reproduced, I need more information from you. Did you do any modification on the source code? If YES, could you let me know the diff ? Or maybe you can grep the "objcopy-NOTFOUND", and check where will the riscv32-elf-objcopy-NOTFOUND be used. Because as I know, there is no "riscv32-elf-objcopy-NOTFOUND" be mentioned in any file. After all riscv32-elf-objcopy-NOTFOUND is very strange .

Thank you for your helping.

bloom5 commented 3 years ago

Hi Kevin, There is no source code change. riscv32-elf-objcopy-NOTFOUND is used in the build.make file which is located in the build/vendors/andes/boards/corvette_f1_n25/CMakeFiles/aws_demos.dir. Build folder is generated by cmake.

kevinwang821020 commented 3 years ago

Hi @bloom5 , OK, I guess you lost the objcopy somehow. So when cmake general the build folder, it change the command riscv32-elf-objcopy to riscv32-elf-objcopy-NOTFOUND. The source code is in the "vendors/andes/boards/corvette_f1_n25/CMakeLists.txt" line 333.

Anyway, could you help me to check if you can use riscv32-elf-objcopy on terminal in Ubuntu? If you can't, I think you should solve this problem first. You can see if riscv32-elf-objcopy is in the toolchan folder "xxx/nds32le-elf-newlib-v5/bin/"? If not, please re-install the toolchain again. If yes, maybe the permission of riscv32-elf-objcopy is not correct. As I know, if the permission of riscv32-elf-objcopy is 111(all execute only) will occur the problem like you mention. You can try to chmod the permission to 555. If everything is normal, um...it's very weird.

bloom5 commented 3 years ago

Hi Kevin, riscv32-elf-objcopy is in the tool path, and even when permission is set correct, the error still occurs. I can get quick fix if I change riscv32-elf-objcopy-NOTFOUND to riscv32-elf-objcopy and its full path in the build.make file. But it is really weried all riscv32-elf-gcc in the file get the full path, while riscv32-elf-obj not, especially I am not quite familiar with cmake.