-
Notifications
You must be signed in to change notification settings - Fork 184
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
Creating a custom board #96
Comments
Try not changing the stack size: you may be overflowing the stack. |
Hi Dan, Thanks for the quick feedback. Unfortunately, I'm still running into the same issue. I.e. the MCU enumerates with the htm, uf2, and txt file, but dragging and dropping a new uf2 to upgrade appears to cause a timeout and reset. The only difference between the SAMD21E/G/J is the pin count (32/48/64 pins) and the SAMD21*18/17/16/15 is flash memory (256/128/64/32 KB) and RAM (32/16/8/4 Kb). The best I can tell, I'm looking at half the memory from my eval kit (SAMD21J18A) to my custom board (ATSAMD21E17D), but from what I can tell, there should be sufficient space. I can copy and paste generic text file without issue, but the uf2 upgrade is still failing. Any additional thoughts/suggestions are greatly appreciated. EDIT: In addition to the different MCU, the development environment (e.g. the Windows 10 PC) is also different. Thanks, |
I had a similar problem when the wrong |
I'm facing the same problems using the ATSAMD21E17A. |
I have fixed some issues with the SAMD21 code, especially the updater, which may have been present if you were working off of master. PR #113 is in progress. You could try using that as a base for now. |
@spacehuhn and @gh185085 Could you point me to your repos? Did you reduce both the |
Thanks for the quick response! I have a dev board with a ATSAMD21E18A (256KB ROM, 32KB RAM) that works with the trinket m0 bootloader. I'm working on the fuse-repair-fixes branch now. I edited
And
I'm building using gcc-arm-2017-q4 on ubuntu 18.04. Running But that's it. It doesn't take a uf2 file and I can't be flashed using Arduino.
|
@gh185085 Would you be able to share your Atmel studio files? I've been trying to get this repo to build in atmel studio for weeks and I'm having no luck. Can you walk me through it? |
Closing this for now. Happy to re-open if further discussion is needed. |
HI All |
Hi All,
I apologize if this isn't the correct forum, but I'm attempting to use the UF2 bootloader on a custom board.
A little background:
On PC1
I have a SAM D21 Xplained Pro Evaluation Kit that uses a SAMD21J18A. My development environment is Windows 10. I'm able to build one of the examples ($> make BOARD=sparkfun-samd21-dev) and load this onto the Xplained without issue through AtmelStudio. Moreover, I can drag-and-drop a LED toggle example (after modifying the start address to "-Wl,--section-start=.text=0x2000") that's been converted to UF2 and see the LED toggle as expected.
Problem:
On PC2 (custom board running Windows 10 with a SAMD21E17D connected)
Now, I'm trying to use a custom board that uses a SAMD21E17D. I copied the board\sparkfun-samd21-dev, renamed the directory, and modified the board_config.h (mostly to see a different LED blink during boot mode).
I also modified .\uf2-samdx1\scripts\samd21j18a.ld as the Makefile seems hardcoded to this file. The change I made here was to modify the ram LENGTH = 0x00004000 (to match the datasheet) and change the stack size from 0x2000 to 0x1000.
I'm able to build and load the custom board through AtmelStudio onto my custom target (PC2); this time using a Atmel-ICE debugger. I can see the LED fade in/out and the device enumerate as a MSD with the current.uf2, index.htm, and info_uf2.txt files while it's in boot mode. Now, when I try to drag-and-drop my new uf2, nothing happens. After a minute or so, the SAMD MCU appears to reset (no double-reset though, so it doesn't re-enter boot mode)
I'm a bit stuck on how to proceed debugging this issue. Any guidance is much appreciated.
Thanks,
Greg
The text was updated successfully, but these errors were encountered: