RTX_Config.c 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * Copyright (c) 2013-2023 Arm Limited. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the License); you may
  7. * not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an AS IS BASIS, WITHOUT
  14. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. *
  18. * -----------------------------------------------------------------------------
  19. *
  20. * $Revision: V5.2.0
  21. *
  22. * Project: CMSIS-RTOS RTX
  23. * Title: RTX Configuration
  24. *
  25. * -----------------------------------------------------------------------------
  26. */
  27. #include "cmsis_compiler.h"
  28. #include "rtx_os.h"
  29. // OS Idle Thread
  30. __WEAK __NO_RETURN void osRtxIdleThread (void *argument) {
  31. (void)argument;
  32. for (;;) {}
  33. }
  34. // OS Error Callback function
  35. __WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) {
  36. (void)object_id;
  37. switch (code) {
  38. case osRtxErrorStackOverflow:
  39. // Stack overflow detected for thread (thread_id=object_id)
  40. break;
  41. case osRtxErrorISRQueueOverflow:
  42. // ISR Queue overflow detected when inserting object (object_id)
  43. break;
  44. case osRtxErrorTimerQueueOverflow:
  45. // User Timer Callback Queue overflow detected for timer (timer_id=object_id)
  46. break;
  47. case osRtxErrorClibSpace:
  48. // Standard C/C++ library libspace not available: increase OS_THREAD_LIBSPACE_NUM
  49. break;
  50. case osRtxErrorClibMutex:
  51. // Standard C/C++ library mutex initialization failed
  52. break;
  53. case osRtxErrorSVC:
  54. // Invalid SVC function called (function=object_id)
  55. break;
  56. default:
  57. // Reserved
  58. break;
  59. }
  60. for (;;) {}
  61. //return 0U;
  62. }