Difference between revisions of "Source code project"

From SEGGER Wiki
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
All embOS projects in the board support packages use the embOS libraries instead of the embOS source code.
+
All shipped embOS projects use the embOS libraries instead of the embOS source code.
Even the embOS source shipment does not include a project which uses embOS sources.
+
Even the embOS source code shipment does not include any project which uses embOS sources.
   
  +
[[File:embOS_BSPLibProject.png|none|alt=embOS library project]]
   
[[File:embOS_BSPLibProject.png|none|alt=Active Simple project]]
 
   
It can be useful to have the embOS sources instead of the embOS library in a project, e.g. for easier debugging.
+
In some situations it can be useful to have the embOS sources instead of the embOS library in a project, e.g. for easier debugging.
 
To do so you just have to exclude or delete the embOS library from your project and add the embOS sources.
 
To do so you just have to exclude or delete the embOS library from your project and add the embOS sources.
   
Line 11: Line 11:
 
These files can be found in the embOS source shipment.
 
These files can be found in the embOS source shipment.
   
[[File:embOS_Src_Shipment.png|none|alt=Active Simple project]]
+
[[File:embOS_Src_Shipment.png|none|alt=embOS source code shipment]]
   
GenOSSrc embOS generic sources
 
CPU RTOS assembler file
 
CPU\OSSrcCPU CPU and compiler-specific files
 
   
  +
Please add the folders ''/GenOSSrc'', ''/CPU'' and ''/CPU/OSSrcCPU'' to your project and add all according C and assembler files to the project tree.
   
  +
An embOS port like e.g. ''embOS Cortex-M'' supports different cores.
Please add all C and assembler files from these folders to your project and add include
 
  +
Therefore the ''/CPU'' and ''/CPU/OSSrcCPU'' folder might include files which are not used for a specific core.
paths to these folders to your project settings. For some embOS ports it might be necessary
 
  +
With embOS Cortex-M please add RTOS.s or one of the core specific assembler files RTOS_CM0.S, RTOS_CM3.S and RTOS_CM4F.S.
to add additional defines to your preprocessor settings. If necessary you will find more
 
information about it in the CPU and compiler-specific embOS manual.
 
   
  +
[[File:embOS_BSPSourceProject.png|none|alt=embOS source code project]]
   
[[File:embOS_BSPSourceProject.png|none|alt=Active Simple project]]
 
   
  +
Add include paths to ''/CPU'' and ''/GenOSSrc'' to your project settings.
[[File:embOS_BSPAddIncludest.png|none|alt=Active Simple project]]
 
  +
For some embOS ports it might be necessary to add additional defines to your preprocessor settings.
  +
If necessary you will find more information about it in the CPU and compiler-specific embOS manual.
   
  +
[[File:embOS_BSPAddIncludest.png|none|alt=Preprocessor settings]]
   
  +
[[File:embOS_BSP_Compile.png|none|alt=Active Simple project]]
 
  +
You can now rebuild the project with the embOS sources:
  +
  +
[[File:embOS_BSP_Compile.png|none|alt=Rebuild source code project]]

Latest revision as of 14:28, 22 February 2023

All shipped embOS projects use the embOS libraries instead of the embOS source code. Even the embOS source code shipment does not include any project which uses embOS sources.

embOS library project


In some situations it can be useful to have the embOS sources instead of the embOS library in a project, e.g. for easier debugging. To do so you just have to exclude or delete the embOS library from your project and add the embOS sources.

The embOS sources consists of the files in the folder /GenOSSrc, /CPU and /CPU/OSSrcCPU. These files can be found in the embOS source shipment.

embOS source code shipment


Please add the folders /GenOSSrc, /CPU and /CPU/OSSrcCPU to your project and add all according C and assembler files to the project tree.

An embOS port like e.g. embOS Cortex-M supports different cores. Therefore the /CPU and /CPU/OSSrcCPU folder might include files which are not used for a specific core. With embOS Cortex-M please add RTOS.s or one of the core specific assembler files RTOS_CM0.S, RTOS_CM3.S and RTOS_CM4F.S.

embOS source code project


Add include paths to /CPU and /GenOSSrc to your project settings. For some embOS ports it might be necessary to add additional defines to your preprocessor settings. If necessary you will find more information about it in the CPU and compiler-specific embOS manual.

Preprocessor settings


You can now rebuild the project with the embOS sources:

Rebuild source code project