compiler gives error:
Error: Symbol mbed_mac_address multiply defined (by …/…/build/mbed-os/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/TARGET_FRDM/mbed_overrides.K64F.o and …/…/build/main.K64F.o).
It compiles smoothly when building with the online compiler and using the latest mbed-os. So I guess you have an older version in your project. Try to update the mbed-os library (right click on the mbed-os gear and select Update ...).
As I remember such error is usually reported when the online compiler is busy. Retry several times. If it still doesn’t work please let me know I can publish the modified tcpsocket-example which compiled fine for me.
I found out that updating the mbed-os library gives me headache. I get all kinds of problems all the time.
When I use existing code and update the mbed-os I get all errors by the change from 5.15 to 5.3 etc.
It makes me hate the online enviriment.
I have the exact same problem. I’ve successfully been using: “extern “C” void mbed_mac_address(char *s)” for many years and now I’ve moved to the K66 processor and get the same ‘multiple defined’ error as posted by Andries.
I have tried the code Zoltan has posted, it compiles fine, but on running, crashes instantly with the ‘disco lights of death’!
Any ideas?
I’m programming a commercial product and so need the ability to install proper unique MAC addresses.