kentindell / canhack

The Yes We CAN project of Canis Labs
MIT License
326 stars 63 forks source link

CANHACK Porting to PYBV11 #1

Closed skylin008 closed 4 years ago

skylin008 commented 4 years ago

Thank you for shared this impressive module.I had been porting to the PYBV11 board.As follow is micropython.mk `

SRC_USERMOD += $(USERMODULES_DIR)/pyb_canhack.c

CFLAGS_USERMOD += -I$(USERMODULES_DIR)

CFLAGS_EXTRA = -DMODULE_CANHACK_ENABLED=1 ` Put this file to canhack/pyb folder to micropython/. Then to micropython/ports/stm32 build: make BOARD=PYBV11 USER_C_MODULES=../../canhack all.It build OK.But Download the firmware.dfu.Can't found CANHack module.Any issue.Thanks!

skylin008 commented 4 years ago

I had solved this issue

kentindell commented 4 years ago

Good to hear. I didn't put up an explanation of how to install this inside MicroPython firmware: it's actually a little bit tricky, depending on which release you target. I guess I should write a blog post on how to do it.

Modifying MicroPython firmware is a bit of a learning curve, and to stitch a new module in place you need to edit the Makefile but also add the module into the top-level MicroPython classes file. And if you are using interrupts, you need to edit the master interrupt vector file. I have re-written the CAN drivers for the bxCAN on the PyBoard so that there is a 32-deep priority-ordered transmit queue. I'll make those available at some point.

skylin008 commented 4 years ago

Thanks for your kindly Email reply ASAP. I had been ported to the pyblite board.The pyblite chip is stm32f411ret6, it not had Can Controller. If canhack soft can be run 1M baudrate and expand two Can controller simultaneously http://www.baidu.com/link?url=Aa6uZ-R59P2msSWD1moLzDkpeooWlDiteEYeeAKBW3dVUV8xjuWn3ITsMZ5bgVEEfp41z5gQvAigD1OXgR6KvllXlp134PaJOZIeLCMPn9AQs2llMPhIVAIMV0A_m_YY .

Best Regards!

skylin

Ken Tindell notifications@github.com 于2020年3月26日周四 下午10:09写道:

Good to hear. I didn't put up an explanation of how to install this inside MicroPython firmware: it's actually a little bit tricky, depending on which release you target. I guess I should write a blog post on how to do it.

Modifying MicroPython firmware is a bit of a learning curve, and to stitch a new module in place you need to edit the Makefile but also add the module into the top-level MicroPython classes file. And if you are using interrupts, you need to edit the master interrupt vector file. I have re-written the CAN drivers for the bxCAN on the PyBoard so that there is a 32-deep priority-ordered transmit queue. I'll make those available at some point.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kentindell/canhack/issues/1#issuecomment-604452124, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZQ4PG6EVXXHH73FJI2WWDRJNO2TANCNFSM4LPIRNNA .