Not applicable
Oct 31, 2013
11:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 31, 2013
11:42 PM
In DAVE, you are able to build a static library and include it in a project:
1. Create the library
1a) Go to: >File >New >DAVE Project>Select project type: ARM-GCC Library for XMC Project>Empty Project>Define a "projectname">Select a appropriate Target device>Click "Finish"
1b) Create a source file with your library functions
1c) Build the project --> The library file "lib".a can be found in the artifact folder.
2. Include the library in a project
2a) Create an application project (e.g. empty main)
2b) Declare the library functions with extern reference
2c) Change project properties:
Go to: >Project>Active Project Properties>C/C++ Build >Settings>ARM-GCC C Linker>Libraries>Add "" in "Libraries (-l)" window>Add "path to Lib.a" in "Library search path (-L)" window
1. Create the library
1a) Go to: >File >New >DAVE Project>Select project type: ARM-GCC Library for XMC Project>Empty Project>Define a "projectname">Select a appropriate Target device>Click "Finish"
1b) Create a source file with your library functions
1c) Build the project --> The library file "lib
2. Include the library in a project
2a) Create an application project (e.g. empty main)
2b) Declare the library functions with extern reference
2c) Change project properties:
Go to: >Project>Active Project Properties>C/C++ Build >Settings>ARM-GCC C Linker>Libraries>Add "
7 Replies
Not applicable
Aug 07, 2015
01:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 07, 2015
01:39 AM
Even if the post is almost two years old I have a question: With my DAVE 3 I'm not able to generate a static library respectivly there is a strange behaviour: The checkbox "Show project types and toolchains only if they are supported on the platform" is enabled. And then I cannot create a "ARM-GCC Library for XMC Project.
Can anybody tell me why I shouldn't be able to create a static library?
Kind regards
Sebastian
Can anybody tell me why I shouldn't be able to create a static library?
Kind regards
Sebastian
Attachments are accessible only for community members.
Not applicable
Aug 17, 2015
07:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 17, 2015
07:43 PM
Hi Sebastian,
In Step 1a, please ensure that you have selected. If you selected otherwise, the lib will not be generated.
1a: Go to: >File >New >DAVE Project>Select project type: ARM-GCC Library for XMC Project>Empty Project>Define a "projectname">Select a appropriate Target device>Click "Finish"
Attached in this reply is a project created in DAVE v3.1.10 using the steps above to create and use a static library for your reference.
Regards,
Daryl 🙂
In Step 1a, please ensure that you have selected. If you selected otherwise, the lib will not be generated.
1a: Go to: >File >New >DAVE Project>Select project type: ARM-GCC Library for XMC Project>Empty Project>Define a "projectname">Select a appropriate Target device>Click "Finish"
Attached in this reply is a project created in DAVE v3.1.10 using the steps above to create and use a static library for your reference.
Regards,
Daryl 🙂
Jun 22, 2016
03:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 22, 2016
03:28 AM
I dont understand the last step.
Which paths do I have to set to include the library?
At the moment I get a strange error:
"../arm-gcc-49/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol Reset_Handler; defaulting to 08000000"
Lets say I have a Library called "ExampleLibrary". I build the library and get a "libExampleLibrary.a" file in my the Project debug folder.
I have another Application project called "Test", where i go unter Properties> C/C++ Build >Settings>ARM-GCC C Linker>Libraries
In Library (-l) i add "libExampleLibrary.a" (without the ")
In Library search Path (-L) I add "C:\Workspaces\DAVE-4.2-64Bit\WS_2015_03_02\ExampleLibrary\Debug\"
But all I get is the error I mentioned above.
I changed both values, but then I get a different error that the library can not be found.
Which paths do I have to set to include the library?
At the moment I get a strange error:
"../arm-gcc-49/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol Reset_Handler; defaulting to 08000000"
Lets say I have a Library called "ExampleLibrary". I build the library and get a "libExampleLibrary.a" file in my the Project debug folder.
I have another Application project called "Test", where i go unter Properties> C/C++ Build >Settings>ARM-GCC C Linker>Libraries
In Library (-l) i add "libExampleLibrary.a" (without the ")
In Library search Path (-L) I add "C:\Workspaces\DAVE-4.2-64Bit\WS_2015_03_02\ExampleLibrary\Debug\"
But all I get is the error I mentioned above.
I changed both values, but then I get a different error that the library can not be found.
Not applicable
Jun 29, 2016
01:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 29, 2016
01:02 AM
Hi,
Let's use your example.
Library project : ExampleLibrary
Library:libExampleLibrary.a
Location of library: c:\project\examplelibrary\debug\
Application Project to use the library: Test
Here's what you need to configure.
2c) Change project properties:
Go to: >Project>Active Project Properties>
In the opened dialog, goto C/C++ Build >Settings -> ARM-GCC C Linker -> Libraries -> Add "ExampleLibrary"
Next in "Libraries (-l)" window -> Add "path to Lib: "c:\project\examplelibrary\debug"
Once this is done, you should be able to compile your code using the library in your project.
Regards,
Daryl
Let's use your example.
Library project : ExampleLibrary
Library:libExampleLibrary.a
Location of library: c:\project\examplelibrary\debug\
Application Project to use the library: Test
Here's what you need to configure.
2c) Change project properties:
Go to: >Project>Active Project Properties>
In the opened dialog, goto C/C++ Build >Settings -> ARM-GCC C Linker -> Libraries -> Add "ExampleLibrary"
Next in "Libraries (-l)" window -> Add "path to Lib: "c:\project\examplelibrary\debug"
Once this is done, you should be able to compile your code using the library in your project.
Regards,
Daryl
Sep 26, 2016
05:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 26, 2016
05:28 AM
I am able to get the code to compile and link just fine and I am able to debug it with DAVE 4.3.2. However, I have two remaining questions:
1. Since my main application is set "Active", the library project is not active but it is open. How do I get DAVE not to "gray out" the source code when I view and modify the library source?
2. If I modify the library source, how do I get DAVE to automatically compile the necessary library code when I build my active application project?
Thanks in advance.
1. Since my main application is set "Active", the library project is not active but it is open. How do I get DAVE not to "gray out" the source code when I view and modify the library source?
2. If I modify the library source, how do I get DAVE to automatically compile the necessary library code when I build my active application project?
Thanks in advance.
May 26, 2017
01:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 26, 2017
01:07 AM
Thank you Daryl,
What if I would use an external static library using C++?
In particular i would define some classes in a static library and use them in a C++ project
Thank you
Matteo
What if I would use an external static library using C++?
In particular i would define some classes in a static library and use them in a C++ project
Thank you
Matteo
May 07, 2018
06:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 07, 2018
06:15 AM
Hallo,
I have problem give official library of Infineon webside to Dave Studio. if copy this folder to exist project. Compiler write errors. i need math function what are inside arm_math.
I am from this verry bad 😞 😞
please show me how i give inside libraries in picture
I have problem give official library of Infineon webside to Dave Studio. if copy this folder to exist project. Compiler write errors. i need math function what are inside arm_math.
I am from this verry bad 😞 😞
please show me how i give inside libraries in picture