CAN Bus Library for STM32F103

Can someone help me port this library?
User avatar
martinayotte
Posts: 1229
Joined: Mon Apr 27, 2015 1:45 pm

Re: CAN Bus Library for STM32F103

Post by martinayotte » Thu Oct 20, 2016 6:29 pm

A quick guide to github :

- create your own account on github
- log into it
- navigate to Roger's github
- click on Fork button on upper right corner (this will create a fork into your account)
- use "git clone <you forked github URL>" in a location of your choice on your local disk.
- add the new library into the tree, then do "git add <the library folder>"
- git commit -m "the comment describing the new lib"
- git push (it will push the change into github web)
- navigate back on you github web and press "compare" button, it will show diffs against Roger's main branch.
- click on "Create a Pull Request" and provide comments to Roger.

User avatar
RogerClark
Posts: 7422
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: CAN Bus Library for STM32F103

Post by RogerClark » Thu Oct 20, 2016 8:30 pm

For big changes ( which I suspect this is), I create a new branch, pull to that branch then push the new branch back to github for others to test.

I am not sure if I could personally test this, as I am not sure I have any CANBus hardware.

I may have a digital compass somewhere which is CANBus but it was scavenged from an old quadcopter and I have no idea what type it is.

DrBanana
Posts: 59
Joined: Fri Apr 22, 2016 11:15 am

Re: CAN Bus Library for STM32F103

Post by DrBanana » Fri Oct 21, 2016 1:46 pm

RogerClark wrote:I am not sure if I could personally test this, as I am not sure I have any CANBus hardware.
Can't we just use 2 blue pill boards to test CAN?

User avatar
RogerClark
Posts: 7422
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: CAN Bus Library for STM32F103

Post by RogerClark » Fri Oct 21, 2016 7:51 pm

Thats not really a valid test.

You would need to test with hardware from other vendors.

Phono
Posts: 92
Joined: Tue May 05, 2015 6:08 am
Location: Ermont, France

Re: CAN Bus Library for STM32F103

Post by Phono » Fri Oct 28, 2016 9:51 am

I have installed Git and prepared the files for the pull request. I have written a text file explaining where changes are done in the system (these changes are required because the CAN interrupt vector is shared with the USB interrupt vector, so I have added code to route the interrupt to the CAN interrupt handler when required).
My question is: where in the directory tree must I put this explanation file? At the root of the HardwareCAN library, perhaps?

User avatar
RogerClark
Posts: 7422
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: CAN Bus Library for STM32F103

Post by RogerClark » Fri Oct 28, 2016 10:01 am

Perhaps add an example with a description in it

Phono
Posts: 92
Joined: Tue May 05, 2015 6:08 am
Location: Ermont, France

Re: CAN Bus Library for STM32F103

Post by Phono » Mon Oct 31, 2016 10:12 pm

I have done as you said. In the example directory I have added an example, with an include file that is actually only a comment on the history and the changes to be performed to the core to allow proper operation of the CAN interface.
However, I do not yet master Git, so I may have done it the wrong way. Could you please check that the library is complete, and that 3 files are submitted to replace 3 files in 3 different directories of the core?
Thanks.

User avatar
RogerClark
Posts: 7422
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: CAN Bus Library for STM32F103

Post by RogerClark » Mon Oct 31, 2016 10:40 pm

Can you post the link to your repo

Phono
Posts: 92
Joined: Tue May 05, 2015 6:08 am
Location: Ermont, France

Re: CAN Bus Library for STM32F103

Post by Phono » Mon Oct 31, 2016 11:26 pm


User avatar
RogerClark
Posts: 7422
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: CAN Bus Library for STM32F103

Post by RogerClark » Tue Nov 01, 2016 12:27 am

Thanks

PR's are in a state of flux at the moment, so I think I need to clear the backlog before I process yours.

There are some others relating to USB Serial, which may impact on yours as well, due to the shared interrupt, but I won't know for sure until I merge the existing PRs

Post Reply