-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Arduino MKR Zero support? #5860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The best place to start would be to take an existing board from |
Switch CP to core 1 on S3
Adapting for a new board is pretty easy. The most laborious part is changing pins.csv, but any firmware for a SAM21 board should run a the device. Only the board name and the pin names may be wrong, but you can use the port numbers to designate a pin, like Pin("PA04"). |
@simonvanderveldt I had an old
I may make a PR but in the meantime check my branch mkrzero |
@Carglglz That's very good. The Arduino MKR Zero looks like a good board, with the SD card, the crypto chip and the available JTAG interface. Please make a PR, when you think you're ready. Since the board has a 32kHz crystal, you could try to set in mpconfigboard.h
That results in:
When using |
Just another note: Since the firmware supports touch1200, you may use the little script below to enable the bootloader:
It requires the |
@robert-hh thanks, really nice work with the
Yes, so far I've only done a quick test with the led and
I wasn't aware of this, I did tried importing RTC which didn't work so thanks for the explanation 👍🏼. Also any hint on checking what is the maximum firmware size for the
but somehow the uf2 size is
I'm missing something obvious I guess?
Thanks for this too, it would be nice to automate the flashing process tbh ⚙️ |
The flash size id 256k. Of that, 192 k are reserved by the code and almost fully used, 64k for the file The .uf2 files are about twice as large as the binary image itself. That's why you get the confusing number. But without a crystal the RTC clock would be controlled the internal low power 32kHz RC oscillator. And even it if is quite good for an RC oscillator, it is not good enough for a clock. But if you need the RTC class for consistency, you can enable it. Edit: There is an extended comment in mcu/samd21/clock_config.c, explaining the clock configuration settings. |
@Carglglz Nice! I don't use the MKR Zero anymore, but good to see that this might still happen! :) |
It would be interesting to set a maximum in Good news are that I2C and SPI work, the bad news are that there is actually no crypto chip (even it is in the schematics?) and it cannot mount the microSD. It can be detected and initiated but that's it, trying to mount returns |
At the end of the build process the linker tells the size of the binary. Like with these lines:
The 186532 plus 0x2000 is the total size in flash which is required. So it's 190k at the moment. 0x2000 is the start address of the code in flash.
This will increase however the space for the code to 204k. So you have reduce the size of the on-board file system by changing boards/samd21x18a.ld e.g. to the lines below:
Which decrease the file system to 48k and increase the space for the code by 16k. You can save that to a specific .ld file and reference that in the board's b.t.w.: Did you try enabling the crystal? |
About the crypto chip: On the picture of the board at arduino.cc I see a non-populated chip area between the MCU and the SD card connector. Most likely that the place where the crypto chip ought to be. The connections look right. |
Well that makes sense 😅 , I will try that next...
Yes, it did work and
Yes I can see the footprint now you've mentioned it. I guess it could be soldered but I have no |
@robert-hh FAT enabled and SD mounted successfully 🎉 . I will do the PR soon. |
First of all thanks for this awesome project!
Wanted to ask what would be necessary to add support for the Arduino SAMD21 based boards (specifically the MKR Zero)? Is there maybe already someone working on this?
The only relevant issues/PRs I could find are #4863 and #4994 but whilst they add SAMD support they don't contain anything for the Arduino boards.
Whilst I have no experience with this I could work on creating a PR to add it myself, but I could use some help/input on what needs to be done to add support for a new board. I couldn't really find any documentation for it.
The text was updated successfully, but these errors were encountered: