Functions do not return value

Discussions concerning TrueSTUDIO for STM32 9.0.0 and later versions.

Moderators: Markus Girdland, Mattias Norlander

Olegus
Posts: 1
Joined: Thu Mar 21, 2019 4:33 pm

Functions do not return value

Postby Olegus » Sat Jun 01, 2019 1:24 pm

Header file

Code: Select all

#include "mysum2.h"

double s(int a, int b)
{
   return a+ b;
}

Source File

Code: Select all

#ifndef MYSUM2_H_
#define MYSUM2_H_

double s(int a, int b);

#endif /* MYSUM2_H_ */


main.c file

Code: Select all

#include "mysum2.h"
 double my =s(1,2);// SUMM(1, 2);


Errors are missing. The function is executed, correctly calculates the values, but does not return the value when exiting, but "hangs". The project has generated by CubeMx. I used to do the same thing and everything worked. May not include compiler settings.

Return to “TrueSTUDIO for STM32 discussions”

Who is online

Users browsing this forum: No registered users and 1 guest