IAR Workspace에서 설정 드롭다운 메뉴(Confi guration Drop-down Menu)
SPI 예제 실행
1. ST에서 제공되는 " stsw-stm32054" STM32F10x standard peripheral library3.5.0 를 다운 받는다
2. 압축을 풀면 ...
D:\stsw-stm32054_STM32F10x standard peripheral library3.5.0\STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\SPI 폴더의 파일을
D:\WORK\1_TEMPMON\stsw-stm32054_STM32F10x standard peripheral library3.5.0\STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Template 폴더아래에 소스파일을 제거하고 복사해서 넣거나 덮어쓴다.
3. IAR의 경우....V7.xx에서
D:\stsw-stm32054\STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Template\EWARM 폴더에 있는 Project.eww를 프로젝트를 load??? 연다..
다른 데모보드 사용시
STM32F103ZET6을 사용할 경우는
IAR Workspace에서 설정 드롭다운 메뉴(Confi guration Drop-down Menu) 에서
STM3210E-EVAL으로 설정한다.
위의 설정에 따라 .. EWARMv5 그룹의 startup 파일이 다르게 설정된다.
startup_stm32f10x_hd.s를 불러오게 설정되어 있다...
///////////////////////////////////////////////////////////////////////////////////////////
STM32100B-EVAL로 설정하면
EWARMv5 그룹에서 startup_stm32f10x_md_vl.s 선택되며
//////////////////////////////////////////////////////////////////////////////////////////
STM3210E-EVAL 설정하면
EWARMv5 그룹에서 startup_stm32f10x_hd.s 로 선택된다
STM3210E-EVAL으로 설정으로 설정하여 컴파일 하면
아래와 같은 에러가 다수 발생함
Error[Pe147]: declaration is incompatible with "__nounwind __interwork __softfp unsigned long __get_PSP(void)" (declared at line 52 of "C:\Program Files (x86)\IAR D:\WORK\1_TEMPMON\12_STM32F10x_SPItest\Libraries\CMSIS\CM3\CoreSupport\core_cm3.h 1084
///////////////////////////////////////////////////////////////////////////////////////////////////
해결방법은...
아래 링크를 참조한다.
https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=https%3a%2f%2fmy%2est%2ecom%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fSTM32Discovery%2fGetting%20start%20with%20IAR%206%2e30&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=4698#{703A1AE6-3B73-4738-9A6F-1128372F9E2D}
Please follow the following steps:
under project options:
1- on the "General Options" option in the "Library Configuration" tab
check the checkbox “Use CMSIS”
2- on the "C/C++ Compiler" option in the "Preprocessor" tab
remove the include directory of CM3 "$PROJ_DIR$\..\..\Libraries\CMSIS\CM3\CoreSupport"
///////////////////////////////////////////////////////////////////////////////////////////////////
프로젝트 마우스 오른쪽 클릭하여 option을 열어서
General Options의 Library Configuration에서 CMSIS에서 v Use CMSIS에 체크를 해준다.
C/C++ Compiler의 Preprocessor에서
Additional include directories에서
$PROJ_DIR$\..\..\Libraries\CMSIS\CM3\CoreSupport 항목을 제거한다.
추가로...
Defined symbols에
USE_STDPERIPH_DRIVER
STM32F10X_HD
USE_STM3210E_EVAL
을 추가한다.