I'm interested in porting PTPd 2.3.1 to an embedded target ( runnig over an RTOS NOT lUNIX ). i wanted to know what i will need to port ( timers or any hardware related stuff ). Is there any guide how to configure and port the software ?
Best regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is no guide as such, but you are on the right track. PTPd has moved to Git by the way. The current code is at http://github.com/ptpd/ptpd
I would suggest that you take a look at this branch though: https://github.com/wowczarek/ptpd/tree/wowczarek-2.3.2-libcck - this will become the next version. Transport / timestamping, clock driver and timers have been abstracted into APIs, so if you are lucky, all you may need to do is to write a timer component, clock driver component (reading / adjusting the clock) and transport component ( data RX / TX + timestamping). There are still some UNIX API dependencies, but this code will at least make it easier for you to port things.
For example have a look at adding your own timer implementation:
Once you have created your own timer implementation, using the functions named as per timer_interface.h, all you do is add two lines to timer.def: one to include you timer's header, and another to register its implementation, and that's it, if it's placed above other implementations in timer.def, it will be used first.
Then you go through the same process with two remaining components: ttransport and clockdriver.
Thanks,
Wojciech
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i want to implement the necessary timer component depending on FreeRTOS.
My question is whether i should implement new timer_interface.c instead of ( eventtimer_posix.c, eventtimer_itimer.c ) and keep the (ptp_timers, eventtimer.c) unmodified or modify the ptp_timers.c depending on FreeRTOS.
your help would be greatly appreciated.
Thanx
abir
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello
I'm interested in porting PTPd 2.3.1 to an embedded target ( runnig over an RTOS NOT lUNIX ). i wanted to know what i will need to port ( timers or any hardware related stuff ). Is there any guide how to configure and port the software ?
Best regards
There is no guide as such, but you are on the right track. PTPd has moved to Git by the way. The current code is at http://github.com/ptpd/ptpd
I would suggest that you take a look at this branch though: https://github.com/wowczarek/ptpd/tree/wowczarek-2.3.2-libcck - this will become the next version. Transport / timestamping, clock driver and timers have been abstracted into APIs, so if you are lucky, all you may need to do is to write a timer component, clock driver component (reading / adjusting the clock) and transport component ( data RX / TX + timestamping). There are still some UNIX API dependencies, but this code will at least make it easier for you to port things.
For example have a look at adding your own timer implementation:
https://github.com/wowczarek/ptpd/blob/wowczarek-2.3.2-libcck/src/libcck/timer_interface.h : this is what you have to implement
https://github.com/wowczarek/ptpd/blob/wowczarek-2.3.2-libcck/src/libcck/timer.def : here your register your implementation
https://github.com/wowczarek/ptpd/tree/wowczarek-2.3.2-libcck/src/libcck/timer - existing implementations
Once you have created your own timer implementation, using the functions named as per timer_interface.h, all you do is add two lines to timer.def: one to include you timer's header, and another to register its implementation, and that's it, if it's placed above other implementations in timer.def, it will be used first.
Then you go through the same process with two remaining components: ttransport and clockdriver.
Thanks,
Wojciech
Hi !
i want to implement the necessary timer component depending on FreeRTOS.
My question is whether i should implement new timer_interface.c instead of ( eventtimer_posix.c, eventtimer_itimer.c ) and keep the (ptp_timers, eventtimer.c) unmodified or modify the ptp_timers.c depending on FreeRTOS.
your help would be greatly appreciated.
Thanx
abir