New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
avr-gcc: Undefined references to __iob
from unity.c
#567
Comments
Any non-standard compiler-specific defines like this can usually be avoided by adding the following to your cmock configuration:
These values will then be stripped from the file before it is parsed for function prototypes. |
Awesome - will give it a try!! |
Hmm...no dice...still getting the Also tried while using the |
Hm. I hadn't noticed that the problem is in the linker step. strippables is only going to help during mocking. It's strange that it's citing unity as the thing that contains |
It seems that the avr-gcc header files inject references to the
__iob
input/output buffer symbol, so attempting to mock any avr-gcc module with#include <avr/io.h>
will cause the following linker errors:@stephendpmurphy also ran into this problem in tiny.oled-firmware #13 but that issue remains unsolved...
My first thought on a workaround was to include a dummy
__iob
object (or maybe a re-redirect back to standard host OS streams) in a source file withintest/support/
for the linker to resolve, but I'm not sure where to start.The text was updated successfully, but these errors were encountered: