Hi Marcos and all,

As you suggested me I took StarterWare as reference and writing
function prototypes. I hosted my blog for PWM driver  development
tracking so I can note down my day to day work and you can easily read
in which direction I am working.
I will update this frequently. You can visit this link.

 http://punitvara.github.io/rtems%20drivers/2016/02/28/basic-function

Please review my post and suggest me if improvement is needed in
function prototypes. I hope it is easier way for you to evaluate and
review my work. :-)

Thanks,
Punit

On Wed, Mar 16, 2016 at 1:32 AM, Marcos Díaz
<marcos.d...@tallertechnologies.com> wrote:
> Don't forget that TI has some baremetal drivers (StarterWare) for
> beagle bone. You can base your work with it.
>
> On Tue, Mar 15, 2016 at 4:58 PM, Marcos Díaz
> <marcos.d...@tallertechnologies.com> wrote:
>> On Tue, Mar 15, 2016 at 4:20 PM, punit vara <punitv...@gmail.com> wrote:
>>> On Tue, Mar 15, 2016 at 12:24 PM, punit vara <punitv...@gmail.com> wrote:
>>>> On Mon, Mar 14, 2016 at 7:07 PM, punit vara <punitv...@gmail.com> wrote:
>>>>> On Wed, Mar 9, 2016 at 1:38 AM, punit vara <punitv...@gmail.com> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Sun, Mar 6, 2016 at 8:54 PM, punit vara <punitv...@gmail.com> wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Sun, Mar 6, 2016 at 2:09 PM, Ketul Shah <ketulshah1...@gmail.com> 
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Hello Punit and all,
>>>>>>>>
>>>>>>>> According to me, Punit you must have completed some gpio test through 
>>>>>>>> gpio API that was merged last year. So till the final result of 
>>>>>>>> accepted student you can start working with PWM driver that plays an 
>>>>>>>> important role for any embedded project. This would be a good 
>>>>>>>> kick-start for you as well as a strong reason to showcase in your 
>>>>>>>> proposal. Try to give hardware test and post the video if possible.
>>>>>>>>
>>>>>>>> Coming to further I2C and SPI can be next milestones. To me these 
>>>>>>>> should be at the highest priorities. I had done I2C driver but was not 
>>>>>>>> able to make the hardware test. So you can also refer that and come up 
>>>>>>>> with the output along with best modifications.
>>>>>>>>
>>>>>>>> Next target you can set for SPI after both drivers are tested and 
>>>>>>>> committed.
>>>>>>>>
>>>>>>>> For the references you can always have a loot at code of GPIO 
>>>>>>>> API,MINIX,FreeBSD for BBB drivers.
>>>>>>>>
>>>>>>>> Any suggestions ?
>>>>>>>>
>>>>>>>> In case of any queries you can always ping.
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Ketul
>>>>>>>>
>>>>>>>> On 5 March 2016 at 01:02, Marcos Díaz 
>>>>>>>> <marcos.d...@tallertechnologies.com> wrote:
>>>>>>>>>
>>>>>>>>> We use I2c but using drivers from TI's baremetal drivers they provide 
>>>>>>>>> in their StarterWare software suite.
>>>>>>>>> So, currently we cannot commit that into RTEMS.
>>>>>>>>> But those drivers should be very useful to port to RTEMS.
>>>>>>>>>
>>>>>>>>> On Wed, Mar 2, 2016 at 5:53 PM, Joel Sherrill <j...@rtems.org> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Wed, Mar 2, 2016 at 2:22 PM, Marcos Díaz 
>>>>>>>>>> <marcos.d...@tallertechnologies.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Wed, Mar 2, 2016 at 4:56 PM, Joel Sherrill <j...@rtems.org> 
>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Wed, Mar 2, 2016 at 1:41 PM, punit vara <punitv...@gmail.com> 
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Yes I have checked previous year work of ketul . He has done ADC 
>>>>>>>>>>>>> and GPIO BSP . It seems SPI,USB BSP need to be developed as I 
>>>>>>>>>>>>> have checked rtems.git and I am not sure about I2C .I asked last 
>>>>>>>>>>>>> year student Ketul .According to him , I2c is also need to be 
>>>>>>>>>>>>> modified. I tried to contact Ben but he is unreachable on mailing 
>>>>>>>>>>>>> list :-(
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Let me reach out to Ketul and see if a private ping helps.
>>>>>>>>>>>>
>>>>>>>>>>>> Start with the assumption that USB needs work. That involves the 
>>>>>>>>>>>> rtems-libbsd tree and
>>>>>>>>>>>> there is likely code to import from FreeBSD that will help a lot.
>>>>>>>>>>>>
>>>>>>>>>>>> SPI and i2c are close to one another in my understanding. Likely 
>>>>>>>>>>>> Ketul is referring to changes
>>>>>>>>>>>> in the RTEMS i2c interfaces.
>>>>>>>>>>>>
>>>>>>>>>>>> My recollection is that the NIC had performance issues based on 
>>>>>>>>>>>> the version of U-Boot
>>>>>>>>>>>> used. There was some traffic at the end of GSoC about this. I 
>>>>>>>>>>>> don't know if it was
>>>>>>>>>>>> ever resolved.  But the NIC should work. Maybe worth benchmarking.
>>>>>>>>>>>
>>>>>>>>>>> We had more of these problems when trying to use I2C. It was fixed 
>>>>>>>>>>> in
>>>>>>>>>>> https://git.rtems.org/rtems/commit/?id=8c5c53f4788eb74264a053f8293fed26da85b764.
>>>>>>>>>>>  I think we dont need tos ee these problems any more
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Marcos.. does this mean that the BBB i2c is complete now?
>>>>>>>>>>
>>>>>>>>>> And is my understanding that this covers SPI correct?
>>>>>>>>>>
>>>>>>>>>> What else on the BBB is left?
>>>>>>>>>>
>>>>>>>>>> --joel
>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --joel
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Mar 3, 2016 at 12:57 AM, Joel Sherrill <j...@rtems.org> 
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Wed, Mar 2, 2016 at 1:24 PM, Hesham Almatary 
>>>>>>>>>>>>>> <heshamelmat...@gmail.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hi Punit,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> You can have a look at the open projects here [1] and find one 
>>>>>>>>>>>>>>> or more
>>>>>>>>>>>>>>> that match your experience/interests.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> [1] https://devel.rtems.org/wiki/Developer/OpenProjects
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I have added Ben Gras. He knows more about the BBB than anyone. 
>>>>>>>>>>>>>> I am unsure what is left
>>>>>>>>>>>>>> to do. Have you compared the status of last year's projects 
>>>>>>>>>>>>>> versus the git repository?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --joel
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Regards,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Wed, Mar 2, 2016 at 7:14 PM, punit vara 
>>>>>>>>>>>>>>> <punitv...@gmail.com> wrote:
>>>>>>>>>>>>>>> >  I have asked for BBB BSP proposal before but I haven't found 
>>>>>>>>>>>>>>> > any good
>>>>>>>>>>>>>>> > response from someone. What are the projects you are going to 
>>>>>>>>>>>>>>> > mentor @joel ?
>>>>>>>>>>>>>>> > Would anyone please suggest me to pick any other project ?
>>>>>>>>>>>>>>> >
>>>>>>>>>>>>>>> > _______________________________________________
>>>>>>>>>>>>>>> > devel mailing list
>>>>>>>>>>>>>>> > devel@rtems.org
>>>>>>>>>>>>>>> > http://lists.rtems.org/mailman/listinfo/devel
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> Hesham
>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>> devel mailing list
>>>>>>>>>>>>>>> devel@rtems.org
>>>>>>>>>>>>>>> http://lists.rtems.org/mailman/listinfo/devel
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> devel mailing list
>>>>>>>>>>>> devel@rtems.org
>>>>>>>>>>>> http://lists.rtems.org/mailman/listinfo/devel
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>>
>>>>>>>>>>> ______________________________
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Marcos Díaz
>>>>>>>>>>>
>>>>>>>>>>> Software Engineer
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> San Lorenzo 47, 3rd Floor, Office 5
>>>>>>>>>>>
>>>>>>>>>>> Córdoba, Argentina
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Phone: +54 351 4217888 / +54 351 4218211/ +54 351 7617452
>>>>>>>>>>>
>>>>>>>>>>> Skype: markdiaz22
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> ______________________________
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Marcos Díaz
>>>>>>>>>
>>>>>>>>> Software Engineer
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> San Lorenzo 47, 3rd Floor, Office 5
>>>>>>>>>
>>>>>>>>> Córdoba, Argentina
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Phone: +54 351 4217888 / +54 351 4218211/ +54 351 7617452
>>>>>>>>>
>>>>>>>>> Skype: markdiaz22
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> devel mailing list
>>>>>>>>> devel@rtems.org
>>>>>>>>> http://lists.rtems.org/mailman/listinfo/devel
>>>>>>>>
>>>>>>>>
>>>>>>> Thank a lot for helping me. Till now I have completed hello world Test 
>>>>>>> on Beagle Bone Black.Soon I will post video on youtube. I will follow 
>>>>>>> your suggestions. Any more suggestions for me @Joel regarding proposal 
>>>>>>> and prerequisite tasks ?
>>>>>>
>>>>>> I have uploaded hello world video of beagle bone black on this link
>>>>>>  
>>>>>> https://www.youtube.com/watch?v=FyOHU02bsvw&list=PL2muodf7ZnYcS18wkilESuJpZGj4mYSMJ&index=6
>>>>>>
>>>>>>
>>>>> I have successfully tested GPIO API's  with BBB. Tried to blink LED on
>>>>> bank 0 as well as well 1.  Please checkout
>>>>> https://www.youtube.com/watch?v=aYBIJoueGe0
>>>>
>>>> I would like to start working on PWM Driver until I get accepted in
>>>> GSOC'16.I would follow mostly the same plan for other drivers as well.
>>>> My rough plan is as follow :
>>>>
>>>>       1. Registers’ Mapping
>>>>
>>>> Add Memory mapped Registers(like PWM_Subsystem0 0x48300000) to
>>>> am335x.h file that is located in
>>>> rtems/c/src/lib/libcpu/arm/shared/include (Reference AM335X TRM)
>>>>
>>>>       2.   Header file for each driver
>>>>
>>>> Create pwm.h file to declare many APIs like (pwm_config(),
>>>> pwm_enable() etc.) Keep this header file in
>>>> ../libbsp/arm/beagle/include . I will follow mostly similar workflow
>>>> for I2c and SPI driver and will refer Andre GSOC RPi work for I2c and
>>>> SPI. For each new driver .h file need to be added.
>>>>
>>>>       3.  Function Definition’s file
>>>>
>>>> Make directory (like pwm) -> add .c file (like pwm.c) -> keep this
>>>> directory in ../libbsp/arm/beagle -> Include all the functions'
>>>> definitions in that .c file (should be at kernel space) .
>>>>
>>>>       4. Testing APIs
>>>>
>>>> To test the driver create directory under ..testsuites/samples/ -> pwm
>>>> . Add init.c which performs task to check PWM driver  using newly
>>>> added APIs from ../libbsp/shared/include Update Makefile
>>>> (../testsuites/samples/Makefile.am) to add directory(i.e. pwm ) and
>>>> configure.ac (../testsuites/samples/configure.ac). After compilation ,
>>>> .exe file will be generated i.e at location
>>>> development/rtems/b-test/c/beagleboneblack/testsuites/samples/pwm/pwm.exe
>>>>
>>>> Then It can be tested on qemu followed by beaglebone black.
>>>>
>>>> Gosc 2015 Ketul Shah and André Marques’s work would be useful for
>>>> further approach and testing.
>>>>
>>>> Any suggestions please ? Any further advice to get started with PWM
>>>> driver (i.e Reference) ?
>>>>
>>>> Best regards,
>>>> Punit
>>> Hi Marcos,
>>>
>>> If you can comment on my work flow It would be really helpful for me .
>>> I am kindly waiting for your response.
>>
>>
>> Hi,
>> That seems Ok to me.
>> Maybe your workflow shouldn't be that strict. I'd rather add necessary
>> defines as long as i'm needing them. Perhaps you should define the
>> interface of the driver first (which functions it will have) and start
>> developing it, Adding mapping of registers as long as you need them.
>> About the Testing. I'm not pretty sure you will be able to test pwm
>> with qemu (in fact i'm not sure if beaglebone is supported in qemu, do
>> you know?)
>> Maybe Joel has some idea about testing drivers, but I haven't seen
>> tests on peripheral drivers.
>> --
>> ______________________________
>>
>>
>> Marcos Díaz
>>
>> Software Engineer
>>
>>
>> San Lorenzo 47, 3rd Floor, Office 5
>>
>> Córdoba, Argentina
>>
>>
>> Phone: +54 351 4217888 / +54 351 4218211/ +54 351 7617452
>>
>> Skype: markdiaz22
>
>
>
> --
> ______________________________
>
>
> Marcos Díaz
>
> Software Engineer
>
>
> San Lorenzo 47, 3rd Floor, Office 5
>
> Córdoba, Argentina
>
>
> Phone: +54 351 4217888 / +54 351 4218211/ +54 351 7617452
>
> Skype: markdiaz22
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to