Porting ChibiOS 3.0
Posted: Sun Nov 03, 2013 6:34 pm
Hello Giovanni,
I have ported ChibiOS 2.6.1 to a new device (ARM Cortex M4 based). The kernel is up and running and some drivers are already implemented.
Next step I want to do is support for ChibiOS 3.0 because of the tickless mode.
I came across a problem I don't know how to solve at the moment.
If I want to use the original SysTick timer to use as the system tick I define the following in chconf.h:
I used the STM32 file as example.
When i try to compile the code i get the following:
Why is a timer needed when the SysTick is used for the system tick?
Those timers are for tickless right?
Marco
I have ported ChibiOS 2.6.1 to a new device (ARM Cortex M4 based). The kernel is up and running and some drivers are already implemented.
Next step I want to do is support for ChibiOS 3.0 because of the tickless mode.
I came across a problem I don't know how to solve at the moment.
If I want to use the original SysTick timer to use as the system tick I define the following in chconf.h:
Code: Select all
#define CH_CFG_ST_TIMEDELTA 0I used the STM32 file as example.
When i try to compile the code i get the following:
Code: Select all
mkdir -p build/obj
mkdir -p build/lst
Compiling chcoreasm_v7m.s
Compiling crt0.c
Compiling vectors.c
Compiling chcore.c
In file included from ../../../os/hal/include/st.h:50:0,
from ../../../os/rt/ports/ARMCMx/chcore_timer.h:41,
from ../../../os/rt/ports/ARMCMx/chcore.h:225,
from ../../../os/rt/include/ch.h:81,
from ../../../os/rt/ports/ARMCMx/chcore.c:29:
../../../os/hal/ports/xxxxxxx/st_lld.h:69:2: error: #error "TIM2 not present"
../../../os/hal/ports/xxxxxxx/st_lld.h: In function 'st_lld_get_counter':
../../../os/hal/ports/xxxxxxx/st_lld.h:128:21: error: 'STM32_TIM2' undeclared (
first use in this function)
../../../os/hal/ports/xxxxxxx/st_lld.h:128:21: note: each undeclared identifier
is reported only once for each function it appears in
../../../os/hal/ports/xxxxxxx/st_lld.h: In function 'st_lld_start_alarm':
../../../os/hal/ports/xxxxxxx/st_lld.h:142:3: error: 'STM32_TIM2' undeclared (f
irst use in this function)
../../../os/hal/ports/xxxxxxx/st_lld.h:144:26: error: 'STM32_TIM_DIER_CC1IE' un
declared (first use in this function)
../../../os/hal/ports/xxxxxxx/st_lld.h: In function 'st_lld_stop_alarm':
../../../os/hal/ports/xxxxxxx/st_lld.h:154:3: error: 'STM32_TIM2' undeclared (f
irst use in this function)
../../../os/hal/ports/xxxxxxx/st_lld.h: In function 'st_lld_set_alarm':
../../../os/hal/ports/xxxxxxx/st_lld.h:166:3: error: 'STM32_TIM2' undeclared (f
irst use in this function)
../../../os/hal/ports/xxxxxxx/st_lld.h: In function 'st_lld_get_alarm':
../../../os/hal/ports/xxxxxxx/st_lld.h:178:21: error: 'STM32_TIM2' undeclared (
first use in this function)
../../../os/hal/ports/xxxxxxx/st_lld.h: In function 'st_lld_is_alarm_active':
../../../os/hal/ports/xxxxxxx/st_lld.h:192:18: error: 'STM32_TIM2' undeclared (
first use in this function)
../../../os/hal/ports/xxxxxxx/st_lld.h:192:39: error: 'STM32_TIM_DIER_CC1IE' un
declared (first use in this function)
make: *** [build/obj/chcore.o] Error 1Why is a timer needed when the SysTick is used for the system tick?
Those timers are for tickless right?
Marco