[INFO] Introducing ChibiOS/EX

Discussions and support about ChibiOS/EX, the External Peripherals Abstraction Layer.
User avatar
RoccoMarco
Posts: 596
Joined: Wed Apr 24, 2013 4:11 pm
Location: Salerno (Italy)
Has thanked: 72 times
Been thanked: 53 times
Contact:

[INFO] Introducing ChibiOS/EX

Postby RoccoMarco » Mon May 02, 2016 8:18 pm

Hey there,
I would to introduce ChibiOS/EX whereas EX stands for EXternal peripherals. EX would be a set of complex drivers which enable user to develop with most common peripherals for embedded systems. All the code is now available on trunk and most likely will be released with ChibiOS 16.7.1

I am directly contributing to this project and right now I have developed a series of MEMS drivers which extend certain abstract classes adding a physical implementation. You can find these classes under hal/lib/peripherals and they are BaseSensor, BaseAccelerometer, BaseGyroscope and BaseCompass.

Currently are supported LSM6DS0 over I2C, LIS3MDL over I2C and L3GD20 over SPI. Related demo are located under testhal/STM32. I will add soon new MEMS implementation and demos.

Anyway MEMS are just a small part of EX. We have planned to support interesting externals (like RF, microphones and much more).

Post in this forum for any concerns related to EX. We will be glad to offer support.

Ciao,
RM

awygle
Posts: 32
Joined: Sun Apr 03, 2016 8:39 pm
Has thanked: 6 times
Been thanked: 4 times

Re: [INFO] Introducing ChibiOS/EX

Postby awygle » Tue May 03, 2016 5:27 am

This is excellent, I was just looking into the most graceful way to produce some drivers similar to these.

For those in the know, will a symmetrical location be created in the community repository?

User avatar
Giovanni
Site Admin
Posts: 11083
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 367 times
Been thanked: 306 times
Contact:

Re: [INFO] Introducing ChibiOS/EX

Postby Giovanni » Tue May 03, 2016 7:55 am

Creating a location on the community repository is a good idea, I am sure it can be done.

Anyway, those drivers are simple enough to be accepted on the main repository after just a quick review because there is no impact on the other ChibiOS components.

Giovanni

User avatar
RoccoMarco
Posts: 596
Joined: Wed Apr 24, 2013 4:11 pm
Location: Salerno (Italy)
Has thanked: 72 times
Been thanked: 53 times
Contact:

Re: [INFO] Introducing ChibiOS/EX

Postby RoccoMarco » Tue May 03, 2016 12:51 pm

Giovanni wrote:Anyway, those drivers are simple enough to be accepted on the main repository after just a quick review because there is no impact on the other ChibiOS components.


Indeed, it is. Proposal, enhancements and patches are highly appreciated.

Ciao,
RM

jstruebel
Posts: 19
Joined: Sat Oct 17, 2015 5:59 am
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: [INFO] Introducing ChibiOS/EX

Postby jstruebel » Sun May 08, 2016 3:53 am

I like the sounds of this. Is this intended to replace the current os/various/devices_lib structure? I think it should since it provides a "ChibiOS" way of implementing external peripheral drivers.

How would you suggest implementing a driver that isn't a sensor? I'm working with the MAX31785 which is a fan controller that is configured via I2C. Would I just create it using one of the existing drivers as a template, but with no extra inheritance, i.e. from the BaseSensor or BaseAccelerometer? Will there be an "others" category to hold drivers like this that don't fit in the typical categories?

User avatar
Giovanni
Site Admin
Posts: 11083
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 367 times
Been thanked: 306 times
Contact:

Re: [INFO] Introducing ChibiOS/EX

Postby Giovanni » Sun May 08, 2016 7:21 am

Hi,

It is meant to replace /os/various/devices_lib as you suggested, it expands that concept. We are adding a Flash driver to EX, you may follow the same pattern. In general everything at board level that is not inside the MCU can be part of EX: sensors, keyboards, flash, displays etc.

The rules are:
1) A driver is always something like: <vendor>/<part_number>.c/.h/.mk.
2) Drivers are cross platform and only call HAL drivers, do not touch MCU HW directly.
3) Only HAL/OSAL calls are allowed, no direct dependencies to RT/NIL.

Giovanni

User avatar
Korken
Posts: 270
Joined: Wed Apr 02, 2014 4:09 pm
Location: Luleå, Sweden
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: [INFO] Introducing ChibiOS/EX

Postby Korken » Mon May 16, 2016 8:56 pm

Nice that this is starting to arrive! :D
Have you made any decisions on adding the ISR synchronous functions?

Best Regards
Emil

User avatar
RoccoMarco
Posts: 596
Joined: Wed Apr 24, 2013 4:11 pm
Location: Salerno (Italy)
Has thanked: 72 times
Been thanked: 53 times
Contact:

Re: [INFO] Introducing ChibiOS/EX

Postby RoccoMarco » Tue May 17, 2016 2:14 pm

Hey Emil,
about I-class function nothing done yet. I don't know if it is possible to create such a class of these functions (especially in SPI/I2C shared modes, which require the I2C/SPI re-start to avoid misconfiguration).

Anyway, sometime ago you said that you have created some algorithm to calibrate accelerometer and compass. This could be interesting...
Ciao,
RM

User avatar
Korken
Posts: 270
Joined: Wed Apr 02, 2014 4:09 pm
Location: Luleå, Sweden
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: [INFO] Introducing ChibiOS/EX

Postby Korken » Tue May 17, 2016 7:07 pm

Okey, you will not even have place holders for "advanced" users? As it will be required for any high performance application :)

On IMU calibration you can go here for the code: https://gitlab.com/korken89/IMUCalibration
It does an ellipsoid calibration for a generic sensor that has bias and gain.

User avatar
RoccoMarco
Posts: 596
Joined: Wed Apr 24, 2013 4:11 pm
Location: Salerno (Italy)
Has thanked: 72 times
Been thanked: 53 times
Contact:

Re: [INFO] Introducing ChibiOS/EX

Postby RoccoMarco » Tue May 17, 2016 9:41 pm

We will improve EX little by little trying to put it in the right direction. Feedback and report will help a lot. :mrgreen:


Return to “ChibiOS/EX”

Who is online

Users browsing this forum: No registered users and 1 guest