Need help with Makefile for ATMEL SAMV7

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
cduran
Posts: 48
Joined: Thu Mar 17, 2016 4:52 pm

Need help with Makefile for ATMEL SAMV7

Post by cduran » Thu Mar 17, 2016 4:57 pm

I'm interested in building mp for the Atmel SAMV71. I've never really used gcc extensively and therefore not too familiar with how Make files are structured.

I would like to know what changes do I need to make to the make file for the minimal build? Any help that you guys can provide will be appreciated.

Thank you

Gordon_Hardman
Posts: 65
Joined: Sat May 03, 2014 11:31 pm

Re: Need help with Makefile for ATMEL SAMV7

Post by Gordon_Hardman » Mon Apr 01, 2019 5:27 pm

I know this is an old post, but I was curious if you were ever able to successfully do this?

User avatar
mattyt
Posts: 223
Joined: Mon Jan 23, 2017 6:39 am

Re: Need help with Makefile for ATMEL SAMV7

Post by mattyt » Mon Apr 01, 2019 11:34 pm

Interesting timing; last night I was up late trying to figure out how much work it would be to make the minimal port work with SAMD. I don't know how similar the SAMV chipset is but I did stumble on a samd-peripherals abstraction layer by Adafruit used in their CircuitPython implementation (see how it's used in the peripherals submodule of CircuitPython). It provides a consistent API across the SAMD21 and SAMD51, making it easier to build on top of.

The idea would be that it ought to be possible to use that api to provide SAMD functionality for the minimal port - and, later, hopefully a more complete port.

If someone was going to look into SAMV then it would be interesting to see if it could cleanly fit into that abstraction library, which would make it easier to produce a port for all of those chips...

tannewt
Posts: 33
Joined: Thu Aug 25, 2016 2:43 am

Re: Need help with Makefile for ATMEL SAMV7

Post by tannewt » Wed Apr 03, 2019 4:58 pm

mattyt, let me know if I can answer any of your questions about SAMD. I'd be happy to see MicroPython support for the SAMD series.

User avatar
shazz
Posts: 43
Joined: Tue Apr 30, 2019 6:35 pm
Contact:

Re: Need help with Makefile for ATMEL SAMV7

Post by shazz » Fri May 31, 2019 1:34 pm

Mattyt,

I asked a similar question on Adafruit CP forums (https://forums.adafruit.com/viewtopic.php?f=60&t=152352), what would it mean to havd a minimal support of SAMD based boards on MicroPython.

Looks like that's not an easy task. :roll:

Do you think that will happen ?
I have both SAMD and STM32 based boards and I need to port the same code on MP and CP, I can do that but as I'm using basic features plus my own modules, that's somewhat a pity.

Thanks!
8bits should be enough...

User avatar
mattyt
Posts: 223
Joined: Mon Jan 23, 2017 6:39 am

Re: Need help with Makefile for ATMEL SAMV7

Post by mattyt » Sat Jun 01, 2019 1:25 am

shazz wrote:
Fri May 31, 2019 1:34 pm
I asked a similar question on Adafruit CP forums (https://forums.adafruit.com/viewtopic.php?f=60&t=152352), what would it mean to havd a minimal support of SAMD based boards on MicroPython.
Scott (@tannewt) was kind enough to give me some advice in implementing the SAMD port; in short, some of the more useful take-aways were that it may be best to avoid the ASF libraries, use (and extend where it makes sense) the samd-peripherals library, take care with configuring clock domains and integrate TinyUSB. There was quite a bit more but I'll leave that for another post...

In any case, Scott also recently let me know that 'someone' else may be interested in SAMD - and sent me through a link to the forum with your post. :)
shazz wrote:
Fri May 31, 2019 1:34 pm
Looks like that's not an easy task. :roll:

Do you think that will happen ?
So, in parallel with Scott's chat, Damien looked into SAMD (I may have nudged him a little!). He sent me through a rough 'n' ready patch recently that is a very basic MicroPython SAMD port that allows the interpreter to run on both SAMD 21 and 51. Don't get too excited yet; there are no peripherals implemented; not even UART over USB. But we can run this on an Adafruit Trinket M0 or an Itsy Bitsy M4 by powering it over USB and connecting to the Rx/Tx pins to access the REPL. I was able to demo this at the last Melbourne MicroPython Meetup.

Despite the limited features, this is pretty cool!

Damien is not quite ready to share this as it's a little too rough. But I expect that some time soon we can spin this port out to a branch and start adding features. I'll let you know when it's publicly available.
shazz wrote:
Fri May 31, 2019 1:34 pm
I have both SAMD and STM32 based boards and I need to port the same code on MP and CP, I can do that but as I'm using basic features plus my own modules, that's somewhat a pity.
Yeah, I love how Adafruit/CP have picked up and run with MicroPython - and I understand their need to fork and even many of their decisions to modify certain features to better support beginners. But I do feel like both projects have missed an opportunity in that the core API's (I2C and SPI come to mind) differ enough that libraries cannot easily be written to target both.

In any case, I'm hopeful that we can start to form a SAMD port for MicroPython.

User avatar
shazz
Posts: 43
Joined: Tue Apr 30, 2019 6:35 pm
Contact:

Re: Need help with Makefile for ATMEL SAMV7

Post by shazz » Sat Jun 01, 2019 2:43 am

mattyt wrote:
Sat Jun 01, 2019 1:25 am
Don't get too excited yet
Too late! I'm excited!!!
mattyt wrote:
Sat Jun 01, 2019 1:25 am
Yeah, I love how Adafruit/CP have picked up and run with MicroPython - and I understand their need to fork and even many of their decisions to modify certain features to better support beginners. But I do feel like both projects have missed an opportunity in that the core API's (I2C and SPI come to mind) differ enough that libraries cannot easily be written to target both.

In any case, I'm hopeful that we can start to form a SAMD port for MicroPython.
I agree 200%, CircuitPython has its own public and their common abstraction layer will make sense for a lot of people, especially beginners.
Personally, I need a strong, low level, lightweight and fast core that I can easily build on top of it (in Python and custom C/Assembly modules) and MP is perfect for that.

So you have my full support and if I can provide any help, I'll do my best. My goal would be to add support for the pygamer board (SAMD51 including at least DAC, QSPI, SDHC, Timers + ST7735R TFT, LED and joystick)

Keep us in touch!
8bits should be enough...

User avatar
shazz
Posts: 43
Joined: Tue Apr 30, 2019 6:35 pm
Contact:

Re: Need help with Makefile for ATMEL SAMV7

Post by shazz » Mon Jun 10, 2019 2:58 pm

Any progress ?
Any test I can do to help ?
8bits should be enough...

User avatar
shazz
Posts: 43
Joined: Tue Apr 30, 2019 6:35 pm
Contact:

Re: Need help with Makefile for ATMEL SAMV7

Post by shazz » Mon Jun 10, 2019 3:00 pm

Any progress ?
Any test I can do to help ?
8bits should be enough...

User avatar
mattyt
Posts: 223
Joined: Mon Jan 23, 2017 6:39 am

Re: Need help with Makefile for ATMEL SAMV7

Post by mattyt » Tue Jun 11, 2019 6:28 am

Love the enthusiasm; so keen you offered help twice! ;)

Although some further progress has been made I believe Damien wants to sort out a few more technical issues before letting it loose. I'll keep at him to release it but I suspect Damien won't until it's at a level of quality he's happy with...please hang tight!

Post Reply