cancel
Showing results for 
Search instead for 
Did you mean: 

While using same project in SW4STM32

Md Mubdiul Hasan
Associate III
Posted on December 06, 2016 at 09:45

Dear Sir,

As we discussed earlier, difficulties on adapting project in SW4STM32 and mdk-keil, things might related to compiler, including paths, wrong pre-processors, undefined characters, unresolved items, miss-matching of slandered files/states with HAL libraries, we did not find any particular clue.

https://community.st.com/thread/32323

Lets see the difficulties accordance with

SW4STM32 because mdk-keil and coo-cox is failed!! (AC6,

http://www.openstmorg/

,

https://community.arm.com

,

https://www.eclipse.org/

All are not usefull)

Right at the moment, the error console says,

arm-none-eabi-gcc -mthumb -mfloat-abi=soft -E ''-IC:\\Ac6\\SystemWorkbench\\plugins\\fr.ac6.mcu.externaltools.arm-none.win32_1.7.0.201602121829\\tools\\compiler\\bin'' ''-IC:\\STM32_toolchain\\lib\\gcc'' -IC:/STM32_toolchain/common/Drivers/STM32F0xx_HAL_Driver/Inc -IC:/STM32_toolchain/common/Drivers/STM32F0xx_HAL_Driver/Src -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -o ''startup\\Src\\stm32f0xx_ll_utils.o'' ''..\\startup\\Src\\stm32f0xx_ll_utils.c''

..\startup\Src\stm32f0xx_ll_utils.c:39:32: fatal error: stm32f0xx_ll_utils.h: No such file or directory

compilation terminated.

Kindly take a look the project properties setting, things might skip from my eyes.

0690X00000605d4QAA.png

#sw4stm32 #hal-diver #stm32

Note: this post was migrated and contained many threaded conversations, some content may be missing.
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on December 07, 2016 at 05:47

Ok, read the error

..\startup\Src\stm32f0xx_ll_utils.c:39:32: fatal error: stm32f0xx_ll_utils.h: No such file or directory

 

compilation terminated.

The C file exists, it is trying to compile it, and tries to &sharpinclude a file it can't find on line 39

It can't find it, because a) it doesn't exist anywhere in your project tree or b) it exists but not in a path /sub-directory you are specifying correctly. For a) you'd need to physically add the file, for b) you'd need to fix the pathing, something like '../Inc' might suffice for a Src and Inc directory pairing.

I'm not going to suggest you remove the LL files, you've tried a bunch of tool chains, but still have some systemic problem with managing/creating a functioning project. I'd much rather you start studying some documentation for one chain, and create simple projects until you understand how to use the tools instead of spending weeks going in circles. Your boss needs to provide you with support, or staffing, to achieve the goals if this is a critical project.

You need to think about a different way to attach screen shots, either the source image or the forum software is decimating the image to a point that it is very hard to read/decipher.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..

View solution in original post

11 REPLIES 11
Posted on December 06, 2016 at 22:08

looks like the error is saying that it can't find the file:

stm32f0xx_ll_utils.h which is referenced at line 39 in the file: \startup\Src\stm32f0xx_ll_utils.c.  Probably in an #include statement.  It seems like the directory that this file exists in is not listed in your list of places to look to resolve include requests by the compiler preprocessor.

First, take a look in the actual directory structure near the source file referenced above (the .c file) and find the .h file it is looking for.  It might be in the same directory as the .c file but it might be in a separate inc directory nearby.  wherever it is, you need to add this search path to your project. 

Once you know the path you need to add, on SW4STM32:

  1.    Right click on the project folder in the Project Explorer pane at the left.  At the bottom of the drop down menu click Properties

  2. Expand down the menu item for C/C++ Build and select Settings.  In the panel of folders in the middle select Includes

  3. In the include pane at the top right, click the green + icon, and when the dialog appears type in the new path and add it.  look at the format of the existing search paths to put in a relative path (../../etc) or use an absolute path starting with C:/

If you were using CoIDE before, that IDE automatically uses any files imported into your project structure as searchable for include files.  So if that .h file was in your project under CoIDE, you wouldn't have had to do anything to explicitly tell CoIDE where it was.  However with SW4STM32, and other current Eclipse-based IDE's this is not the case.  Even if you have all of your include directories showing up in the Project Explorer, they are not include paths unless explicitly added in this way.

Posted on December 07, 2016 at 01:13

Dear Sir Aaron,

Thank you a lot. 

I will follow your suggestion for sure. This is undoubtedly a good instruction. 

An STM expert told me from his experience,

'

After realizing that CubeMX did not meet everybody's expectations, the came up with the 'Low Level' library.

This 'Low Level' lib is part of CubeMX, or a sub-set thereof, and are labelled with this '_ll_' part in their name.

However, in some cases (especially for the STM32F7 I checked), this Low Level lib is nothing but a sorry stub (i.e. unusable fragments).

According to some comments on other threads, it is supposed to be complete for the STM32L4, 'with support for other MCUs in progress' - whatever this means.'

I will come back soon after getting something new from your guidance.

Regards

Hasan

Posted on December 07, 2016 at 02:41

Dear Sir Aaron,

I think I did some mistake while creating my project in SW4STM32, 

I just opened previous cubemx project, tried to add some files from coo-cox.

Now take a look, same source and include file are in different folder and your suggested setting. 

That is wrong, isnt it?

0690X00000605luQAA.png

Still the problem says,

