Page 1 of 1

Stm32 redefinition of typedef 'thread_t'

Posted: Wed Sep 03, 2014 11:04 am
by zamek
Hi All,

I upgraded to the new HEAD from git repository and I cannot compile my projects.
And I checked demos, in demos/STM32/RT-STM32F407-DISCOVERY:

make clean
make

Compiling chcore.c
In file included from ../../../os/rt/include/ch.h:76:0,
from ../../../os/rt/ports/ARMCMx/chcore.c:29:
../../../os/rt/include/chschd.h:76:23: error: redefinition of typedef 'thread_t'
../../../os/rt/include/ch.h:67:23: note: previous declaration of 'thread_t' was here
../../../os/common/ports/ARMCMx/compilers/GCC/rules.mk:203: recipe for target 'build/obj/chcore.o' failed
make: *** [build/obj/chcore.o] Error 1

And I checked all tests of STM32 the result is the same.

Thx
Zamek

Re: Stm32 redefinition of typedef 'thread_t'

Posted: Wed Sep 03, 2014 1:08 pm
by Giovanni
Hi,

What compiler are you using? I tested using GCC, Keil and IAR and there are no warning about the re-declaration.

Giovanni

Re: Stm32 redefinition of typedef 'thread_t'

Posted: Wed Sep 03, 2014 3:01 pm
by zamek
Hi Giovanni,

Thx for your replay, I used Debian Linux, with arm-non-eabi-gcc 4.5.2 from CodeSourcery.
After I uninstall it and install gcc-arm-none-eabi package from Debian repository it works well.

thx for your help.

Zamek

Re: Stm32 redefinition of typedef 'thread_t'

Posted: Wed Sep 03, 2014 3:06 pm
by Giovanni
Hi,

Thanks, I think that the duplication should go anyway, I will update the code.

Giovanni