Open tarjei opened 3 years ago
Hi!
I originally planned to implement uploading as well, but so far I only implemented packing & unpacking. pack
should create a UF2 archive from a specified set of files, unpack
should extract files from a UF2 archive.
Currently there are two ways of uploading a UF2 file:
sudo mkdir /mnt/ev3 # prepare temporary directory
sudo umount /dev/<name of the emulated device> # unmount, if mounted (OK if it fails)
sudo mount /dev/<name of the emulated device> /mnt/ev3 # remount it in the temporary directory
cp file.uf2 /mnt/ev3/ # copy over the UF2 (do not run ls or other commands!)
sudo umount /mnt/ev3 # unmount the filesystem
sync # force changes to propagate to the brick
ev3duder uf2 unpack test.uf2 tmpdir
and upload them using ev3duder up
:
ev3duder up tmpdir/file.rbf /home/root/lms2012/prjs/file.rbf
ev3duder up tmpdir/file.elf /home/root/lms2012/prjs/file.elf
It should be possible to build uf2 uploading into ev3duder. However, I think some refactoring may be needed to prevent code duplication. I don't currently have much free time, but I'll try to look into that in the coming months.
With regards, Jakub
@JakubVanek thanks!
At least now I got some pointers to where I should start :)
Hi,
With the new uf2 pack(#15) command it is my understanding that you can upload and run an UF2 file from makecode.org directly on an EV3, but I have somehow failed to understand the steps. I try:
lego-untitled.uf2
)ev3duder uf2 pack /home/user/lego-untitled.uf2 Projects test
That is, step 3 does not return anything meaningful - nor do I find the file on my EV3. Any tips on what I'm doing wrong? What is the correct usage of the third argument (test) - what does it do?
Regards, Tarjei