I’ve developped unit tests on a windows “native” platform (example here: Native unit testing + Code coverage generation for an embedded library - YouTube).
Some of my lib functions have been weaked. With ‘platform test’, it works: the ‘weak’ symbols are ignored and my ‘strong’ stubbed functions are linked correctly.
I need now to use weaked symbols to emulate my embedded lib on windows. But GCC (mingw) ignores the ‘weak’ attribute. Strong functions are not linked, the linker prefers the weak ones.
So, it seems “platformio test” is able to find the weak symbols, whereas “platformio run” compiles and links the code with a mingw version, which is unable to deal with ‘weak’ attributes.
Is there any option to pass to the linker in platformio.ini to take ‘weaks’ into account ?
Or do I need to install a specific mingw version ?