Commit 9f240fd8 authored by reinhardkeil's avatar reinhardkeil
Browse files

Improved documentation

- Clearfied usage of CMSIS_device_header
- Added information to Flash ProgramPage function
- Added 'condition' to API
- Reverted version number of CMSIS-Pack documentation (to match implementation)
parent 6e9e43ae
......@@ -28,6 +28,7 @@ The \ref device_h_pg is the central include file that the application programmer
- \ref SysTick_gr function to configure and start a periodic timer interrupt.
- \ref ITM_Debug_gr are functions that allow printf-style I/O via the CoreSight Debug Unit and ITM communication.
CMSIS-Pack provides the <b>\#define CMSIS_header_file</b> in <a href="../../Pack/html/pdsc_components_pg.html#RTE_Components_h"><b>RTE_Components.h</b></a> which gives you access to this <b><i>device</i>.h</b> file.
\image html "CMSIS_CORE_Files_user.png" "CMSIS-Core (Cortex-M) User Files"
......@@ -125,6 +126,14 @@ void main (void) { // user application starts here
}
\endcode
CMSIS-Pack provides the <b>\#define CMSIS_header_file</b> in <a href="../../Pack/html/pdsc_components_pg.html#RTE_Components_h"><b>RTE_Components.h</b></a> which gives you access to the <b><i>device</i>.h</b> file
of a project. This allows you to generate generic software components that use the device selected in a project.
\code
#include "RTE_Components.h" // include information about project configuration
#include CMSIS_device_header // include <device>.h file
\endcode
\page using_VTOR_pg Using Interrupt Vector Remap
Most Cortex-M processors provide VTOR register for remapping interrupt vectors. The following example shows
......@@ -183,6 +192,7 @@ int main (void) {
while(1);
}
\endcode
\page using_ARM_pg Using CMSIS with generic Arm Processors
......@@ -249,6 +259,11 @@ The table below lists the folder and device names of the Arm processors.
\endif
</table>
\note
CMSIS-Pack provides the <b>\#define CMSIS_header_file</b> in <a href="../../Pack/html/pdsc_components_pg.html#RTE_Components_h"><b>RTE_Components.h</b></a> which gives you access to the <b><i>device</i>.h</b> file
of a project. This allows you to generate generic software components that adjust to the device settings.
\section using_ARM_Lib_sec Create generic Libraries with CMSIS
The CMSIS Processor and Core Peripheral files allow also to create generic libraries.
......
......@@ -36,6 +36,8 @@ The \ref device_h_pg is the central include file that the application programmer
- \ref PL1_timer_functions "Generic" and \ref PTM_timer_functions "Private" Timer functions to configure and start a periodic timer interrupt.
- \ref L1_cache_functions "Level 1" and \ref L2_cache_functions "Level 2" Cache controller functions to enable, disable, clean and invalidate caches.
CMSIS-Pack provides the <b>\#define CMSIS_header_file</b> in <a href="../../Pack/html/pdsc_components_pg.html#RTE_Components_h"><b>RTE_Components.h</b></a> which gives you access to this <b><i>device</i>.h</b> file.
\image html "CMSIS_CORE_A_Files_user.png" "CMSIS-Core-A User Files"
The CMSIS-Core-A user files are device specific. In addition, the \ref startup_c_pg is also compiler vendor specific.
......@@ -111,6 +113,14 @@ int main(void)
}
}
\endcode
CMSIS-Pack provides the <b>\#define CMSIS_header_file</b> in <a href="../../Pack/html/pdsc_components_pg.html#RTE_Components_h"><b>RTE_Components.h</b></a> which gives you access to the <b><i>device</i>.h</b> file
of a project. This allows you to generate generic software components that use the device selected in a project.
\code
#include "RTE_Components.h" // include information about project configuration
#include CMSIS_device_header // include <device>.h file
\endcode
\page using_ARM_pg Using CMSIS with generic Arm Processors
......@@ -147,4 +157,8 @@ The table below lists the folder and device names of the Arm processors.
</tr>
</table>
\note
CMSIS-Pack provides the <b>\#define CMSIS_header_file</b> in <a href="../../Pack/html/pdsc_components_pg.html#RTE_Components_h"><b>RTE_Components.h</b></a> which gives you access to the <b><i>device</i>.h</b> file
of a project. This allows you to generate generic software components that adjust to the device settings.
*/
......@@ -38,7 +38,7 @@ PROJECT_NAME = CMSIS-Pack
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = "Version 1.7.0"
PROJECT_NUMBER = "Version 1.6.0"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
......
......@@ -74,20 +74,17 @@ Files relevant to CMSIS-Pack are present in the following \b ARM::CMSIS director
<th>Version</th>
<th>Description</th>
</tr>
<tr>
<td>1.7.0</td>
<td>Modifications compared to Version 1.6.0
- added to \ref element_package "package" element the possibility to restrict the usage of the with attributes Dcore, Dname, Dvendor, and Tcompiler.
- added \ref element_dominate "dominate" element to overwrites identical \ref element_devices "devices", \ref element_apis "APIs", or \ref element_components "components".
- added new \ref pack_Cclass : "Audio", "Board Part", "Data Exchange", "Extension Board", "IoT Client", "IoT Utility", "Security", "Utility".
</td>
<tr>
<td>1.6.0</td>
<td>Modifications compared to Version 1.5.0
- added Armv8.1-M MVE processor feature attribute 'Dmve'.
- added local and global pre-include section \ref Pre_Include_Local_h, \ref Pre_Include_Global_h.
- added file categories 'preIncludeLocal' and 'preIncludeGlobal' \ref FileCategoryEnum.
- added file categories 'preIncludeLocal' and 'preIncludeGlobal' to the \ref FileCategoryEnum.
- added file attribute 'path' for file category 'header' to add support for relative include paths.
- added to \ref element_package "package" element the possibility to restrict the usage of the with attributes Dcore, Dname, Dvendor, and Tcompiler.
- added \ref element_dominate "dominate" element to overwrites identical \ref element_devices "devices", \ref element_apis "APIs", or \ref element_components "components".
- added attribute 'condition' to the \ref element_api "api" element so that an API can be excluded based on a condition.
- added new \ref pack_Cclass : "Audio", "Board Part", "Data Exchange", "Extension Board", "IoT Client", "IoT Utility", "Security", "Utility".
</td>
</tr>
<tr>
......
......@@ -124,6 +124,14 @@ by either implementing or using a set of functions, data types, and definitions.
<td>xs:boolean</td>
<td>optional</td>
</tr>
<tr>
<td>condition</td>
<td>Enter the identifier (attribute \em <b>id</b>) of a \ref element_condition "condition". The element is used if the condition resolves to \token{true}.
If the condition resolves to \token{false}, then the element will be ignored.
For example, an API might be specific for a certain toolchain or processor instruction set.</td>
<td>xs:string</td>
<td>optional</td>
</tr>
<tr>
<td>Capiversion</td>
<td>Version of this component. Is a mandatory part of the component ID. The version format is described in \ref VersionType "Version Type".
......
......@@ -172,7 +172,22 @@ It contains the statements that are specified with the element \b RTE_Components
#endif /* RTE_COMPONENTS_H */
\endcode
The typical usage of the <b>RTE_Components.h</b> file is in header files to control for example the inclusion of files
The <b>RTE_Components.h</b> file allows to create software that works with any supported device as it gives access to the
\b CMSIS_device_header. The \b CMSIS_device_header reflects the current selected device and gives you for example access
to the processor configuration. Refer to <b>"Device Header File <device.h>"</b> in <a href="../../Core/html/device_h_pg.html"><b>CMSIS-Core(M)</b></a>
or <a href="../../Core_A/html/device_h_pg.html"><b>CMSIS-Core(A)</b></a> for more information.
\code
#include CMSIS_device_header /* header file of the selected device in the project */
#if (defined (__MPU_PRESENT)) && (__MPU_PRESENT == 1)
// device has MPU, start the related code
#else
#error "Software Component requires a device with MPU"
#endif
\endcode
Another typical usage of the <b>RTE_Components.h</b> file is in header files to control for example the inclusion of files
that are related to other components for the same Software Pack.
\code
......
......@@ -317,13 +317,18 @@ int ProgramPage (unsigned long adr, unsigned long sz, unsigned char *buf);
\details
The function \b ProgramPage is used to write code into the Flash memory. It is invoked whenever an attempt is made to
download a program to Flash.
download a program to Flash. As Flash memory is typically organized in pages, the parameters to the function \b ProgramPage
should not cross alignment boundaries of these Flash Pages. The page size is specified in the struct FlashDevice.
The argument \a adr specifies the start address of the page that is to be programmed.
The argument \a sz specifies the size of the page that is to be programmed.
The argument \a sz specifies the data size in the data buffer.
The argument \a buf points to the buffer containing the data to be programmed.
The argument \a buf points to the data buffer containing the data to be programmed.
\note
The argument \a adr + \a sz should not cross any page boundary, however it is possible to have multiple calls to
\b ProgramPage for programming a flash page.
<b>Code Example</b>
\code
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment