Since the family is not officially supported I wanted to use just the kernel and it's port. I've been trough lots of compiler errors but came down to one (I hope). It asks for "st.h" file which asks for "st_lld.h". My very limited ChibiOS knowledge says this should be the base timer which ticks for the core. Since it's not officially given, should I implement the code by myself?
Problems with non makefile setup for a new brand ARM Cortex
Moderators: RoccoMarco, lbednarz, tfAteba
-
MuratUrsavas
- Posts: 8
- Joined: Mon May 12, 2014 11:29 am
Problems with non makefile setup for a new brand ARM Cortex
I'm trying t create a project for EFM32's with EmBlocks (which is not a makefile based IDE) using the trunk code (3.0.0). I know it's too much for a newbie but please bear with me 
Since the family is not officially supported I wanted to use just the kernel and it's port. I've been trough lots of compiler errors but came down to one (I hope). It asks for "st.h" file which asks for "st_lld.h". My very limited ChibiOS knowledge says this should be the base timer which ticks for the core. Since it's not officially given, should I implement the code by myself?
Since the family is not officially supported I wanted to use just the kernel and it's port. I've been trough lots of compiler errors but came down to one (I hope). It asks for "st.h" file which asks for "st_lld.h". My very limited ChibiOS knowledge says this should be the base timer which ticks for the core. Since it's not officially given, should I implement the code by myself?
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Problems with non makefile setup for a new brand ARM Cor
Hi,
The ST driver is implemented in the HAL, the EFM32 does not have yet an official HAL so the driver is not found, you can disable the tickless mode in chconf.h, that way the ST driver is no more strictly needed, you just have to initialize the systick timer yourself and do the following:
I am assuming you are still using the OSAL, if not:
The implementation of a basic HAL and an ST driver would allow for the tickless mode, you need a dedicated timer for that.
Giovanni
The ST driver is implemented in the HAL, the EFM32 does not have yet an official HAL so the driver is not found, you can disable the tickless mode in chconf.h, that way the ST driver is no more strictly needed, you just have to initialize the systick timer yourself and do the following:
Code: Select all
OSAL_IRQ_HANDLER(SysTick_Handler) {
OSAL_IRQ_PROLOGUE();
osalSysLockFromISR();
osalOsTimerHandlerI();
osalSysUnlockFromISR();
OSAL_IRQ_EPILOGUE();
}
I am assuming you are still using the OSAL, if not:
Code: Select all
CH_IRQ_HANDLER(SysTick_Handler) {
CH_IRQ_PROLOGUE();
chSysLockFromISR();
chVTDoTickI();
chSysUnlockFromISR();
CH_IRQ_EPILOGUE();
}
The implementation of a basic HAL and an ST driver would allow for the tickless mode, you need a dedicated timer for that.
Giovanni
-
MuratUrsavas
- Posts: 8
- Joined: Mon May 12, 2014 11:29 am
Re: Problems with non makefile setup for a new brand ARM Cor
I've found the templates and copied to the project. I'd like to implement it for EFM32's, since tickless mode is the "thing" for them.
For the test I wanted to disable the tickless mode but couldn't find it in the "chconf.h". It was copied from the "templates" folder.
Giovanni, is there a guide for the general structure, what's needed for a basic project (just the kernel and it's port), what should be included (file wise) and what should be defined?
For the test I wanted to disable the tickless mode but couldn't find it in the "chconf.h". It was copied from the "templates" folder.
Giovanni, is there a guide for the general structure, what's needed for a basic project (just the kernel and it's port), what should be included (file wise) and what should be defined?
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Problems with non makefile setup for a new brand ARM Cor
Version 3.0 is still work in progress and does not have specific documentation yet.
In chconf.h you need to set "time delta" to zero in order to disable the tickless mode, you also need to specify a reasonable tick frequency, 1000Hz for example.
In version 2.6.x there is an example project with kernel only (no HAL), you may use that as example but make sure to use all files from 3.0.
Giovanni
In chconf.h you need to set "time delta" to zero in order to disable the tickless mode, you also need to specify a reasonable tick frequency, 1000Hz for example.
In version 2.6.x there is an example project with kernel only (no HAL), you may use that as example but make sure to use all files from 3.0.
Giovanni