Page 1 of 1

Compile issue RT-STM32F407-DISCOVERY-MEMS

Posted: Sun Feb 21, 2016 10:47 am
by ABHA
Hi,

I'm trying to compile RT-STM32F407-DISCOVERY-MEMS to get my board verified. I'm using Ubuntu 14.04 and using the toolchain maintained by the folks at ARM (https://launchpad.net/gcc-arm-embedded)

I get this error message when trying to compile this:

Compiling usb_lld.c
../../../os/hal/ports/STM32/LLD/OTGv1/usb_lld.c: In function 'usb_lld_start':
../../../os/hal/ports/STM32/LLD/OTGv1/usb_lld.c:864:31: warning: passing argument 1 of 'chThdCreateI' from incompatible pointer type [-Wincompatible-pointer-types]
usbp->tr = chThdCreateI(usbp->wa_pump, sizeof usbp->wa_p
^
In file included from ../../../os/rt/include/ch.h:87:0,
from ../../../os/hal/osal/rt/osal.h:32,
from ../../../os/hal/include/hal.h:28,
from ../../../os/hal/ports/STM32/LLD/OTGv1/usb_lld.c:27:
../../../os/rt/include/chthreads.h:179:13: note: expected 'const thread_descriptor_t * {aka const struct <anonymous> *}' but argument is of type 'stkalign_t * {aka long long unsigned int *}'
thread_t *chThdCreateI(const thread_descriptor_t *tdp);
^
../../../os/hal/ports/STM32/LLD/OTGv1/usb_lld.c:864:18: error: too many arguments to function 'chThdCreateI'
usbp->tr = chThdCreateI(usbp->wa_pump, sizeof usbp->wa_p
^
In file included from ../../../os/rt/include/ch.h:87:0,
from ../../../os/hal/osal/rt/osal.h:32,
from ../../../os/hal/include/hal.h:28,
from ../../../os/hal/ports/STM32/LLD/OTGv1/usb_lld.c:27:
../../../os/rt/include/chthreads.h:179:13: note: declared here
thread_t *chThdCreateI(const thread_descriptor_t *tdp);
^
make: *** [build/obj/usb_lld.o] Error 1


Is this demo broken in the master branch?

Best regards,
ADHA

Re: Compile issue RT-STM32F407-DISCOVERY-MEMS

Posted: Sun Feb 21, 2016 10:59 am
by Giovanni
Hi,

The repository is in an unstable state because RT4 is being merged, it will last until next week. In the meanwhile I suggest using the 16.1.3 release.

Giovanni

Re: Compile issue RT-STM32F407-DISCOVERY-MEMS

Posted: Sun Feb 21, 2016 11:14 am
by ABHA
Hi,

Thanks for the fast response. Problem solved by checking out stable 3 branch in git repo!

Commands: help exit info systime mem threads test
ch> info
Kernel: 3.0.5
Compiler: GCC 4.9.2 20140904 (prerelease)
Architecture: ARMv7-ME
Core Variant: Cortex-M4
Port Info: Advanced kernel mode
Platform: STM32F407 High Performance with DSP and FPU
Board: STMicroelectronics STM32F4-Discovery
Build time: Feb 21 2016 - 12:10:42