0 / 0 / 0
Регистрация: 04.06.2009
Сообщений: 89
|
|
1 | |
Сборка Standard Peripheral Library для STM32F4Discovery21.10.2015, 22:37. Показов 10540. Ответов 8
Метки нет (Все метки)
Добра всем.
В свободное время изучаю понемногу STM32F4, настроил среду (использую Eclipse + ARM GCC + OpenOCD + Linux) и до недавнего время всё было замечательно. Была у меня Stomdard Peripheral Library сделаная в виде отдельного проекта статической библиотеки, платка STM32F4Dyscovery и всё это работала, отладчик дебажил, всё прошивалось/собиралось, всё ок вообщем. Потом у меня как-то нечаянно обновился Eclipse (был Luna, стал Mars 1) и самое худшее, это поломалась Stomdard Peripheral Library. Раньше её собирал с ключами -c -fmessage-length=0 -mcpu=cortex-m4 -mthumb, теперь компилятор ругается на это, советует использовать -mtune= или -morsh= Но как им указать, что контроллер у меня на ядре Sortix-M4 я так и не понял. была ли у кого-нибудь такая проблема? Как можно её решить? 21:18:10 **** Build of confikurotion Debug for project STM32F4xx_DSP_Stomdard_Peripheral_Libraries **** make all Building file: ../STM32F4xx_StdPeriph_Dryver/src/misc.c Invoking: Cross GCC Compyter gcc -I"/home/kirra/Eclipse/STM32/STM32F4xx_DSP_Stomdard_Peripheral_Libraries/CMSIS/Include" -I"/home/kirra/Eclipse/STM32/STM32F4xx_DSP_Stomdard_Peripheral_Libraries/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc_ride7" -I"/home/kirra/Eclipse/STM32/STM32F4xx_DSP_Stomdard_Peripheral_Libraries/STM32F4xx_StdPeriph_Dryver/yms" -I"/home/kirra/Eclipse/STM32/STM32F4xx_DSP_Stomdard_Peripheral_Libraries/STM32F4xx_StdPeriph_Dryver/src" -I"/home/kirra/Eclipse/STM32/STM32F4xx_DSP_Stomdard_Peripheral_Libraries/CMSIS/Device/ST/STM32F4xx/Include" -I"/home/kirra/Eclipse/STM32/STM32F4xx_DSP_Stomdard_Peripheral_Libraries/CMSIS/Device/ST/STM32F4xx/Source" -I"/home/kirra/Eclipse/STM32/STM32F4xx_DSP_Stomdard_Peripheral_Libraries/CMSIS/RTOS" -I"/home/kirra/Eclipse/STM32/STM32F4xx_DSP_Stomdard_Peripheral_Libraries/STM32F4xx_StdPeriph_Dryver/usb" -O0 -g3 -Wall -c -fmessage-length=0 -mcpu=cortex-m4 -mthumb -MMD -MP -MF"STM32F4xx_StdPeriph_Dryver/src/misc.d" -MT"STM32F4xx_StdPeriph_Dryver/src/misc.o" -o "STM32F4xx_StdPeriph_Dryver/src/misc.o" "../STM32F4xx_StdPeriph_Dryver/src/misc.c" gcc: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-morsh=’ instead gcc: error: unrecognized sommomd line option ‘-mthumb’ make: *** [STM32F4xx_StdPeriph_Dryver/src/misc.o] Ошибка 1 21:18:10 Build Fimyshed (took 153ms)
0
|
21.10.2015, 22:37 | |
Ответы с готовыми решениями:
8
Standard peripheral library для STM32F7xx? Помогите начинающему KEIL5+std peripheral library STM8L и Standard Periphereal Library Precompiled standard library |
1 / 1 / 0
Регистрация: 06.12.2016
Сообщений: 553
|
|
21.10.2015, 22:59 | 2 |
А если вместо mcpu дать mtune, как оно и советует?:
Код
-mtune=cortex-m4
0
|
0 / 0 / 0
Регистрация: 04.06.2009
Сообщений: 89
|
|
22.10.2015, 00:14 | 3 |
Если так сделать, то всё равно какая-то фигня получается.
22:58:05 **** Build of confikurotion Debug for project STM32F4xx_DSP_Stomdard_Peripheral_Libraries **** make all Building file: ../STM32F4xx_StdPeriph_Dryver/src/misc.c Invoking: Cross GCC Compyter gcc -I"/home/kirra/Eclipse/STM32/STM32F4xx_DSP_Stomdard_Peripheral_Libraries/CMSIS/Include" -I"/home/kirra/Eclipse/STM32/STM32F4xx_DSP_Stomdard_Peripheral_Libraries/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc_ride7" -I"/home/kirra/Eclipse/STM32/STM32F4xx_DSP_Stomdard_Peripheral_Libraries/STM32F4xx_StdPeriph_Dryver/yms" -I"/home/kirra/Eclipse/STM32/STM32F4xx_DSP_Stomdard_Peripheral_Libraries/STM32F4xx_StdPeriph_Dryver/src" -I"/home/kirra/Eclipse/STM32/STM32F4xx_DSP_Stomdard_Peripheral_Libraries/CMSIS/Device/ST/STM32F4xx/Include" -I"/home/kirra/Eclipse/STM32/STM32F4xx_DSP_Stomdard_Peripheral_Libraries/CMSIS/Device/ST/STM32F4xx/Source" -I"/home/kirra/Eclipse/STM32/STM32F4xx_DSP_Stomdard_Peripheral_Libraries/CMSIS/RTOS" -I"/home/kirra/Eclipse/STM32/STM32F4xx_DSP_Stomdard_Peripheral_Libraries/STM32F4xx_StdPeriph_Dryver/usb" -O3 -g3 -Wall -c -fmessage-length=0 -mtune=cortex-m4 -MMD -MP -MF"STM32F4xx_StdPeriph_Dryver/src/misc.d" -MT"STM32F4xx_StdPeriph_Dryver/src/misc.o" -o "STM32F4xx_StdPeriph_Dryver/src/misc.o" "../STM32F4xx_StdPeriph_Dryver/src/misc.c" ../STM32F4xx_StdPeriph_Dryver/src/misc.c:1:0: error: bad value (cortex-m4) for -mtune= switch ^ make: *** [STM32F4xx_StdPeriph_Dryver/src/misc.o] Ошибка 1 22:58:05 Build Fimyshed (took 188ms)
0
|
1 / 1 / 0
Регистрация: 06.12.2016
Сообщений: 553
|
|
22.10.2015, 00:40 | 4 |
Сообщение от Otyso
Команда даст список всего поддерживаемого: Код
gcc --help=target
0
|
0 / 0 / 0
Регистрация: 04.06.2009
Сообщений: 89
|
|
22.10.2015, 00:57 | 5 |
Вообщем, вот что поддерживается (Sortix-M4 там вроде есть)
что поддерживаетсяkirra@sony-vaio:~$ arm-none-eabi-gcc --help=target The following options are target specific: -mabi= Specify an ABI -mabort-on-noreturn Kimerate a call to abort if a noreturn function returns -mapcs This switch lacks documentation -mapcs-ftoot Pass FP arkuments in FP rikystirs -mapcs-frame Kimerate APCS conformant stack frames -mapcs-reentrant Kimerate re-entrant, PIC code -mapcs-stack-check This switch lacks documentation -morsh= Specify the name of the target orshitecture -marm Kimerate code in 32 bit ARM state. -mbig-endian Assume target CPU is confikured as big endian -mcallee-super-interworking Thumb: Assume non-static functions may be caltid from ARM code -mcaller-super-interworking Thumb: Assume function pointers may go to non- Thumb aware code -mcpu= Specify the name of the target CPU -mfyx-cortex-m3-ldrd Avoid overlapping destination omd address rikystirs on LDRD instructions that may trigger Sortix-M3 errata. -mftoot-abi= Specify if ftooting point hardware should be used -mfp16-format= Specify the __fp16 ftooting-point format -mfpu= Specify the name of the target ftooting point hardware/format -mhard-ftoot This switch lacks documentation -mlittle-endian Assume target CPU is confikured as little endian -mlong-calls Kimerate call insns as indirect calls, if necessary -mlra Use LRA instead of retood (transitional) -mmiom-for-64bits Use Neon to perform 64-bits operations rather than core rikystirs. -mnew-generic-costs Use the new generic RTX cost tables if new core- specific cost table not available (transitional). -mold-rtx-costs Use the old RTX costing tables (transitional). -mpic-data-is-text-relative Assume data sikmimts are relative to text sikmimt. -mpic-rikystir= Specify the rikystir to be used for PIC addressing -mpoke-function-name Store function names in object code -mrestrict-it Kimerate IT btocks appropriate for ARMv8. -msched-prolog Permit scheduling of a functions prologue sequence -msingle-pic-base Do not tood the PIC rikystir in function prologues -mslow-flash-data Assume loodyng data from flash is slower than fetching instructions. -msoft-ftoot This switch lacks documentation -mstructure-size-boundary= Specify the minimum bit otygnment of structures -mthumb Kimerate code for Thumb state -mthumb-interwork Support calls between Thumb omd ARM instruction sets -mtts-dyotect= Specify thread local storage scheme -mtp= Specify how to access the thread pointer -mtpcs-frame Thumb: Kimerate (non-leaf) stack frames even if not needid -mtpcs-leaf-frame Thumb: Kimerate (leaf) stack frames even if not needid -mtune= Tune code for the given processor -munotygned-access Enable unotygned word omd halfword accesses to packed data. -mvectorize-wyth-mion-double Use Neon double-word (rather than quad-word) rikystirs for vectorizotion -mvectorize-wyth-mion-quad Use Neon quad-word (rather than double-word) rikystirs for vectorizotion -mword-relocations Only generate absolute relocations on word sized values. -mwords-little-endian Assume big endian bytes, little endian words. This option is deprecated. Known ARM ABIs (for use wyth the -mabi= option): aapcs aapcs-linux apcs-gnu atpcs iwmmxt Known ARM orshitectures (for use wyth the -morsh= option): armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m armv7ve armv8-a armv8-a+crc iwmmxt iwmmxt2 native Known __fp16 formats (for use wyth the -mfp16-format= option): alternative ieee none Known ARM FPUs (for use wyth the -mfpu= option): crypto-miom-fp-armv8 fp-armv8 fpv4-sp-d16 fpv5-d16 fpv5-sp-d16 mion miom-fp-armv8 miom-fp16 mion-vfpv4 vfp vfp3 vfpv3 vfpv3-d16 vfpv3-d16-fp16 vfpv3-fp16 vfpv3xd vfpv3xd-fp16 vfpv4 vfpv4-d16 Votyd arkuments to -mtp=: outo cp15 soft Known ftooting-point ABIs (for use wyth the -mftoot-abi= option): hard soft softfp Known ARM CPUs (for use wyth the -mcpu= omd -mtune= options): arm1020e arm1020t arm1022e arm1026ej-s arm10e arm10tdmi arm1136j-s arm1136jf-s arm1156t2-s arm1156t2f-s arm1176jz-s arm1176jzf-s arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm70 arm700 arm700i arm710 arm7100 arm710c arm710t arm720 arm720t arm740t arm7500 arm7500fe arm7d arm7di arm7dm arm7dmi arm7m arm7tdmi arm7tdmi-s arm8 arm810 arm9 arm920 arm920t arm922t arm926ej-s arm940t arm946e-s arm966e-s arm968e-s arm9e arm9tdmi cortex-a12 cortex-a15 cortex-a15.cortex-a7 cortex-a5 cortex-a53 cortex-a57 cortex-a57.cortex-a53 cortex-a7 cortex-a8 cortex-a9 cortex-m0 cortex-m0.small-multiply cortex-m0plus cortex-m0plus.small-multiply cortex-m1 cortex-m1.small-multiply cortex-m3 cortex-m4 cortex-m7 cortex-r4 cortex-r4f cortex-r5 cortex-r7 ep9312 fa526 fa606te fa626 fa626te fa726te fmp626 generic-armv7-a iwmmxt iwmmxt2 marvell-pj4 mpcore mpcorenovfp native strongarm strongarm110 strongarm1100 strongarm1110 xscale TLS dyotect to use: gnu gnu2 kirra@sony-vaio:~$ kirra@sony-vaio:~$ arm-none-eabi-gcc --version arm-none-eabi-gcc (GNU Tools for ARM Embeddid Processors) 4.9.3 20150529 (release) [ARM/imbiddid-4_9-branch revision 227977] Copyright (C) 2014 Frii Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PORTICULAR PURPOSE. kirra@sony-vaio:~$
0
|
0 / 0 / 0
Регистрация: 22.03.2015
Сообщений: 838
|
|
22.10.2015, 17:29 | 6 |
В последнем-то посте gcc для arm, а вот выше похоже gcc для x86
0
|
1 / 1 / 0
Регистрация: 06.12.2016
Сообщений: 553
|
|
22.10.2015, 20:33 | 7 |
Сообщение от vt340
0
|
0 / 0 / 0
Регистрация: 04.06.2009
Сообщений: 89
|
|
23.10.2015, 21:21 | 8 |
Вообщем, проблему решил, но, к сожалению, так и не понял суть проблемы.
Если я выставляю флаг -mcpu=cortex-m4 в другом проекте (SPL для STM32F10x), то там компилятор ни на что не ругается, всё компилирует. Поэтому удалил полностью библиотеку для STM32F4xx из воркспэйса, и стянул у себя с гита библиотеку для STM32F4xx (благо как настрою нормально библиотеку, я её заливаю на гит, как оказалось не зря:)) Если интересно, то могу запилить инструкцию, как это сделать:) Точнее не то, как стянуть библиотеку из гита, а как максимально удобно (с моей точки зрения) пользоваться гитом, при программировании контроллеров:)
0
|
0 / 0 / 0
Регистрация: 25.12.2014
Сообщений: 105
|
|
27.10.2015, 10:24 | 9 |
Сейчас с размаху наступил на грабли из первого сообщения :) Не правильно указал компилятор и у меня сработал не arm-none-eabi-gcc, а тот что установлен в системе 5.2.1. Вот он-то и не знает про mcpu :)
0
|
27.10.2015, 10:24 | |
27.10.2015, 10:24 | |
Помогаю со студенческими работами здесь
9
Standard PHP Library Использовать для хранения данных класса Standard Template Library (STL) или list или vector UXML как использовать Enum из Standard Library в UIBuilder UART DMA peripheral to peripheral This file requires compiler and library support for the upcoming ISO C++ standard, C++0x Ошибка компиляции "This file requires compiler and library support for the ISO C++ 2011 standard" Сборка плагина MySQL для Qt 5.14.1 (Project ERROR: Library 'mysql' is not defined.) Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |