cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Compiling New ''Hello World'' IAR STM32L152RC Discovery Board project

itslopete
Associate
Posted on November 21, 2013 at 22:08

Hello Everyone,

I'm new to the IAR Embedded Workbench IDE (IAR embedded workbench for arm V 6.70.1.5794,  common components version 6.6.5.2892).  I have the STM32L152C discovery board and a ''Hello World'' sample project from STMicroelectronics I would like to compile using IAR.

This Hello World project, as is, compiles fine on IAR.  The problem is when I create a new project from scratch, re-useing all the exact same .c and .h files from the original project, I get a ''Fatal Erro[PE1696]: cannot open source file ''stm32l1xx.h''.  

Under the Project->options -> C/C++ Compiler -> Preprocessor tab, I have ensured that the include directories are correct (i've used the same library paths as the original project) .  Under ''Defined Symbols'' within the same tab, I've ensured that the same defined symbols are set as the original project.  

Under Project->Options->General Options-> Library Configuration I have the ''Use CMSIS'' option checked as well.  

I hope that someone out there has run into the same problem in the past.  Thanks to the community for the help.

Peter

#stm32l152c-discovery
2 REPLIES 2
Posted on November 21, 2013 at 22:25

Are you at the same directory depth? This could be problematic if the include paths are relative, have you tried to browse to them, or reselect them?

What if you clone the working project into a directory of a different name (with file manager of your choice), or clone the template project?

IAR hides a lot of project settings in the meta-data, perhaps you can inspect the EWW files.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
itslopete
Associate
Posted on November 21, 2013 at 22:31

Thanks for the response Clive,

Yes, I've browsed to the library paths.  I tried defining the library paths both relative to the project (as it is done in the original ST project), and setting the library paths by browsing to their locations and using the path name.  The folder depths of the two projects are the same.

I'll investigate the other two suggestions you've made and see what happens.