Metro M4 custom blinky

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
BruMel
 
Posts: 1
Joined: Fri Oct 07, 2022 9:44 am

Metro M4 custom blinky

Post by BruMel »

Hi everyone,

Context:
Some electronic engineers in my company are developing a custom board that will host a ATSAMD51J19.
As such, I purchased a Metro M4 so I can start the coding part while these boards are not available.

Problem:
There is already a Rust legacy code base so I tried to flash it but it did not work
I tried to flash a simple helloWorld/Blinky but it also did not work.

Setup:
* Metro M4 connected to the PC for power.
* Keil UlinkMe debugger to flash via JTag/SWD
Image
(open image in other browser tab if preview does not work)

Suspicions so far:
* I am using a Keil UlinkMe probe but I still haven been able to confirm if they are compatible with the ATSAMD51J19. Are they incompatible? Should I get a Segger Jlink?
* The Metro M4 comes pre-loade with a bootloader. Could the the bootloader prevent the flashing to succeed?
* The memory area where the bootloader is stored may be protected. As such, even if the Keil UlinkMe debugger is not the problem, it simply cannot flash the new firmware in that memory location.

My main problem is that although I have several theories of what can be wrong, I am not sure how to confirm/rule out each of them. I may be missing some SW and/or hardware tools.

I am new to several things the micro controller, Ada fruit, etc, and not really sure how to proceed.

Can someone shed some light and help me determine what my next step should be?

User avatar
westfw
 
Posts: 2010
Joined: Fri Apr 27, 2007 1:01 pm

Re: Metro M4 custom blinky

Post by westfw »

I don't know for sure whether the bootloader memory is protected in a way that would interfere with loading other code via SWD.
But you could try to recompile your code to start at addresses beyond the bootloader (at 0x4000, where the bootloader expects applications to be.)
Aside from occupying low memory, the Arduino bootloaders are pretty non-invasive, and should allow even non-Arduino programs to be loaded (assuming they are at 0x4000)

Locked
Please be positive and constructive with your questions and comments.

Return to “Metro, Metro Express, and Grand Central Boards”