Hello,
I've been reading the docs and tutorials for getting started wtih chibios and the rt kernel and they all mention a port layer in the kernel that needs to
be written in order to complete a port, So much so that Hal itself depends on it. However in the latest stable code there are no templates or port directroy and no recent documentation is available with some basic explanation of what a new port entails. So I'd like know if the port layer is still something necessary for new arch or is that all rolled into Hal?
Port Layer and Hal - Porting to a new architecture
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: Port Layer and Hal - Porting to a new architecture
Hi,
RT and HAL are separate entities, if you need to port HAL then there are templates of LLD drivers to be implemented, an existing HAL port can be used as example.
Porting RT is a different matter, you don-t need to do this unless your micro does not use one of the supported architectures.
Giovanni
RT and HAL are separate entities, if you need to port HAL then there are templates of LLD drivers to be implemented, an existing HAL port can be used as example.
Porting RT is a different matter, you don-t need to do this unless your micro does not use one of the supported architectures.
Giovanni
Re: Port Layer and Hal - Porting to a new architecture
I'm porting an in-house risc v core which I believe is not supported so that would mean I need to develop a port layer. That said, writing a port layer still is rather mysterious since I haven't found any recent documentation. The latest porting guide I found is from version 2.x which is rather old imo.
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: Port Layer and Hal - Porting to a new architecture
Hi,
Ports didn't change much, I recommend you start from the one closest to your architecture, probably e200 or ARM. Does the architecture support a separate stack for IRQs? this is a bit harder to support correctly.
Giovanni
Ports didn't change much, I recommend you start from the one closest to your architecture, probably e200 or ARM. Does the architecture support a separate stack for IRQs? this is a bit harder to support correctly.
Giovanni
Re: Port Layer and Hal - Porting to a new architecture
Hi,
The architecture doesn't have a separate IRQ stack to work with. I'll have a look at the e200 port and work from that.
Thanks.
The architecture doesn't have a separate IRQ stack to work with. I'll have a look at the e200 port and work from that.
Thanks.
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: Port Layer and Hal - Porting to a new architecture
The e200 port should be very close to what you need, almost 1:1.
Just take care to define the intctx and extctx structures correctly (function-trashed registers and IRQ context).
Giovanni
Just take care to define the intctx and extctx structures correctly (function-trashed registers and IRQ context).
Giovanni
Who is online
Users browsing this forum: No registered users and 2 guests