Page 1 of 2

How can use CMSIS in Chibios?

Posted: Tue Dec 11, 2012 10:18 am
by oattao
Hi all.
I've studied ChibiOS for some weeks. I used to work with CMSIS library on STM32 microcontroller. I have a question: Can I use CMSIS library in ChibiOS to work with STM32?
Sorry if my question is stupid.
Thanks in advance.

Re: How can use CMSIS in Chibios?

Posted: Tue Dec 11, 2012 10:21 am
by Giovanni
Hi,

CMSIS is not usually required but you can use it.

The CMSIS header is already included in ChibiOS when you include hal.h so you can use the definitions immediately. CMSIS C modules can be added to the Makefile and used, I don' foresee problems.

Giovanni

Re: How can use CMSIS in Chibios?

Posted: Tue Dec 11, 2012 10:44 am
by lenh_tap_ket
Hi all mem,
I've studied ChibiOS/RT for some week. I want to find examples Semaphores in chibiOS but i didn't find them any where ?
I'm using STM32L-Discovery KIT, I need some examples about Semaphore that KIT. If anyone has, please share to me.
Thanks in Advance !

Re: How can use CMSIS in Chibios?

Posted: Tue Dec 11, 2012 10:51 am
by Giovanni
Hi,

Some examples are in this file ./test/testsem.c

For a general introduction to semaphores http://en.wikipedia.org/wiki/Semaphore_ ... ramming%29

Giovanni

Re: How can use CMSIS in Chibios?

Posted: Sun Dec 16, 2012 7:10 pm
by ucfreak
Giovanni wrote:Hi,

CMSIS is not usually required but you can use it.

The CMSIS header is already included in ChibiOS when you include hal.h so you can use the definitions immediately. CMSIS C modules can be added to the Makefile and used, I don' foresee problems.

Giovanni


Hi Giovanni,

Did you mean that is possible use the CMSIS from ST?
I'm new to ChibiOS and interested in using the CMSIS delivered by ST within the STM32F10x Std Periph Driver package. Somehow I got confused how to integrate the CMSIS from ST without conflicting with the CMSIS integrated in ChibiOS.

I tried to remove the contents of ports/common/ARMCMx/CMSIS and to point to the files of ST's CMSIS. For now compilation is broken.

Any hint or example how to move to CMSIS from ST or how to start? Does it make sens to move to ST's CMSIS?

Regards,
ucfreak

Re: How can use CMSIS in Chibios?

Posted: Sun Dec 16, 2012 7:58 pm
by Giovanni
Hi,

The headers from the ST CMSIS are already included when you include hal.h, you can use it without having to do anything.

Using CMSIS could be useful in some cases but most drivers are part of ChibiOS so it is not very common.

Giovanni

Re: How can use CMSIS in Chibios?

Posted: Mon Dec 17, 2012 7:07 am
by ucfreak
Hi,

thanks for the fast answer. Iĺl keep it as delivered by default, now compilation if fine.

Regards,

ucfreak

Re: How can use CMSIS in Chibios?

Posted: Fri Feb 01, 2013 6:26 pm
by ruslanpopov
Continuing of thread (viewtopic.php?f=2&t=945)...

I have created a repo with ChibiOS project, added there a CMSIS, add INC directories into Makefile and try to run PWM in TIM17.

Repo: https://github.com/RaD/armka_demos

Now I have the following problem:

Code: Select all

rad@n150:~/devel/arm/workplace/armka_demos/apps/ir-tester$ LANG=C make
Linking build/firmware.elf
build/obj/stm32f10x_rcc.o: In function `RCC_APB2PeriphClockCmd':
/home/rad/devel/arm/workplace/armka_demos/apps/ir-tester/../../CMSIS/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c:1098: undefined reference to `assert_param'
/home/rad/devel/arm/workplace/armka_demos/apps/ir-tester/../../CMSIS/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c:1099: undefined reference to `assert_param'
collect2: ld returned 1 exit status
make: *** [build/firmware.elf] Error 1]


Just don't understand what else does it want to link this `assert_param`.

Re: How can use CMSIS in Chibios?

Posted: Fri Feb 01, 2013 6:34 pm
by Giovanni
Probably it is defined in some other module in the ST library. Alternatively use the macros defined in stm32_rcc.h in order to enable clocks, all ChibiOS drivers do that.

Giovanni

Re: How can use CMSIS in Chibios?

Posted: Fri Feb 01, 2013 6:43 pm
by ruslanpopov
As I see, linker can't link assert_param reference from `stm32f10x_rcc.c`. Does CMSIS need to add some *.so or *.a library to ChibiOS project? Just don't understand what to do next.