|
|
|
|
|
by pjmlp
452 days ago
|
|
It is a return to the age when we had BASIC and Z80/6502 Assembly, and yes doing memcpy/strcpy all over the place instead of having proper arrays and strings is that bad. At very least, C++. "C++14 For The Commodore 64" https://www.youtube.com/watch?v=nLv_INgaLq8 |
|
This presupposes that you're doing string manipulation and raw memory moves. I don't know about other people's code, but in my own experience neither of those things are likely to be happening in embedded code. You're much more likely to pre-allocate all your memory, and use zero-copy patterns where ever possible. I never used a C-string in relation to talking to peripherals (i2c, spi, register mapped) or when doing dsp. Moreover, if you do need to use memcpy it's probably because you are doing something very low level for which memcpy is the best choice.