Other Parts Discussed in Thread: C2000WARE
Hello everyone,
I lost 2 days while tracking down a mysterious linker error. The linker couldn't find a symbol, but I was 100% sure that the symbol must exist.
Reducing the problem more and more I ended up starting from scratch with the TI-Example Project "empty_bitfield_driverlib" for the TMS320F28388D out of C2000Ware_3_03_00_00.
The "self written"code is as little as this:
#include "f28x_project.h"
#include "driverlib.h"
#include "device.h"
void main(void)
{
Device_init(); //driverlib function
}
After comparing every Linker and compiler-settings I finally found the difference. In my project, the file containing the main is a .cpp file and in the example, it is a .c file.
So I changed the main of the example to .cpp and got the same linking error. (So it's very easy to reproduce)
Since we want to use cpp, changing the file to a simple c file is not acceptable. I then changed the driverlib.c to a driverlib.cpp and now the linker could find the symbol. (I now have 100+ Warnings about deprecated piece of code inside the driverlib.cpp)
I now ran into similar problems several times. Since c is a subset of cpp ther linker should not run into problems finding the symbols. From c to cpp I understand, that there might be some limitations.
Furthermore I am not able to load the example project onto the TMS320F28388D ControlCard (Rev 1.) I always get the error:
C28xx_CPU1: File Loader: Verification failed: Values at address 0x00000@Program do not match Please verify target memory and memory map.
C28xx_CPU1: GEL: File: C:\Users\marcel.kummer\workspace_v10\empty_bitfield_driverlib_project\CPU1_RAM\empty_bitfield_driverlib_project.out: a data verification error occurred, file load failed.
1) Are there any limitations to using c and cpp at the same time? Since all your libs are in c this would mean cpp is not fully supported.
2) Furthermore, can you please explain, why the linker fails to find the symbol for cpp sources if the used function is written in a c file?
3) Is there any way to get rid of all the warnings generated by the driverlib.cpp? (driverlib.c renamed to .cpp)
4) What do I have to do to successfully load the example project onto the controlCard
PS:
Compiler-Version: TI v20.2.1.LTS
CCS: 10.1.1.00004
Thanks and regards,
Marcel Kummer.