1

I purchased Michael Barr's embedded bootcamp training. It includes an IAR project that have all libraries configured. This project file is what all projects are created from. The code in project file are in . I would like to develop in . There was an LCD library that I removed. The bsp and cpu files are all in . I think there is a linking library for Ucos III theres a file in linker configuratuion called ucosIII.a . I can compile but I am getting linker errors:

Error[Li005]: no definition for "_CPU_IntDisMeasStart" [referenced from os_task.o(uCOS-III.a)] 
Error[Li005]: no definition for "_CPU_IntDisMeasStop" [referenced from os_task.o(uCOS-III.a)]
Error[Li005]: no definition for "_CPU_TS_Update" [referenced from C:\embedded Bar grp\Exercises\RealtimeIObjects\Exercise1\Debug\Obj\os_cpu_c.o] 
Error[Li005]: no definition for "_adc_isr" [referenced from C:\embedded Bar grp\Exercises\RealtimeIObjects\Exercise1\Debug\Obj\adcisr.o] 
Peter Petrik
  • 9,701
  • 5
  • 41
  • 65
  • 2
    You're probably missing `extern "C" { }` around your C library API. – Paul R Jul 08 '14 at 15:34
  • 1
    1)How Do I include extern "c" { }? 2)Should I insert extern "c" {} at the beginning of file for all of my .c files?3) should brackets contain body of program? Ive never used extern in this capacity. 4)what about the .h files? – Patrick Glenn Jul 09 '14 at 01:17
  • 2
    If you're calling C functions from C++ code then you need `extern "C" {}` around the function *declarations* in the relevant .h file. Rather than modify headers though you can instead just put it around the #include in the relevant .cpp source file(s). Note that this is just a guess based on the very limited information you have given in your question. See also related questions here on StackOverflow. – Paul R Jul 09 '14 at 07:14

0 Answers0