print_version.c 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Copyright (c) 2008-2012, Freescale Semiconductor, Inc.
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without modification,
  6. * are permitted provided that the following conditions are met:
  7. *
  8. * o Redistributions of source code must retain the above copyright notice, this list
  9. * of conditions and the following disclaimer.
  10. *
  11. * o Redistributions in binary form must reproduce the above copyright notice, this
  12. * list of conditions and the following disclaimer in the documentation and/or
  13. * other materials provided with the distribution.
  14. *
  15. * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
  16. * contributors may be used to endorse or promote products derived from this
  17. * software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  20. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  21. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  22. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  23. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  24. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  25. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  26. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  27. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  28. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. */
  30. /*!
  31. * @file print_version.c
  32. * @brief Contains function to print out the app release version.
  33. */
  34. #include "sdk.h"
  35. #include "sdk_version.h"
  36. #include "board_id/board_id.h"
  37. ////////////////////////////////////////////////////////////////////////////////
  38. // Code
  39. ////////////////////////////////////////////////////////////////////////////////
  40. /*!
  41. * print out the diag release version info
  42. *
  43. */
  44. void print_version(void)
  45. {
  46. char chip_str[64] = { 0 };
  47. char chip_rev_str[64] = { 0 };
  48. char board_str[64] = { 0 };
  49. char board_rev_str[64] = { 0 };
  50. fsl_board_id_t fsl_board_id = get_board_id();
  51. chip_name(chip_str, fsl_board_id.B.CHIP_TYPE_ID, false);
  52. chip_revision(chip_rev_str, fsl_board_id.B.CHIP_REV_MAJOR, fsl_board_id.B.CHIP_REV_MINOR);
  53. board_name(board_str, BOARD_TYPE);
  54. board_revision(board_rev_str, BOARD_REVISION);
  55. printf("\n\n\n\n");
  56. printf("**************************************************************************\n");
  57. printf(" Platform SDK (%s) for %s %s %s %s\n", k_sdk_version, chip_str, chip_rev_str,
  58. board_str, board_rev_str);
  59. printf(" Build: %s, %s\n", __DATE__, __TIME__);
  60. printf(" %s\n", k_sdk_copyright);
  61. printf("**************************************************************************\n\n");
  62. }
  63. ////////////////////////////////////////////////////////////////////////////////
  64. // EOF
  65. ////////////////////////////////////////////////////////////////////////////////