Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Linker warning: **** uses 2-byte wchar_t yet the output is to use 4-byte wchar_t

$
0
0

I'm attempting to setup Eclipse to compile programs for my EK-LM4F120XL

Here's the full warning: (I created a symlink to driverlib-cm4f.lib so that ld could find it)

/home/david/stellaris/toolchain/bin/arm-none-eabi-ld: warning: /home/david/stellaris/StellarisWare/driverlib/ccs-cm4f/Debug/libcm4f.a(gpio.obj) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

And the command that caused the error:

/home/david/stellaris/toolchain/bin/arm-none-eabi-ld -L/home/david/stellaris/StellarisWare/driverlib/ccs-cm4f/Debug -L/home/david/stellaris/toolchain/arm-none-eabi/lib --static --gc-sections -T/home/david/stellaris/toolchain/arm-none-eabi/lib/LM4F.ld -o "Blinky.elf"  ./Blinky.o ./LM4F_startup.o   -lcm4f -lc

And finally, my compile command:

/home/david/stellaris/toolchain/bin/arm-none-eabi-gcc -DPART_LM4F120H5QR -DARM_MATH_CM4 -DTARGET_IS_BLIZZARD_RA1 -I/home/david/stellaris/StellarisWare -I/home/david/stellaris/toolchain/arm-none-eabi/include -O0 -g3 -Wall -c -fmessage-length=0 -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MMD -MP -MF"Blinky.d" -MT"Blinky.d" -o "Blinky.o" "../Blinky.c"

If I use the StellarisWare APIs, this warning comes up and it does not run correctly. If I access memory directly (as in the blinky example in StellarisWare - not using any header files other than lm4f120h5qr.h), there are no warnings and it compiles perfectly.

What does the warning mean? How can fix it?

Thanks,
David 


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>