The limitation of buffer size

Hi, all!
In my scenario, I need to put a large hex as plaintext in the Chipwhisperer Lite. I saw that there is a variable called MAX_SS_LEN in hardware/victims/firmware/simpleserial/simpleserial.c . I change it to the value to 80 which is higher than its default and it works when I put a 64-bytes plain text. However, it failed when I was trying to put a 100-byte long plaintext with the variable value 128.

So here comes my questions:

  1. What is the true limitation of the buffer ?
  2. In the default setting, the MAX_SS_LEN is 64. However, sending a 64-byte long text to the board will fail. I don’t understand why.

Thank you for trying to help!

SimpleSerial wasn’t really meant to transfer large amounts of data (such as a hexfile). I’d recommend transferring data in smaller chunks, which is what we do for the MBEDTLS RSA firmware.

I’m not too sure what exactly is going on with the serial communication at higher message lengths. The best way to find out is probably to use a debugger.

Alex