jump_table.c 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /**************************************************************************************************
  2. Phyplus Microelectronics Limited confidential and proprietary.
  3. All rights reserved.
  4. IMPORTANT: All rights of this software belong to Phyplus Microelectronics
  5. Limited ("Phyplus"). Your use of this Software is limited to those
  6. specific rights granted under the terms of the business contract, the
  7. confidential agreement, the non-disclosure agreement and any other forms
  8. of agreements as a customer or a partner of Phyplus. You may not use this
  9. Software unless you agree to abide by the terms of these agreements.
  10. You acknowledge that the Software may not be modified, copied,
  11. distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
  12. (BLE) integrated circuit, either as a product or is integrated into your
  13. products. Other than for the aforementioned purposes, you may not use,
  14. reproduce, copy, prepare derivative works of, modify, distribute, perform,
  15. display or sell this Software and/or its documentation for any purposes.
  16. YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
  17. PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
  18. INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
  19. NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
  20. PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
  21. NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
  22. LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
  23. INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
  24. OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
  25. OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
  26. (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
  27. **************************************************************************************************/
  28. /**************************************************************************************************
  29. Filename: jump_table.c
  30. Revised:
  31. Revision:
  32. Description: Jump table that holds function pointers and veriables used in ROM code.
  33. **************************************************************************************************/
  34. /*******************************************************************************
  35. * INCLUDES
  36. */
  37. #include "jump_function.h"
  38. #include "global_config.h"
  39. #include "OSAL_Tasks.h"
  40. #include "rf_phy_driver.h"
  41. /*******************************************************************************
  42. * MACROS
  43. */
  44. /*******************************************************************************
  45. * CONSTANTS
  46. */
  47. // jump table, this table save the function entry which will be called by ROM code
  48. // item 1 - 4 for OSAL task entry
  49. // item 224 - 255 for ISR(Interrupt Service Routine) entry
  50. // others are reserved by ROM code
  51. const uint32_t* const jump_table_base[256] __attribute__((section("jump_table_mem_area"))) =
  52. {
  53. (const uint32_t*)0, // 0. write Log
  54. (const uint32_t*)osalInitTasks, // 1. init entry of app
  55. (const uint32_t*)tasksArr, // 2. task list
  56. (const uint32_t*)&tasksCnt, // 3. task count
  57. (const uint32_t*)&tasksEvents, // 4. task events
  58. 0, 0, 0, 0, 0, // 5 - 9, reserved by phyplus
  59. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 10 - 19, reserved by phyplus
  60. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20 - 29, reserved by phyplus
  61. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 30 - 39, reserved by phyplus
  62. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40 - 49, reserved by phyplus
  63. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 50 - 59, reserved by phyplus
  64. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60 -69>, reserved by phyplus
  65. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 70 -79, reserved by phyplus
  66. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 80 - 89, reserved by phyplus
  67. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 90 - 99, reserved by phyplus
  68. 0,0, // 100 -
  69. (const uint32_t*)rf_phy_ini,
  70. 0,
  71. 0,
  72. 0,
  73. 0, 0, 0, 0, // - 109, reserved by phyplus
  74. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 110 -119, reserved by phyplus
  75. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 120 -129, reserved by phyplus
  76. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 130 -139, reserved by phyplus
  77. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 140 -149, reserved by phyplus
  78. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 150 -159, reserved by phyplus
  79. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 160 -169, reserved by phyplus
  80. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 170 -179, reserved by phyplus
  81. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 180 -189, reserved by phyplus
  82. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 190 -199, reserved by phyplus
  83. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 200 - 209, reserved by phyplus
  84. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 210 - 219, reserved by phyplus
  85. 0, 0, 0, 0, // 220 - 223 , reserved by phyplus
  86. 0, 0, 0, 0, 0, 0, // 224 - 229, for ISR entry
  87. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 230 - 239, for ISR entry
  88. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 240 - 249, for ISR entry
  89. 0, 0, 0, 0, 0, 0 // 250 - 255, for ISR entry
  90. };
  91. /*******************************************************************************
  92. * Prototypes
  93. */
  94. /*******************************************************************************
  95. * LOCAL VARIABLES
  96. */
  97. /*********************************************************************
  98. * EXTERNAL VARIABLES
  99. */
  100. uint32 global_config[SOFT_PARAMETER_NUM] __attribute__((section("global_config_area")));