Cannot find includes

Discussions concerning TrueSTUDIO for STM32 9.0.0 and later versions.

Moderators: Markus Girdland, Mattias Norlander

CIM
Posts: 2
Joined: Fri Jun 14, 2019 3:32 pm

Cannot find includes

Postby CIM » Fri Jun 14, 2019 3:58 pm

Purchased STM32F3Discovery and STM32F722 Nucleo-144. Downloaded all of the recommended support software (inc. TrueStudio 9.3.0). Using the Discovery board, followed all instructions to the letter and tried to compile and run the Compass-Accel demo. No go - the code is littered with non-functioning "includes", mainly .h files, and more annoying, some of the data type definitions are unrecognised. Copied a few .h into the "User" directory as an easy fix, and they were referenced ok. However, there are too many missing to do this for all files, and why on earth should I have to anyway? Tried creating a catchall bunch of new include references (i.e. libraries, CMSIS etc) in project properties. They appeared in the Include folder ok, but to no avail. Tried the same thing with the Nucleo and Blinky, and the same thing happened.

Scrubbed every ST file off my PC (quite a lot), and started again from scratch, in case I simply missed something. Still no go. The include process is so fundamental to C/C++, you would have thought that it would have functioned correctly "out of the box". The last compiler I wrote had a robust pre-processor, and it's not that hard to do. I have searched the forums for an easy fix, found lots of similar posts to this, and after wasting nearly a week, can see no reason to continue with the STM32 series. What a waste.

So - what am I doing wrong? Is there a Magic Flag that needs to be set somewhere in STMCubeMX or TrueStudio? Why did the outcome not match the documentation?

CIM
Posts: 2
Joined: Fri Jun 14, 2019 3:32 pm

Re: Cannot find includes

Postby CIM » Fri Jun 14, 2019 4:27 pm

Here again! Having just posted this thread, I discovered TrueStore, selected a suitable demo, re-ran TrueStudio and then downloaded the STM32F3Discovery Demonstration project (i.e. the Compass-Accel program). No include problems. Did a build, and tried to debug. A slight pause while I was invited to upgrade STLINK, which was managed for me.

I had edited the 8 led flicker program to include a 1 second wait to ensure that it was actually my version running, and ran debug again.

Lo and behold, it loaded and ran first time (out of the box)! Unplugged and restarted, and it is still there.

I will now spend a short time comparing the two projects to find out why the first didn't build properly.

For any other confused Newbies, this is the route to take. Download something close to what you want, test run it, and then edit that project using the project structure.


Return to “TrueSTUDIO for STM32 discussions”

Who is online

Users browsing this forum: No registered users and 1 guest