arm-none-eabi-gcc -mthumb -mfloat-abi=soft -E ''-IC:\\Ac6\\SystemWorkbench\\plugins\\fr.ac6.mcu.externaltools.arm-none.win32_1.7.0.201602121829\\tools\\compiler\\bin'' ''-I'C:\\STM32_toolchain\\Workspace\\project_1\\startup\\Inc''' ''-I'C:\\STM32_toolchain\\Workspace\\project_1\\startup\\Src''' ''-IC:\\STM32_toolchain\\lib\\gcc'' -IC:/STM32_toolchain/common/Drivers/STM32F0xx_HAL_Driver/Inc -IC:/STM32_toolchain/common/Drivers/STM32F0xx_HAL_Driver/Src -O3 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -o ''startup\\Src\\stm32f0xx_ll_utils.o'' ''..\\startup\\Src\\stm32f0xx_ll_utils.c''

..\startup\Src\stm32f0xx_ll_utils.c:39:32: fatal error: stm32f0xx_ll_utils.h: No such file or directory

compilation terminated.

I think, 

stm32f0xx_ll_utils.c is still in the path.

Regards

Hasan

Posted on December 07, 2016 at 02:51

Hi Hasan,

Could you put your whole project directory in a zip file and put it up as an attachment in this forum?  I don't know if it is sensitive, but if not, I'd be happy to look at it and see if I can't find the problem.  Working this way is just passing back and forth guesses and it's not getting very far.

You can attach a file (or files) by clicking on the link at the top left of the comment editor that says ' Use advanced editor'.  Once you click that, you'll get a new window with the advanced editor, and if you scroll all the way to the bottom you'll see controls to attach files to your post.

Regards,

Aaron

Posted on December 07, 2016 at 03:43

It is complaining about the .H file not the .C file. Review the files in the directory tree and make sure that path is provided to the tool chain properly.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on December 07, 2016 at 05:00

Dear Sir Aaron,

I'd also be happy if I could show the whole project.

I talked to my boss, he said its a huge funding project in our company and indeed a resource that should keep in safe.

For the confidential issues with company I cant publish full project here.

I think, this company might get this project code from third party vendor and try to develop new one.

In this circumstances, what I could do without represent the error ?

Regards

Hasan

Posted on December 07, 2016 at 05:06

Dear Sir, 

I also do believe it comes from C file, we saw it before and talked a lot more.

Do you  think what mistake I am doing is, indicating same (

stm32f0xx_ll_utils.h)

file path in different folder at project tree?

Take a look the second image.

To get relief from this file, dont you suggest me to remove such low level '

_ll_'  type  files?

Regards

Hasan

Posted on December 07, 2016 at 05:47

Ok, read the error

..\startup\Src\stm32f0xx_ll_utils.c:39:32: fatal error: stm32f0xx_ll_utils.h: No such file or directory

 

compilation terminated.

The C file exists, it is trying to compile it, and tries to &sharpinclude a file it can't find on line 39

It can't find it, because a) it doesn't exist anywhere in your project tree or b) it exists but not in a path /sub-directory you are specifying correctly. For a) you'd need to physically add the file, for b) you'd need to fix the pathing, something like '../Inc' might suffice for a Src and Inc directory pairing.

I'm not going to suggest you remove the LL files, you've tried a bunch of tool chains, but still have some systemic problem with managing/creating a functioning project. I'd much rather you start studying some documentation for one chain, and create simple projects until you understand how to use the tools instead of spending weeks going in circles. Your boss needs to provide you with support, or staffing, to achieve the goals if this is a critical project.

You need to think about a different way to attach screen shots, either the source image or the forum software is decimating the image to a point that it is very hard to read/decipher.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on December 07, 2016 at 06:45

Dear Sir Clive1,

I'd much rather you start studying some documentation for one chain, and create simple projects until you understand how to use the tools instead of spending weeks going in circles. Your boss needs to provide you with support, or staffing, to achieve the goals if this is a critical project.

I will for sure study the d

ocumentation for one chain.

At this moment, I find a clue (not sure its a reason)

As you said,

''../Inc'' must be follow, I saw my Korean WIN OS, might be showing 'W' symbol instead of

''../

I have correctedthis sign.

If you cant see the image in this post, kindly find it in attachment.

0690X00000605mnQAA.png

Now the console says,

4:32:45 **** Incremental Build of configuration Debug for project project_1 ****

Info: Internal Builder is used for build

arm-none-eabi-gcc -mthumb -mfloat-abi=soft -E -IC:/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.7.0.201602121829/tools/compiler/bin -IC:/STM32_toolchain/Workspace/project_1/startup/Inc ''-IC:/STM32_toolchain/Workspace/project_1/startup/Src -I'C:/STM32_toolchain/lib/gcc' -I'C:/STM32_toolchain/common/Drivers/STM32F0xx_HAL_Driver/Inc' -I'C:/STM32_toolchain/common/Drivers/STM32F0xx_HAL_Driver/Src' -O3 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -o startup\\Src\\stm32f0xx_hal_rtc.o ..\\startup\\Src\\stm32f0xx_hal_rtc.c''

arm-none-eabi-gcc: fatal error: no input files

compilation terminated.

14:32:46 Build Finished (took 76ms)

Have you see no

LL files, exists here.

What to do with ''

fatal error: no input files''

________________

Attachments :

wrong_symbol.PNG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hz3L&d=%2Fa%2F0X0000000bFu%2FXLCCkyrOsBopDuyTl09D6AyaYgwyj2Sv7nSvixZMzFg&asPdf=false