LedgerHQ / nanos-secure-sdk

Secure (ST31) SDK for Ledger Nano S
Apache License 2.0
96 stars 54 forks source link

Building fails #33

Closed pashinov closed 3 years ago

pashinov commented 3 years ago

I faced with problem after migration to 2.0 integration. When I try to build app-boilerplate I get error:

cx_stubs.S:1:0: error: target CPU does not support ARM mode

To setup toolchain I make next steps:

mkdir bolos-devenv

wget https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q1-update/+download/gcc-arm-none-eabi-5_3-2016q1-20160330-linux.tar.bz2
tar xf gcc-arm-none-eabi-5_3-2016q1-20160330-linux.tar.bz2
rm gcc-arm-none-eabi-5_3-2016q1-20160330-linux.tar.bz2
mv gcc-arm-none-eabi-5_3-2016q1 bolos-devenv/gcc-arm-none-eabi-5_3-2016q1

wget https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.0/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz -O clang+llvm.tar.xz
tar xf clang+llvm.tar.xz
rm clang+llvm.tar.xz
mv clang+llvm* bolos-devenv/clang-arm-export

export BOLOS_ENV=$(pwd)/bolos-devenv

Can you tell me what I do wrong?

TamtamHero commented 3 years ago

Hmm, weird Can you try a modern GCC and a less recent Clang ? You can use the versions described here (just updated the doc) https://ledger.readthedocs.io/en/latest/userspace/setup.html

pashinov commented 3 years ago

Thanks for reply. It helped (clang 9.0, gcc 10.0) and my ledger app works well with firmware 2.0.