Coder Social home page Coder Social logo

Creating a custom board about uf2-samdx1 HOT 10 CLOSED

adafruit avatar adafruit commented on August 28, 2024
Creating a custom board

from uf2-samdx1.

Comments (10)

dhalbert avatar dhalbert commented on August 28, 2024

Try not changing the stack size: you may be overflowing the stack. https://github.com/adafruit/uf2-samdx1/tree/master/boards/trinket_m0 and gemma_m0 are SAMD21E18A, so use one of those board defs as a starting point.

from uf2-samdx1.

 avatar commented on August 28, 2024

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,
Greg

from uf2-samdx1.

zjwhitehead avatar zjwhitehead commented on August 28, 2024

I had a similar problem when the wrong LED_TX_PIN was specified. Try removing all the PIN definitions and see if that helps.

from uf2-samdx1.

spacehuhn avatar spacehuhn commented on August 28, 2024

I'm facing the same problems using the ATSAMD21E17A.
I'm using trinket_m0 as base and tried modifying samd21j18a.ld like @gh185085 described.
No luck on my end either :(

from uf2-samdx1.

dhalbert avatar dhalbert commented on August 28, 2024

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.

from uf2-samdx1.

dhalbert avatar dhalbert commented on August 28, 2024

@spacehuhn and @gh185085 Could you point me to your repos? Did you reduce both the rom and ram values in the .ld file by half?

from uf2-samdx1.

spacehuhn avatar spacehuhn commented on August 28, 2024

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 trying to make these changes to compile a uf2 bootloader for the same board, but with a cheaper ATSAMD21E17A (128KB ROM, 16KB RAM).

I'm working on the fuse-repair-fixes branch now.

I edited samd21j18a.ld to:

  rom      (rx)  : ORIGIN = 0x00000000, LENGTH = 0x00002000
  ram      (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000

And samd21j18a_self.ld to:

  rom      (rx)  : ORIGIN = 0x00002000, LENGTH = 0x00010000
  ram      (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000

I'm building using gcc-arm-2017-q4 on ubuntu 18.04.

Running make BOARD=trinket_m0 works.
Flashing the resulting bootloader .bin using a J-Link over Atmel studio also works. The board is getting recognized and the TRINKETBOOT drive appears.

But that's it. It doesn't take a uf2 file and I can't be flashed using Arduino.
This is the part where I run into the same issue as previously mentioned:

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.

from uf2-samdx1.

gmta10101 avatar gmta10101 commented on August 28, 2024

@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?

from uf2-samdx1.

dhalbert avatar dhalbert commented on August 28, 2024

Closing this for now. Happy to re-open if further discussion is needed.

from uf2-samdx1.

nijupp24 avatar nijupp24 commented on August 28, 2024

HI All
i am working on a custom project which will use the SAMD21E17D controller am very poor in firmware any one can support me with 17D custom Bootloader ?? with led on PA28

from uf2-samdx1.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.