Skip to content
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

Could you provide how you made .UF2 files for your example projects? #7

Closed
liudr opened this issue May 3, 2021 · 4 comments
Closed

Comments

@liudr
Copy link

liudr commented May 3, 2021

Hi,

I think this is a valid feature request to add documentation of how to create .UF2 file from arduino. Because it involves a number of steps to make this project work, including installing Arduino IDE, adding Seeed SAMD boards, adding the project files and possibly some libraries if I didn't download them already from trying out other Seeed boards and projects.
I'd like to know how to generate .UF2 files so I can send the .UF2 to someone who has no knowledge of the above but can still enjoy the Wio terminal. I added some keyboard/mouse features so it would be a nice operating panel for RPI without KMV.

Thank you!

@LynnL4
Copy link
Member

LynnL4 commented May 7, 2021

Hi,

FYI

Converting bin to uf2 for SAMD21

  1. Download the Microsoft uf2 tool from the official site to your local drive:
$ git clone https://github.com/microsoft/uf2.git
  1. Navigate to the utils folder:
$ cd uf2/utils
  1. Run the uf2conv.py python script in this location as follow:
$ python uf2conv.py -f 0x68ed2b88 -b 0x2000 [bin path] -o flash.uf2
# For example: for SAMD21(Cortex M0: XIAO, Seeeduino Zero, etc)
# python uf2conv.py -f 0x68ed2b88 -b 0x2000 /Users/ansonhe/Desktop/blink.bin -o flash.uf2
# or for SAMD51(Cortex M4: wio terminal, etc)
# python uf2conv.py -f 0x55114460 -b 0x4000 /Users/ansonhe/Desktop/blink.bin -o flash.uf2

Note: -f 0x68ed2b88 is for SAMD21 and -b 0x2000 is used for base address.
Note: -f 0x55114460 is for SAMD51 and -b 0x4000 is used for base address.

  1. Now you should find the converted flash.uf2 appeared in the uf2/utils folder.

  2. Simply drag the flash.uf2 into the Arduino Bootloader.

@LynnL4 LynnL4 closed this as completed May 7, 2021
@EdXian
Copy link

EdXian commented Jun 18, 2021

Hi @LynnL4 ,
I try to use arm-none-eabi-gcc to build the code and convert the generated code to .uf2 by
python uf2conv.py -f 0x68ed2b88 -b 0x2000 example.bin -o flash.uf2 .
Finally, I got a flash.uf2 and drag it to USB MSC . However, the usb device exit and didnt run my application.
I had tested my board with arduino and it can run example easily.
here is my projects which is the simplest project to startup samd21.

@LynnL4
Copy link
Member

LynnL4 commented Jul 30, 2021

@EdXian
Copy link

EdXian commented Jul 31, 2021

Hi @LynnL4
Thank you for your help. I'll try it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants