This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CPPUNIT with TI code composer studio for C64

Has anyone built and used CPP unit on C64s. If yes please let me know.

I am building CPPUNIT with TI code composer studio.

to create the lib I have include all files under

CPPUnit\src\cppunit

I think I need to add a few more files not sure..

I get the following errors when I lnk this lib with my actual project errors encountered during linking; "UnitTestRunner.out" not built Linking failed. Check the Console window for details.

symbol "initialization guard variable for ExampleTest::getTestNamer__()::testNamer" redefined: first defined in "C:\work\CodeComposerStudio\Example\UnitTest\ \Example.lib<ExampleTests.obj>"; redefined in "C:\work\CodeComposerStudio\Example\UnitTest\ \Example.lib<ExampleTests.obj>"

symbol "initialization guard variable for ExampleTest::getTestNamer__()::testNamer" redefined: first defined in "C:\work\CodeComposerStudio\Example\UnitTest\ \Example.lib<ExampleTests.obj>"; redefined in "C:\work\CodeComposerStudio\Example\UnitTest\ \Example.lib<ExampleTests.obj>" ptimequant C:\work\ CodeComposerStudio\Example\UnitTest\Example.lib<Examplep2q.obj> ptimerecon C:\work\ CodeComposerStudio\Example\UnitTest\Example.lib<Examplep2q.obj> std::uncaught_exception() C:\work\ CodeComposerStudio\UnitTestRunner\lib\cppunit.lib<XmlOutputter.obj> UnitTestRunner line 0 1261499558894 840

symbol "initialization guard variable for Example::getTestNamer__()::testNamer" redefined: first defined in "C:\work\CodeComposerStudio\Example\UnitTest\ \Example.lib<ExampleTests.obj>"; redefined in "C:\work\ CodeComposerStudio\Example\UnitTest\ \Example.lib<ExampleTests.obj>"

unresolved symbol __catchclause_number, first referenced in ./main.obj UnitTestRunner line 0 1261499558894 843

unresolved symbol __caughtobject_address, first referenced in C:\work\ CodeComposerStudio\UnitTestRunner\lib\cppunit.lib<DefaultProtector.obj>

unresolved symbol __currehstackentry, first referenced in ./main.obj

unresolved symbol __ehcurr_region, first referenced in ./main.obj

unresolved symbol __exceptioncaught, first referenced in ./main.obj

unresolved symbol __freethrownobject, first referenced in ./main.obj 99558894 848 unresolved symbol ___internalrethrow, first referenced in C:\work\ CodeComposerStudio\UnitTestRunner\lib\cppunit.lib<XmlOutputter.obj>

unresolved symbol ___rethrow, first referenced in ./main.obj

unresolved symbol __suppressoptimonvarsintry, first referenced in ./main.obj

unresolved symbol __throwsetup_dtor, first referenced in C:\work\ CodeComposerStudio\UnitTestRunner\lib\cppunit.lib<XmlOutputter.obj>

unresolved symbol ___throw, first referenced in C:\work\ CodeComposerStudio\UnitTestRunner\lib\cppunit.lib<XmlOutputter.obj>

unresolved symbol Examplep2vuvfrmcb, first referenced in C:\work\ CodeComposerStudio\Example\UnitTest\Example.lib<evcode.obj>

unresolved symbol std::Facetptr::Psave, first referenced in [with

unresolved symbol std::num_put<T1,, first referenced in T2>::id

unresolved symbol std::numpunct::id, first referenced in [with

unresolved symbol void, first referenced in CppUnit::removeFromSequence<T1,

  • I have found no reference to CPPUnit, so I do not have any idea what this is or where it came from. You will need to explain more detail about what this is and where you got it. It may be obvious to someone from a particular product line at TI, but not to me. Also mention the version of CCS and the target processor and such.

    Obviously, you have some files missing to be generating all the unresolved symbol errors, and the first 3 errors imply that you have some extra files that you should not be using.

    There should be documentation along with the project you want to build to tell you what should be collected for this build.

  • Hi thanks for the reply,

    Well I am trying to port an open source unit test frame work for the TI paltform. Heres the link to the same

    http://sourceforge.net/apps/mediawiki/cppunit/index.php?title=Main_Page

    I had posted this just to see if antone in the TI comunity has done this before.

     

    Regards,

    Pavan

  • Hi,

     

    I have similar problem with CppUnit and want to run unit tests on the target platform.

     

    Pavan,

    Have you solved this problem? Please let me know.

     

    Regards,

    /Bodhi

  • Hi Bodhima,

      Unfortunately I havent solved it yet. Actually I didnt get time to pursue it further. I have also posted the question on CPP Unit forum, but no luck.

    Do let me know if you make a breakthrough!

    Good Luck,

     

    Pavan

  • Hi,

    Have you enabled exception handling and rtti in your compiler settings ?

    Getting a general purpose lib like CppUnit running on an embedded environment may not work easily for many reasons (eh, rtti may not be allowed in your project settings, dynamic memory allocation using malloc may not be mapped to the underlying RTOS correctly...) I suggest to try a lightweight variant specifically aimed at embedded platforms - do a web search for 'cppunit embedded' or something like that.

    I was able to cross compile embUnit - a unit testing platform for an RTOS with C as the programming language - on CCS v4 (or rather with cl6x V6.1.x) with some obvious hacks to the makefile (change compiler name, flags etc.)

    -Amal

  • Hi Guys,

    i tried to build CppUnit 1.12.1 with the TI C6000 compiler Vesion 7.2.3. I have got the same problems as mentioned by the . The trick was to switch the output format of the compiler to "eabi(ELF)". The compiler options RTTI and Exception handling must be enabled.

    I was able to compile the "Money example", that is included in the cppunit download, against my cppunit lib und run it successfully in the C64x+ Simulator.

    In the attachment you will find two CCSv5.1 projects. The first one to build the cppunit lib and the second one contains the "Money example".

    Please give it a try and give some feedback!

    Regards,
    Joachim

    6607.CppUnitC6000_EABI.zip