cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube_FW_F4 how properly import examples to atollic

Posted on December 08, 2016 at 16:07

Hello community!

I am facing constant problems with running examples for my stm32f4 discovery using atollic Truestudio. The problems are mostly that after importing, the project is missing paths to some resources. Typically hal drivers and so on.

My question is, how properly import example to my Truestudio? 

I have tried multiple approaches so far.

1) Just import porject using atollics 'import...' button letting the whole example repository at my doccuments (outside atollics workspace). This fails 'fatal error: stm32f4xx_hal_rcc.h No such file or directory'

2) Copy whole examples repository into my atolics workspace and import the example. Just the same result.

3) I have tried modify approach 2 - i open project properties, go to C/C++ General->Paths and Symbols->Includes. Here i can see that the path to directory with drivers is already there

 ../../../../../../../Drivers/CMSIS/Device/ST/STM32F4xx/Include

I have tried add absolute path to both Inc and src directories but nothing.

I consider example as something that should be ready to go, if ST claimes that those examples support my enviroment (Atollic). But its not happening.

Any help would be appreciated

Thanks Jan

#atollic #example-stm32f4 #truestudio
1 ACCEPTED SOLUTION

Accepted Solutions
shingadaddy
Senior
Posted on December 08, 2016 at 16:30

I had this issue if I left things in the download directory and found it to be a PATH TOO LONG issue.

Put your CUBE download at the root. Then import to Truestudio. Also sometimes it would still have a complaint on the initial build ( the auto- first-time-build after import. But do a clean and then build and all went okay.

See if that helps.

View solution in original post

9 REPLIES 9
Imen.D
ST Employee
Posted on December 08, 2016 at 16:24

Dear

Slavot_nek.Jan

‌,

You can follow this

http://www.st.com/content/ccc/resource/technical/document/user_manual/24/df/3a/30/73/31/4e/9b/CD002837pdf/files/CD002837pdf/jcr:content/translations/en.CD002837pdf

which help youto use the Atollic TrueSTUDIO® software development toolchain andprovides you some guidelines to build and run the sample program.

You shouldmake sure that the include paths are set up correctlyand that the IDE can find the source and include files your are trying to compile.

Hope this helps you.

Best Regards

-Imen-

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
shingadaddy
Senior
Posted on December 08, 2016 at 16:30

I had this issue if I left things in the download directory and found it to be a PATH TOO LONG issue.

Put your CUBE download at the root. Then import to Truestudio. Also sometimes it would still have a complaint on the initial build ( the auto- first-time-build after import. But do a clean and then build and all went okay.

See if that helps.

Walid FTITI_O
Senior II
Posted on December 08, 2016 at 16:33

Hi

Slavot_nek.Jan

,

Refer to the user manual

http://www.st.com/content/ccc/resource/technical/document/user_manual/f5/d3/1f/db/8f/82/4b/ac/DM00037pdf/files/DM00037pdf/jcr:content/translations/en.DM00037pdf

. In part 8 'Using Atollic TrueSTUDIO' , the document describes step by step the project creation/import using Atollic IDE.

-Walid F-

shingadaddy
Senior
Posted on December 08, 2016 at 16:46

'2) Copy whole examples repository into my atolics workspace and import the example. Just the same result.'

If you used the checkbox option in the TrueStudio import function to 'Copy projects into workspace' -- that doesn't do what you might expect. No I don't understand it either yet.

If you manually copied files over, my *guess* would be --   you missed one.

Posted on December 09, 2016 at 11:16

Hi shingadaddy!

Thanks for your answers. 

I have manually copied whole repository with examples directly to my atollic workspace. 

The path is: 'C:\Users\myuser\Atollic\TrueSTUDIO\F4_TestWorkspace\STM32Cube_FW_F4_V1.14.0'. So it is whole repo with all the drivers and so on. 

I will try your method with coping repository to root C:\\ and import from there. I hope it will help. 

BTW it is really silly that the ide cant handle longer paths. In ym point of view this is kinda bug and throws a lot of shame on developers of the ide (if this problem is actually present).
Posted on December 09, 2016 at 11:21

I will have a look at that. 

Posted on December 09, 2016 at 11:28

Sir you made my day! It was indeed problem with path too long. When i copied example repo as 'low' as i could C:\example, now when i import the project it works like a charm. Build without errors, succesfuly loaded into the mcu. What a shame on developers of atollic .

Thanks a lot!
Posted on December 09, 2016 at 16:05

No problem . Like to help if/when I can.

Atollic handles the Linked Resource Method necessary to handle the ST  'SuperMarket style' delivery of example projects.. They seem to team up and work together on it. But it definitely makes for really wieldy paths in projects.

That's a PITB for PROJECT oriented folks like me who keep files more in PROJECT collections rather than Supermarket collections.

Good luck with your projects!

bogdan.d
Associate II

Hi,

I do have a similar problem.

I am trying to import the example for my Discovery F469I board and even that I have moved the cubef4 to root:C:\STM32Cube_FW_F4_V1.23.0 it is taking a loot of time to index all the files and even so I got a warning saying that some paths cannot be found. After that I am building the project using parallel build and is taking minutes. After 2-3 attempts finally I can debug the project. Also the building is stops some times at xx percentage randomly. I am a newbie in ARM and purchase this board to play and understand the functionally of these examples, but it seems that instead of learning I am debugging the tool. Some other ideas of what I can do?