New hardware driver for new board

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
Post Reply
fpga_dude
Posts: 1
Joined: Tue Jun 21, 2016 11:20 pm

New hardware driver for new board

Post by fpga_dude » Tue Jun 21, 2016 11:35 pm

Hello,

I am trying to write a driver for an FPGA development board. I am using the NIOS2 port posted here:

https://github.com/bitmachinejc/micropython-nios2

It works well, but I need to access some hardware resources both in the FPGA and on the dev board. I would like to know the best approach. I think from my research in the forums and documentation, that my best option is to use the macros "MP_DEFINE_CONST_FUN_OBJ_x" to define a C based module that could then be imported and run from python. But I am not finding a lot of documentation on those macros, and I wonder if there is another approach I should consider. I may want to run some SPI and I2C commands, and it would be nice to be able to leverage all the work that has already been done to support those protocols. Obviously it would also be preferable to define my driver in pure python, but I don't think that is possible since there is no board defined for my specific hardware.

Thanks.

User avatar
platforma
Posts: 258
Joined: Thu May 28, 2015 5:08 pm
Location: Japan

Re: New hardware driver for new board

Post by platforma » Wed Jun 29, 2016 10:35 pm

If I'm understanding correctly, you're trying to "port" micropython to your board, rather than "writing a driver"? If so, I'll move your topic to somewhere more appropriate. You you might want to ask your question in "Development of Micropython" subforum, since it's kind of independent of the board you're using. Let me search for a similar question that was answered before: http://forum.micropython.org/viewtopic. ... 858#p10461

Post Reply