cancel
Showing results for 
Search instead for 
Did you mean: 

Basic IDE setup for an STM32F100RB and IAR

scook116
Associate II
Posted on October 02, 2015 at 04:36

I am experiencing a surprising amount of difficulty trying to set up an STM32 VL Discovery board (STMF100RB) with an IDE (IAR EWARM). I have downloaded the STM_STD_Peripherals.zip. and can open examples from it's folder in IAR, but the examples are riddled with compiling errors all referencing to unknown libraries and &sharpinclude/&sharpdefine stuff. However I have done almost no configuration to IAR and i dont feel that IAR is set-up for my board. 

I have tried going into examples in the IAR Information center (first screen on launch) and even had IAR install the necessary drivers by clicking on ''ST''  under download in the examples menu. 

Could someone please tell me what I need to just get IAR working for my STM32F100RB (VL Discovery Board)?

#ide #stm32 #iar #stm32f100rb
6 REPLIES 6
Amel NASRI
ST Employee
Posted on October 02, 2015 at 17:29

Hi cook.steve,

Dedicated firmware package for STM32VLDISCOVERY is available on this page: http://www.st.com/web/en/catalog/tools/PF257914.

Is this what you are using?

What are the exact compilation errors you got?

-Mayla

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

scook116
Associate II
Posted on October 02, 2015 at 19:18

Hi Mayla, thanks for the help.

Yes that is the library I have already downloaded. Good to know it's confirmed tho.

When I open IAR I open one of the examples in the stm32 downloaded library as a new workspace, like this

File > Open Workspace >stsw-stm32078 > an3268 > stm32vldiscovery_package > Project > Examples >

RCC

After opening the ''EWARMv5'' file for the RCC example, I compile it and get the Warnings and errors shown in the 2 photos I attached .

As I said before, I don't feel like I've done enough set-up in IAR for it to properly compile for my board.

________________

Attachments :

IAR_RCC_2_.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1Ll&d=%2Fa%2F0X0000000ble%2Fr8wq.hkWRdKUkkOUl45sIoxwWnFRNB_iFEUGikI6L_Q&asPdf=false

IAR_RCC.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1Lg&d=%2Fa%2F0X0000000bld%2FNEzu9Rf7d_1XF63p_MkJRdVMlM_sXdApDpNtjTcM3TU&asPdf=false
Posted on October 02, 2015 at 19:38

Examples probably from older IAR releases. If reworking them you'd need to consider defines passed into the compiler, and the order and list of directories that include files are pulled from.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
raptorhal2
Lead
Posted on October 02, 2015 at 21:53

I suspect the problem is that the examples are not workspaces.

Copy an IAR template project into the same parent directory as the template, rename template top folder to something of your choice, then copy the example code into the template copy. That should resolve the path problems.

Cheers, Hal

scook116
Associate II
Posted on October 03, 2015 at 01:41

That makes sense, Hal. I've copied the example Template in the IAR Templates folder and renamed the copy. What code am I to paste in the template, the main code for RCC?

I've attached 2 pictures, the first one is of the contents inside the EWARMv5 RCC Example folder. 2nd attached picture shows the ''Intrinsics'' file that all of the errors stem from.

Thanks for the help.

________________

Attachments :

Intrinsics.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1JR&d=%2Fa%2F0X0000000blc%2FSd4QiQvqXUdTSyeAkN5RAi06Emht9HleKgwQB9t2zM0&asPdf=false

RCC_EWARMv5_Example_folder.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1Fl&d=%2Fa%2F0X0000000blb%2F3RMOk_UgtORGSeJ84jLSXLuq0mIvthgVr2cpEiZVEj8&asPdf=false
raptorhal2
Lead
Posted on October 03, 2015 at 20:37

What code am I to paste in the template, the main code for RCC?

Main.c, and it.c, and check the .h files for all the definitions you need. I haven't checked the example, but see if it has other support files for pushbuttons, LEDs and the like that are needed to make it run as coded.

As Clive1 said above, In Project Options/Compiler Options, Preprocessor tab make sure the paths are pointing to what you need.

Cheers, Hal