Does anyone know what this linker error means and/or how to resolve it?
'Building target: USB_CDC_Test_App.elf'
'Executing target #4 USB_CDC_Test_App.elf'
'Invoking: ColdFire Linker'
"C:/Program Files/Freescale/CW MCU v10.2/MCU/ColdFire_Tools/Command_Line_Tools/mwldmcf" @@"USB_CDC_Test_App.args" -o "USB_CDC_Test_App.elf" -l"C:/Users/jim.fell/Source/Embedded/Libs/Target/Debug/Queue_MCF51JM.lib" -l"C:/Users/jim.fell/Source/Embedded/Libs/Target/Debug/USB_MCF51JM.lib" -l"C:/Users/jim.fell/Source/Embedded/Libs/Target/Debug/Debug_MCF51JM.lib" -l"C:/Users/jim.fell/Source/Embedded/Libs/Target/Debug/SArray_MCF51JM.lib" -l"C:/Users/jim.fell/Source/Embedded/Libs/Target/Debug/Serial_MCF51JM.lib" -l"C:/Users/jim.fell/Source/Embedded/Libs/Target/Debug/Text_MCF51JM.lib" -l"C:/Users/jim.fell/Source/Embedded/Libs/Target/Debug/Timer_MCF51JM.lib" -l"C:/Users/jim.fell/Source/Embedded/Libs/Target/Debug/valloc_MCF51JM.lib"
C:/Program Files/Freescale/CW MCU v10.2/MCU/ColdFire_Tools/Command_Line_Tools/mwldmcf|Linker|Error
>Illegal 16-bit small data area relative reference to symbol '_g_Mem'
>from address 0x000030BA in section '.text' of file 'USB_MCF51JM.lib
>This type of reference has a range from 4294934528 to 32767 bytes.
>from address 0x00003202 in section '.text' of file 'USB_MCF51JM.lib
I am using CodeWarrior for MCU v10 with the ColdFire V1 architecture. My application project is a simple bareboard project, which references multiple compiled libraries. All of the libraries build without issue. One of the libraries references a CDC library built using the Freescale USB stack v4.0.2. Changes I made to the stack were very minimal:
- Linker output was changed to generate a library, rather than an application:
- Project menu > Properties > C/C++ Build > Settings > Tool Settings tab > ColdFire Linker > Output > Output Type > Static Library
- Project menu > Properties > C/C++ Build > Settings > Build Artifact tab > Artifact Extension > lib
- These files were excluded from the build:
Functionality found in virtual_com.c was moved to one of the new libraries for abstraction purposes. I know where g_Mem is declared, but I'm confused as to why it's giving me this link error when I try to build my application with the USB driver in referenced libraries. Any help or insight into the linker error would be appreciated. Thanks.