EtherCard icon indicating copy to clipboard operation
EtherCard copied to clipboard

MiniCore bootloader error

Open mrv96 opened this issue 4 years ago • 2 comments

Hi, the library works well, but when i compile with MiniCore bootloader option selected i have this error: invalid conversion from 'uint8_t* {aka unsigned char*}' to 'const char*' [-fpermissive]

The error is referred to both 'sendUdp' and 'makeUdpReply' methods. This happends because the buffer is defined as uint8_t, while the parameter 'data'of the two functions is a 'const char *'.

Since char definition sign is compiler dependent (https://stackoverflow.com/questions/29643031/invalid-conversion-from-uint8-t-aka-unsigned-char-to-const-char-fperm) and MiniCore bootloader is more recent respect both the original bootloader and Optiboot, maybe is better to update the 'data' parameter from 'const char *' to 'const uint8_t *'.

I tried this fix, and now the library compile without errors.

mrv96 avatar Feb 07 '20 16:02 mrv96

Thanks for letting us know.

Please could you attach a diff (or create a PR) of your change, so we can see exactly what you had to fix?

njh avatar Feb 09 '20 01:02 njh

Done: https://github.com/njh/EtherCard/pull/385

Let me know what do you think about.

mrv96 avatar Feb 09 '20 10:02 mrv96