Projects in IAR are organized as follows:
.ewd
and .ewp
project files associated with it..eww
"workspace" file groups different projects together.all_projects.eww
workspace.All the projects shipped in the have been set up. We recommend you use those projects when exploring the different sample applications. You only need to follow the steps below when creating a project from scratch. |
OCSDK revisions <= 1.1.0.8 include IAR 6.x projects. Starting with OCSDK 1.2, it will included IAR 7.x project files, which are not compatible with a 6.x environment. If you are using a 6.x environment, you may need to set up project files manually, as described below. |
We assume your project is entitled myProject. |
app\myProject\
to hold the your project's source codemyProject\
to hold the IAR project filesapp\myProject\
. Typically, the source code consists of one of more C files, optionally header files, and the app_task_cfg.h
header file..ewp
project file a name (e.g. myProject.ewp
)main.c
file created by default:app\myProject\
), delete the main.c
file.app\myProject\
directory.app\common\
directory.inc\
directory.libip_stack.a
and libucos_full.a
, taken from the lib\
directory.modules\
directory.List the location of your header files in the Additional include directories text field, one per line. $PROJ_DIR$
is an IAR macro which corresponds to the directory containing the project's .ewp
file. A typical configuration is (<your_app_dir>
refers to the directory containing the source code of your application):
$PROJ_DIR$\..\..\..\src\app\<your_app_dir>\ $PROJ_DIR$\..\..\..\src\app\common\ $PROJ_DIR$\..\..\..\src\inc\ $PROJ_DIR$\..\..\..\src\modules\clilib\ $PROJ_DIR$\..\..\..\src\modules\ip_applib\ |
Preinclude file, enter:
$PROJ_DIR$\..\all_projects.iarinc |
In the Suppress these diagnostics text field, enter:
Pa039,Pa050,Pe767,Go005,Pa082,Pa089,Pe167,Pe550,Pe188,Pe177 |
In the Command line options text field, enter:
--no_path_in_file_macros --enum_is_int |
This output converter configuration is no longer needed. It produced a binary ( |
C:\Python27\python.exe "$PROJ_DIR$\..\..\..\tools\dustElfToBin\dustElfToBin.py" "$TARGET_PATH$" |
In the browse field, if you are using version 7.3 or earlier enter:
$PROJ_DIR$\..\..\..\tools\linker_configuration\EternaPublic.icf |
for version >= 7.4, the linker file is now bundled, so enter:
$TOOLKIT_DIR$\config\linker\Linear\DustNetworks\Eterna.icf |
In the Configuration file symbol definitions text field, enter:
use_loader=1 |
pic
k Entry symbol and set to:
__reset_handler |
ocfdk_02_adc.out
.In the browse entry, if you are using version 7.3 or earlier enter:
$TOOLKIT_DIR$\config\flashloader\Dust\FlashEternaPublic.board |
for version >= 7.4, the board file is now bundled, so enter:
$TOOLKIT_DIR$\config\flashloader\Linear\DustNetworks\FlashEterna.board |
The contents of the inc/
, lib/
, and modules/
directories are tightly linked together. We highly discourage modifying those files. Doing so will complicate upgrading your applications to a newer version of the and may have unintended effects on other applications. Future versions of the OCSDK will make it easier to customize the modules in one project without affecting the other samples. In the meantime, If you want to customize the behavior of the local or CLI module, we suggest creating a copy with a different name. For example, to customize the local module (assuming you will make changes to the following headers):
You can now edit the local task without impacting other projects.