Strange ufconv error | w = struct.unpack("<II", buf[0:8])
Nt-f opened this issue · comments
Nt-f commented
when I try clicking pico littlefs data upload button I get the following error
Converting to uf2, output size: 193024, start address: 0x2000
Flashing E: (RPI-RP2)
Wrote 193024 bytes to E:/NEW.UF2
[LittleFS] data : C:\Users\<REDACTED>\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\2.7.2\libraries\LittleFS\examples\SpeedTest\data
[LittleFS] size : 0KB
[LittleFS] page : 256
[LittleFS] block : 4096
littlefs/lfs.c:561:error: No more free space 0
[LittleFS] upload : C:\Users\<REDACTED>\AppData\Local\Temp\arduino_build_417625/SpeedTest.mklittlefs.bin
[LittleFS] address : 270528512
[LittleFS] swerial : COM7
[LittleFS] python : C:\Users\<REDACTED>\AppData\Local\Arduino15\packages\rp2040\tools\pqt-python3\1.0.1-base-3a57aed\python3.exe
[LittleFS] uploader : C:\Users\<REDACTED>\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\2.7.2\tools\uf2conv.py
Traceback (most recent call last):
File "C:\Users\<REDACTED>\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\2.7.2\tools\uf2conv.py", line 437, in <module>
main()
File "C:\Users\<REDACTED>\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\2.7.2\tools\uf2conv.py", line 388, in main
from_uf2 = is_uf2(inpbuf)
File "C:\Users\<REDACTED>\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\2.7.2\tools\uf2conv.py", line 85, in is_uf2
w = struct.unpack("<II", buf[0:8])
struct.error: unpack requires a buffer of 8 bytes
LittleFS Upload failed! Did you close the Serial Monitor?
I get the same error for everything but I enclosed my code below anyway
my code is very simple and just to test udp multicast for now
#include <EthernetUdp.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 100, 177 };
//byte packetBuffer[UDP_TX_PACKET_MAX_SIZE]; // buffer to hold incoming packet,
char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; //buffer to hold incoming packet,
EthernetUDP Udp;
//int loopCounter = 0;
void setup() {
Serial.begin(115200);
Ethernet.init(17);
Ethernet.begin(mac, ip);
Udp.beginMulticast({ 239, 0, 1, 2 }, 20480);
Serial.println("Initilization Complete!");
}
void loop() {
int packetSize = Udp.parsePacket(); // Parse Packet and get size
if(packetSize) { // if packet contains data
packetSizeAndSender(packetSize);
// read the packet into packetBuffer
Udp.read(packetBuffer,UDP_TX_PACKET_MAX_SIZE);
Serial.println("Contents:");
Serial.println(packetBuffer);
}
}
void packetSizeAndSender(int packet) {
Serial.print("Received packet of size ");
Serial.println(packet);
Serial.print("From ");
IPAddress remote = Udp.remoteIP();
for (int i =0; i < 4; i++)
{
Serial.print(remote[i], DEC);
if (i < 3)
{
Serial.print(".");
}
}
Serial.print(", port ");
Serial.println(Udp.remotePort());
}
I already tried a complete wipe of arduino and all its associated files which worked once but then failed every other time. am I overlooking something here?
ps. I'm using Arduino V1.8.19
Nt-f commented
I spent way to long trying to fix this issue on my own to figure out 4m after making the issue the problem was that under tools > flash size all the size was allocated to sketch and some needed to go to FS.
Please add a note in the readme