Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SPI::transferBytes should handle unaligned buffers #3315

Closed
souliss/souliss
#308
@piflav

Description

@piflav

Hi
compiling the very same source on macOS and Windows I get different binaries and while the output on Windows works pefectly the one on macOS crash with exception (9) on Wroom-2 (PRODino Board).
Both Arduino/esp8266 enviroment are fresh and updated installations.

Investigating I found the crash happens on line 463 of SPI.cpp:

*fifoPtr = *dataPtr;

calling void SPIClass::transferByte.
The source reports:

/**
 * Note:
 *  in and out need to be aligned to 32Bit
 *  or you get an Fatal exception (9)
 * @param out uint8_t *
 * @param in  uint8_t *
 * @param size uint32_t
 */

Is that the problem?
Why does it happen on macOS and not on Windows?

Thanks
Flavio


Hi,
I'm having the issue working with PRODIno board
https://www.kmpelectronics.eu/en-us/products/prodinowifi-esp.aspx.
Compiling and uploading the basic example
https://github.com/kmpelectronics/Arduino/blob/master/ProDinoWiFiEsp/src/PRODINoESP8266/examples/WiFiWebRelaySrv/WiFiWebRelaySrv.ino
on Windows works while on Mac I get exception (9) (see attached screenshot).
I asked to kmpelectronics but they cannot support with Mac and esp8266 Arduino libraries.
It's clear something wrong on the toolchain because same source different binaries beetween Mac and Windows. Both enviroments are fresh installations. I also tried installing esp8266 platform rather use the package provide by kmp to be sure to have the last and original toolchain+libraries but same result.

Thanks in advance
Ciao
Flavio

dump

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions