I tried it with the IDE and it works, need \arduino\hardware\arduino\avr\platform.txt
modify
compiler.cpp.flags=-c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD
to
compiler.cpp.flags=-c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -E
then compile, when the linker spews up, open the temporary compilation folder and open the .o files. That is your code expanded.