![]() |
Forum Index : Microcontroller and PC projects : XMODEM R fname$ limitation - All USB host versions RP2040 and RP2350
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10250 |
homa has found that XMODEM transfers direct to the flash disk (A: drive) failed on the new HDMIUSB version of MMBasic. I've since done some testing and diagnostics and this is also the case on the RP2040 VGAUSB version and I suspect on all USB-host versions The limitation would also affect non USB-host versions of MMBasic if a serial console, rather than the USB console, was selected. The reason for this is that the serial console uses hardware interrupts to receive and transmit information (USB is polled). However, writing to flash requires that interrupts are disabled. This causes XMODEM to lock up when receiving a file direct to the A: drive. In future versions I will block this, I can't currently see any sensible fix. Receiving files to RAM or to an SDcard work as expected for all versions |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2437 |
an alternative would be to limit the size of files being transferred to available free RAM, as is what happens when doing an XMODEM transfer into the editor / to slot 0; the complete file is buffered into RAM, and only then written to flash. cheers, rob :-) Edited 2024-09-03 02:42 by robert.rozee |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2437 |
another option that may work is to just receive (say) a dozen packets, but do NOT acknowledge the last one. write that dozen packets to flash, and only then send the acknowledgement which will allow the sending end to send more packets. repeat. from: https://en.wikipedia.org/wiki/XMODEM and based on the comment that "Files were transferred one packet at a time". you just need to be able to complete each flash write before the sending end tries to resend the last unacknowledged packet, a timeout that is likely to be several seconds. cheers, rob :-) Edited 2024-09-03 03:26 by robert.rozee |
||||
stanleyella![]() Guru ![]() Joined: 25/06/2022 Location: United KingdomPosts: 2547 |
get a downloaded file from windows to pico a: nothing works, well not 4 me. teraterm, mmedit CC, xmodem...putty I got sd card reader and ili9341 has one so copy to sd card and use that, crude but works. getting win files to picomite is a .... parrot |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |