This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Linker configuration or debuggable libraries

Hello forum,
I've got the following situation:
I am writing a huge library in C++ with many classes. My Cortex-M3 applications are using this library. Right now I am putting the library source files together with the application source files into the same project. This has one reason. I tried to build a dedicated library which is then linked to my application. Sadly I did not find a way to debug my application aaand step into library funtions. The uVision debugger is just showing the library assembler code.

The problem is as follows:
- When putting library and application code together the linker is also linking the unused library code into the executable which leads to blow up of my executables size.

- When building the library as dedicated code library I can't debug the library source code.

So my question is:
1st: Is there a way to tell the linker to ignore unused code/c++ classes?

2nd: Is there a way that I have not yet revealed to debug an application and an attached library so that I can single step through the application as well as the library code?

Thanks a lot in advance!
Best regards
Jan

Parents
  • Libraries can also be debugged at source level.

    First build the libraries with debug information. Then when debugging the application which uses this library just execute the "SET SRC=path_to_library_source" command which will tell the debugger where the library source files used to build the library are located. After that you should be able to debug the library at source level.

Reply
  • Libraries can also be debugged at source level.

    First build the libraries with debug information. Then when debugging the application which uses this library just execute the "SET SRC=path_to_library_source" command which will tell the debugger where the library source files used to build the library are located. After that you should be able to debug the library at source level.

Children