/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / more than one .c file

Username:     
Password:     
             

Forum

# 1   2011-03-10 15:30:40 more than one .c file

xuwa0800
Member
From: Sweden
Registered: 2010-05-20
Posts: 27

more than one .c file

hej!

someone may have the experience: with the project becoming bigger, one may divide code to different .c files, some used as libraries and so on. and then when you compiling, there will be more than one .o file generated , so you can not use the .bat tool to download your app to the kit.

so are there some method to solve this problem?


/Wang

Offline

 

# 2   2011-03-11 07:32:06 more than one .c file

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: more than one .c file

The $1 launches the $1 tool that expects a $1 or a $1 file. So if you have more than one source file, you must generate a library.

For that the method is :
- create an new project, with a "lib" type application ("New library to be built"),
- add a CircleOS application in the same project ("New application to be build"), that you can name "exe application", and add the the generated ".lib" as application item,
- build the project : you can download the "exe application" in order to debug your program,
- when the programe is OK, you can launch the ".bat" in the directory where the ".lib" is, in order to add your applicatin into the Primer.

Take a look at this project as example : http://www.stm32circle.com/projects/project.php?id=55

Take a look at the FAQ who explains the procedure :http://www.stm32circle.com/forum/viewtopic.php?id=5

Yves

Last edited by yrt (2011-03-15 07:26:47)

Offline

 

Board footer