Moved library version defines and strings to separate version header file, from the global types file to reduce the compile dependency impact when altering library patch version for minor update or documentation only changes.
Update the version number for 0.5 development.
Updated version API source code for new header.
Signed-off-by: Mike Leach mike.leach@linaro.org --- .../ref_trace_decode_lib.vcxproj | 1 + .../ref_trace_decode_lib.vcxproj.filters | 3 + decoder/include/ocsd_if_types.h | 17 +----- decoder/include/ocsd_if_version.h | 65 ++++++++++++++++++++++ decoder/source/ocsd_version.cpp | 2 +- 5 files changed, 71 insertions(+), 17 deletions(-) create mode 100644 decoder/include/ocsd_if_version.h
diff --git a/decoder/build/win/ref_trace_decode_lib/ref_trace_decode_lib.vcxproj b/decoder/build/win/ref_trace_decode_lib/ref_trace_decode_lib.vcxproj index 09133ce..a08fd6c 100644 --- a/decoder/build/win/ref_trace_decode_lib/ref_trace_decode_lib.vcxproj +++ b/decoder/build/win/ref_trace_decode_lib/ref_trace_decode_lib.vcxproj @@ -362,6 +362,7 @@ <ClInclude Include="..\..\..\include\mem_acc\trc_mem_acc_file.h" /> <ClInclude Include="..\..\..\include\mem_acc\trc_mem_acc_mapper.h" /> <ClInclude Include="..\..\..\include\ocsd_if_types.h" /> + <ClInclude Include="..\..\..\include\ocsd_if_version.h" /> <ClInclude Include="..\..\..\include\opencsd.h" /> <ClInclude Include="..\..\..\include\ptm\ptm_decoder.h" /> <ClInclude Include="..\..\..\include\ptm\trc_cmp_cfg_ptm.h" /> diff --git a/decoder/build/win/ref_trace_decode_lib/ref_trace_decode_lib.vcxproj.filters b/decoder/build/win/ref_trace_decode_lib/ref_trace_decode_lib.vcxproj.filters index 11acc41..87aa847 100644 --- a/decoder/build/win/ref_trace_decode_lib/ref_trace_decode_lib.vcxproj.filters +++ b/decoder/build/win/ref_trace_decode_lib/ref_trace_decode_lib.vcxproj.filters @@ -326,6 +326,9 @@ <ClInclude Include="..\..\..\include\stm\trc_pkt_decode_stm.h"> <Filter>Header Files\stm</Filter> </ClInclude> + <ClInclude Include="..\..\..\include\ocsd_if_version.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ClCompile Include="..\..\..\source\trc_component.cpp"> diff --git a/decoder/include/ocsd_if_types.h b/decoder/include/ocsd_if_types.h index 13fce2e..0477903 100644 --- a/decoder/include/ocsd_if_types.h +++ b/decoder/include/ocsd_if_types.h @@ -47,6 +47,7 @@ #include <inttypes.h> #endif
+ /** @defgroup ocsd_interfaces OpenCSD Library : Interfaces @brief Set of types, structures and virtual interface classes making up the primary API
@@ -55,23 +56,7 @@
@{*/
-/** @name Library Versioning -@{*/ -#define OCSD_VER_MAJOR 0x0 /**< Library Major Version */ -#define OCSD_VER_MINOR 0x4 /**< Library Minor Version */ -#define OCSD_VER_PATCH 0x2 /**< Library Patch Version */ - -/** Library version number - MMMMnnpp format. - MMMM = major version, - nn = minor version, - pp = patch version -*/ -#define OCSD_VER_NUM (((uint32_t)OCSD_VER_MAJOR << 16) | ((uint32_t)OCSD_VER_MINOR << 8) | ((uint32_t)OCSD_VER_PATCH))
-#define OCSD_VER_STRING "0.4.2" /**< Library Version string */ -#define OCSD_LIB_NAME "OpenCSD Library" /**< Library name string */ -#define OCSD_LIB_SHORT_NAME "OCSD" /**< Library Short name string */ -/** @}*/
/** @name Trace Indexing and Channel IDs @{*/ diff --git a/decoder/include/ocsd_if_version.h b/decoder/include/ocsd_if_version.h new file mode 100644 index 0000000..4b8d3e2 --- /dev/null +++ b/decoder/include/ocsd_if_version.h @@ -0,0 +1,65 @@ +/* + * \file ocsd_if_version.h + * \brief OpenCSD : Library API versioning + * + * \copyright Copyright (c) 2016, ARM Limited. All Rights Reserved. + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ARM_OCSD_IF_VERSION_H_INCLUDED +#define ARM_OCSD_IF_VERSION_H_INCLUDED + +#include <stdint.h> + +/** @addtogroup ocsd_interfaces +@{*/ + +/** @name Library Versioning +@{*/ +#define OCSD_VER_MAJOR 0x0 /**< Library Major Version */ +#define OCSD_VER_MINOR 0x5 /**< Library Minor Version */ +#define OCSD_VER_PATCH 0x0 /**< Library Patch Version */ + +/** Library version number - MMMMnnpp format. + MMMM = major version, + nn = minor version, + pp = patch version +*/ +#define OCSD_VER_NUM (((uint32_t)OCSD_VER_MAJOR << 16) | ((uint32_t)OCSD_VER_MINOR << 8) | ((uint32_t)OCSD_VER_PATCH)) + +#define OCSD_VER_STRING "0.5.0" /**< Library Version string */ +#define OCSD_LIB_NAME "OpenCSD Library" /**< Library name string */ +#define OCSD_LIB_SHORT_NAME "OCSD" /**< Library Short name string */ +/** @}*/ + +/** @}*/ + +#endif // ARM_OCSD_IF_VERSION_H_INCLUDED + +/* End of File ocsd_if_version.h */ diff --git a/decoder/source/ocsd_version.cpp b/decoder/source/ocsd_version.cpp index 15a9912..33990a0 100644 --- a/decoder/source/ocsd_version.cpp +++ b/decoder/source/ocsd_version.cpp @@ -32,7 +32,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#include "ocsd_if_types.h" +#include "ocsd_if_version.h" #include "common/ocsd_version.h"
const uint32_t ocsdVersion::vers_num()