Добрый день. Есть проект, который собирается и работает из под eclips-а. Так как смог осилить заливку через dfu-util, хотелось бы попытаться избавиться от eclipse и перевести разработку на cmake. Написал файл тулчейна, и проекта. При сборке cmake по команде cmake -DCMAKE_TOOLCHAIN_FILE=~/Projects/Sampler/stm32.cmake -G "Unix Makefiles" говорит:
Код
-- The C compiler identification is GNU 4.5.2
-- The CXX compiler identification is GNU 4.5.2
-- Check for working C compiler: /opt/codesourcery/arm-2011.03/bin/arm-none-eabi-gcc
-- Check for working C compiler: /opt/codesourcery/arm-2011.03/bin/arm-none-eabi-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/codesourcery/arm-2011.03/bin/arm-none-eabi-g++
-- Check for working CXX compiler: /opt/codesourcery/arm-2011.03/bin/arm-none-eabi-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- The ASM compiler identification is GNU
-- Found assembler: /opt/codesourcery/arm-2011.03/bin/arm-none-eabi-as
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xxxx/Projects/Sampler
Далее по команде make идет идет компиляция всех исходников, кроме, почему-то ассемблерного файла с векторами, хотя он в целях указан. Далее следует ошибка линкера:
Код
/opt/codesourcery/arm-2011.03/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/bin/ld: cannot open linker script file -nostartfiles: No such file or directory
collect2: ld returned 1 exit status
make[2]: *** [Sampler.elf] Error 1
make[1]: *** [CMakeFiles/Sampler.elf.dir/all] Error 2
make: *** [all] Error 2
Отсюда 3 вопроса:
1. Как заставить cmake брать arm-none-eabi-ld вместо ld из другой директории (хотя, судя по всему, файлы одинаковые).
2. Почему не хочет браться ассмеблерный файл с векторами?
3. Как его попытаться уговорить собраться?