cancel
Showing results for 
Search instead for 
Did you mean: 

Hard to track down the actual cause.

Md Mubdiul Hasan
Associate III
Posted on November 09, 2016 at 06:13

Hi,

In the project properties setting, I am using arm-none-eabi-gcc toolchain.

This time toolchain is Ac6 STM32 MCU GCC and builder CDT internal.

Problem is if I add h files in HAL library that error log suggest me to do, it solved and if I build project again it shows the problem in CMSIS include H files.

0690X0000060MnYQAU.gif

Such as,

1. C:\STM32_toolchain\common\Drivers\CMSIS\Device\ST\STM32F0xx\Include/stm32f0xx.h:187:3: error: declaration for parameter 'FunctionalState' but no such parameter

} FunctionalState;

^

..\inc\Src\stm32f0xx_hal_flash_ex.c:990:1: error: expected '{' at end of input

}

^

..\inc\Src\stm32f0xx_hal_flash_ex.c:990:1: warning: control reaches end of non-void function [-Wreturn-type]

}

^

APIs, Headers,state machine files are exists in Project branch, but why the compiler showing errors in H files of driver ?

Looking at C code structure related reason, yes I found some style of C coding in CMSIS h files is different.

what should I do now?

1. CDT does not showing errors of my main files, there was a return type problem, I solved it.

3. I think compiler is compiling all files listed in project branch , do you want me to remove some of the files from project folder, is it repeating again as I include paths from C driver?

4. Is there any setting for which only compile my c file?

5. Do you believe, updated version of Java/gcc/Eclipse is needed ?

I am using this HAL driver STM32Cube_FW_F0_V1.6.0 downloaded from STM website.

Hope you will give me some good suggestions.

Regards

HASAN

#arm-cmsis-driver-pack #error #error #demonstration-builder #adding-files-to-the-project #arm-gcc #know-your-tools #arm-gcc #gcc

Note: this post was migrated and contained many threaded conversations, some content may be missing.
46 REPLIES 46
Md Mubdiul Hasan
Associate III
Posted on November 16, 2016 at 01:19

Dear Sir AvaTar,

 Thank you to figure-out things nicely here. Yes..It might be main cause here.After searching same issues on Keil discussion forum, I got...

If it is telling you that there is ''No such file or directory''.

There are two possible reasons for that:

1.

 The file really does not exist at all on your machine;

2.

 The file does exist, but you haven't correctly configured you project to be able to find it.

What I did is ....

1. Search this file in C:\MDK5-projects....its exists

2. Locate this file in Optipn for target ...include paths...no changes !!

Do you think, its from preprocesssor setting errors?

Something need to do   here, 

http://www.keil.com/support/man/docs/uv4/uv4_dg_adscc.htm

 

If so, can you can you tell me where I need to set those functions ?

Regards

Hasan

AvaTar
Lead
Posted on November 16, 2016 at 10:51

This forum had often been inaccessible in the last two days, I don't wait several minutes for a site to load ...

> 2. Locate this file in Optipn for target ...include paths...no changes !!

I hope you understand that you need to select the folder that contains the file, not the file itself.

And there might be other issues (minor spelling errors in the path or an environment variable) that might keep the compiler from finding it.

This is very hard to judge from far ...

One simple test would be to copy the file (

stm32f0xx_hal.h

) into another, ''working'' folder. If that works you know it's a path/file name problem.

Of course that is no permanent solution, or solution at all.

As said, the Keil forum would be my alternative recommendation for help.

I don't use Keil uVision (nor Cube), so I certainly can't reproduce you issue here.

Posted on November 16, 2016 at 16:28

It still sounds like you don't have the Include Paths set correctly, and I really can't tell what you actually have set up as you don't provide any screen shots to be able to validate your assertions that it is as it should be. This list of paths may well contain a half-dozen directories that the compiler searches in order for ''foo.h'', etc. If it can't find the file it is because it is being told to look in the wrong places.

General rules for Keil are that your paths should not be off the Desktop or other virtual directories, should not contain odd characters and/or hieroglyphs, and should avoid spaces or things that could be misinterpreted.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Md Mubdiul Hasan
Associate III
Posted on November 17, 2016 at 02:49

Dear Sir AvarTar,

My apologies for misinterpreting things which should be explain  correctly.

The options for target, I did connect the folder not files.

Yes, I did copy that file in the HAL library folder and still its unsolvable.

From now on, I will carry my question in Eclipse based.

There might me some issues relating the project setting, and may be I am adding same files which already exists in my project try or include path folder!

Kindly take a look the attachment,0690X00000605SZQAY.png

Md Mubdiul Hasan
Associate III
Posted on November 17, 2016 at 03:46

Dear Sir Clive 1,

Thank you once again.

I understand that compiler could be confused due to error setting the project and including same file in different path.

For the seek of solution, I am adding an attachment here.

Kindly check it if you find it here.

________________

Attachments :

Project_setting_hasan.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0tE&d=%2Fa%2F0X0000000bja%2FaP2w2tSc3u8Hu_Ac0D6KzKQXy.C57H3sKP2G_UZar98&asPdf=false
Md Mubdiul Hasan
Associate III
Posted on November 17, 2016 at 04:26

Dear Sir AvaTar,

You can find some other setting information in to this attached file.

Regards

Hasan

________________

Attachments :

selection_p.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I16O&d=%2Fa%2F0X0000000bjY%2FQk5NcR3Hg2Sj24BrCoxJzHoZWXRT.UOtwDKtGG9FMD0&asPdf=false
AvaTar
Lead
Posted on November 17, 2016 at 07:59

Viewing the image you posted, the path separation characters don't look good.

When I look at my configurations, it's either '\' or '/'.

Md Mubdiul Hasan
Associate III
Posted on November 17, 2016 at 09:05

Dear Sir AvaTar,

 

Do you mean its should be with a bar like / ?

Or do you mean in this way... 'C:\STM32_toolchain\common\Drivers\CMSIS\Device\ST\STM32F0xx\Include'?

Have you see other setting which I have been attach in this before this conversation?

Regards

Hasan

AvaTar
Lead
Posted on November 17, 2016 at 10:34

> Or do you mean in this way... 'C:\STM32_toolchain\common\Drivers\CMSIS\Device\ST\STM32F0xx\Include'?

 

That is how it looks like on a Windows platform.

> Do you mean its should be with a bar like / ?

 

Other platforms (Unix and Unix-like's) use the (forward) slash.

Eclipse is platform-independant and can deal with both, especially with '/' on Windows platform.

I have the suspicion your ''missing'' file is the very first include file the toolchain is going to search.

Can you post the full build log (including the call command line) ?

In Eclipse, it is the output that ends up in the ''Console'' window.

Md Mubdiul Hasan
Associate III
Posted on November 18, 2016 at 01:29

Dear Sir AvaTar,

Its true that,

compiler shows different errors in different time you compile.

If you take a look on attachment text file, you will find what actual full build log in CDT console view.

Regards

Hasan

________________

Attachments :

CDT_console_view.txt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0ri&d=%2Fa%2F0X0000000bjZ%2Fevxdf6t20z_lMrWcnJ_Nmc69dYN.2rwlFsybGDqodhU&asPdf=false