Is there a way to upload exported bin file to Nano 33 IoT from Raspberry Pi?

Hello,
I’ve Arduino Nano 33 IoT and Raspberry Pi 3. I’ve already installed Arduino IDE v1.8.12 on Raspberry Pi.

I want to upload an exported bin file ( sketch from Arduino IDE ) to Nano 33 IoT from Raspberry Pi.
Is it possible to upload?

Best regards,
pak

in Arduino IDE turn on verbose mode and see the upload command

Thank you for fast repose.

Actually, I've tried that method...

Forcing reset using 1200bps open/close on port /dev/ttyACM0
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyAMA0, } => {}
PORTS {/dev/ttyAMA0, } / {/dev/ttyAMA0, } => {}
PORTS {/dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {/dev/ttyACM0, }
Found upload port: /dev/ttyACM0
/home/pi/.arduino15/packages/arduino/tools/bossac/1.7.0-arduino3/bossac -i -d --port=ttyACM0 -U true -i -e -w -v /tmp/arduino_build_356792/BlinkDemo.ino.bin -R

I notice that Nano 33 IoT needs to reset in order to get serial port /dev/tty

Forcing reset using 1200bps open/close on port /dev/ttyACM0
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyAMA0, } => {}
PORTS {/dev/ttyAMA0, } / {/dev/ttyAMA0, } => {}
PORTS {/dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {/dev/ttyACM0, }
Found upload port: /dev/ttyACM0

Then, use bossac command to upload the sketch file

/home/pi/.arduino15/packages/arduino/tools/bossac/1.7.0-arduino3/bossac -i -d --port=ttyACM0 -U true -i -e -w -v /tmp/arduino_build_356792/BlinkDemo.ino.bin -R

I manually reset the Nano 33 IoT board by double pressing reset button, and run the following command, it works

pi@RPi4B:~ $ /home/pi/.arduino15/packages/arduino/tools/bossac/1.7.0-arduino3/bossac -i -d --port=ttyACM0 -U true -i -e -w -v /tmp/arduino_build_356792/BlinkDemo.ino.bin -R
Set binary mode
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
version()=v2.0 [Arduino:XYZ] Apr 19 2019 14:38:48
chipId=0x10010005
Connected at 921600 baud
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Atmel SMART device 0x10010005 found
write(addr=0x20004000,size=0x34)
writeWord(addr=0x20004030,value=0x10)
writeWord(addr=0x20004020,value=0x20008000)
Device       : ATSAMD21G18A
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Chip ID      : 10010005
version()=v2.0 [Arduino:XYZ] Apr 19 2019 14:38:48
Version      : v2.0 [Arduino:XYZ] Apr 19 2019 14:38:48
Address      : 8192
Pages        : 3968
Page Size    : 64 bytes
Total Size   : 248KB
Planes       : 1
Lock Regions : 16
Locked       : readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
none
readWord(addr=0x41004018)=0
Security     : false
Boot Flash   : true
readWord(addr=0x40000834)=0x7000a
BOD          : true
readWord(addr=0x40000834)=0x7000a
BOR          : true
Arduino      : FAST_CHIP_ERASE
Arduino      : FAST_MULTI_PAGE_WRITE
Arduino      : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
chipErase(addr=0x2000)
done in 0.838 seconds

Write 11460 bytes to flash (180 pages)
write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x2000, size=0x1000)
[==========                    ] 35% (64/180 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x3000, size=0x1000)
[=====================         ] 71% (128/180 pages)write(addr=0x20005000,size=0xd00)
writeBuffer(scr_addr=0x20005000, dst_addr=0x4000, size=0xd00)
[==============================] 100% (180/180 pages)
done in 0.077 seconds

Verify 11460 bytes of flash with checksum.
checksumBuffer(start_addr=0x2000, size=0x1000) = 4e46
checksumBuffer(start_addr=0x3000, size=0x1000) = f637
checksumBuffer(start_addr=0x4000, size=0xcc4) = 282b
Verify successful
done in 0.010 seconds
CPU reset.
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
writeWord(addr=0xe000ed0c,value=0x5fa0004)

I found that stty command is doing this reset operation. The problem is how to get these reset serial port command?

Any help will be appreciated,

pak

there is no command. the bootloader or core do a reset if connection at 1200 baud is opened

Thank you, it resets and goes into bootloader mode.