Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » warning: control reaches end of non-void function(Building error using Ac6 STM32 MCU GCC for STM32F070xx )
icon8.gif  warning: control reaches end of non-void function [message #1746742] Fri, 04 November 2016 02:49 Go to next message
Mubdiul Hasan is currently offline Mubdiul HasanFriend
Messages: 38
Registered: November 2016
Member

Dear All,

I have been spend a lot of time on solving my project properties build problem. Embarrassed

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.

In Properties > C/C++ Build > Settings > MCU GCC Compiler > Includes I have linked all necessary paths.

In Properties > C/C++ general>Paths and symbols , I have added all HAL drivers, but the problem says


C:\Users\swend95_하산\Desktop\Design\notun_pj\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx.h:206:33: note: in definition of macro 'CLEAR_BIT'
#define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
^
..\inc\Src\stm32f0xx_hal_i2c_ex.c: In function 'HAL_I2CEx_ConfigAnalogFilter':
..\inc\Src\stm32f0xx_hal_i2c_ex.c:148:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
..\inc\Src\stm32f0xx_hal_i2c_ex.c: In function 'HAL_I2CEx_ConfigDigitalFilter':
..\inc\Src\stm32f0xx_hal_i2c_ex.c:200:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
..\inc\Src\stm32f0xx_hal_i2c_ex.c: In function 'HAL_I2CEx_EnableWakeUp':
..\inc\Src\stm32f0xx_hal_i2c_ex.c:240:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
..\inc\Src\stm32f0xx_hal_i2c_ex.c: In function 'HAL_I2CEx_DisableWakeUp':
..\inc\Src\stm32f0xx_hal_i2c_ex.c:280:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^

Kindly help me ! Crying or Very Sad
Re: warning: control reaches end of non-void function [message #1746817 is a reply to message #1746742] Sat, 05 November 2016 00:26 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
The error messages are saying the functions are returning without providing a value when one is expected. What that has to do with the macro isn't clear. It may simply to have been used close to where the errors are occurring.

Here's a similar example,
http://arduino.stackexchange.com/questions/28894/gcc-msg-note-in-definition-of-macro-max-error-message

You might also have a missing punctuation (such as ')' , '}', quote, etc.) or another preprocessor construct which wasn't closed properly, say with an #endif. These can be hard to track down.



Re: warning: control reaches end of non-void function [message #1746870 is a reply to message #1746817] Mon, 07 November 2016 06:08 Go to previous messageGo to next message
Mubdiul Hasan is currently offline Mubdiul HasanFriend
Messages: 38
Registered: November 2016
Member

Dear Sir Devid,

Thank you very much to respond my post .
I was really disappointing for this issue,


Looking at your comment, I have added few code line as HAL examples says,

#ifdef USE_FULL_ASSERT
void assert_failed(uint8_t* file, uint32_t line)
{
*/
/* USER CODE END 6 */

}

#endif

This time again console says,

n file included from ..\startup\Src\stm32f0xx_hal_dac_ex.c:56:0:
C:\Users\swend95_하산\Desktop\Design\notun_pj\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_hal.h:528:29: error: unknown type name '__IO'
void HAL_Delay(__IO uint32_t Delay);

This time Error log said,
Orphaned CDT build configuration fr.ac6.managedbuild.config.gnu.cross.exe.debug.2142458825: parent extension cfg fr.ac6.managedbuild.config.gnu.cross.exe.debug.2142458825 not found

and Error: Cannot run program "gcc": Launching failed


I have added, CDT path in In Properties > C/C++ Build >Environment.


This time CDT again shows similar error.

Do you think, any mistake for installing java version/gcc toolchain/cdt plugin version? Help me please.

Regards
Hasan
Re: warning: control reaches end of non-void function [message #1746949 is a reply to message #1746870] Tue, 08 November 2016 00:31 Go to previous message
Mubdiul Hasan is currently offline Mubdiul HasanFriend
Messages: 38
Registered: November 2016
Member

Dear Sir David,

Right at the moment, the errors moved , STM32F0xx_HAL_Driver to CMSIS\Include .

This time console says,

C:\STM32_toolchain\common\Drivers\CMSIS\Include/arm_math.h:6970:24: error: expected '=', ',', ';', 'asm' or 'attribute' before 'arm_bilinear_interp_q7'
static __INLINE q7_t arm_bilinear_interp_q7(


Could you kindly explain this issue ?

Regards
Hasan
Previous Topic:Binary not found
Next Topic:Programatically disabling the CDT builder on a programatically created C project
Goto Forum:
  


Current Time: Thu Apr 18 23:48:28 GMT 2024

Powered by FUDForum. Page generated in 0.01945 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top