dbsct.c 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /***********************************************************************************************************************
  2. * DISCLAIMER
  3. * This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No
  4. * other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
  5. * applicable laws, including copyright laws.
  6. * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
  7. * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY,
  8. * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM
  9. * EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES
  10. * SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS
  11. * SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  12. * Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of
  13. * this software. By using this software, you agree to the additional terms and conditions found by accessing the
  14. * following link:
  15. * http://www.renesas.com/disclaimer
  16. *
  17. * Copyright (C) 2013 Renesas Electronics Corporation. All rights reserved.
  18. ***********************************************************************************************************************/
  19. /***********************************************************************************************************************
  20. * File Name : dbsct.c
  21. * Device(s) : RX
  22. * Description : Defines the structure of the ROM and RAM areas.
  23. ***********************************************************************************************************************/
  24. /***********************************************************************************************************************
  25. * History : DD.MM.YYYY Version Description
  26. * : 26.10.2011 1.00 First Release
  27. * : 26.11.2013 1.01 Replaced use of <stdint.h> with platform.h to handle when <stdint.h> is not available.
  28. * : 15.05.2017 1.01 Deleted unnecessary comments.
  29. * :(15.05.2017 2.00 Deleted unnecessary comments.)
  30. * Added the bsp startup module disable function.
  31. * :(01.11.2017 2.00 Added the bsp startup module disable function.)
  32. * : xx.xx.xxxx 2.01 Added support for GNUC and ICCRX.
  33. ***********************************************************************************************************************/
  34. /***********************************************************************************************************************
  35. Includes <System Includes> , "Project Includes"
  36. ***********************************************************************************************************************/
  37. #if defined(__CCRX__)
  38. /* BSP configuration. */
  39. #include "platform.h"
  40. /* When using the user startup program, disable the following code. */
  41. #if (BSP_CFG_STARTUP_DISABLE == 0)
  42. /* Preprocessor directive */
  43. #pragma unpack
  44. /* Section start */
  45. #pragma section C C$DSEC
  46. /* MCU ROM and RAM structure definition */
  47. extern const struct {
  48. uint8_t *rom_s; /* Start address of the initialized data section in ROM */
  49. uint8_t *rom_e; /* End address of the initialized data section in ROM */
  50. uint8_t *ram_s; /* Start address of the initialized data section in RAM */
  51. } _DTBL[] = {
  52. { __sectop("D"), __secend("D"), __sectop("R") },
  53. { __sectop("D_2"), __secend("D_2"), __sectop("R_2") },
  54. { __sectop("D_1"), __secend("D_1"), __sectop("R_1") }
  55. };
  56. /* Section start */
  57. #pragma section C C$BSEC
  58. /* MCU ROM and RAM structure definition */
  59. extern const struct {
  60. uint8_t *b_s; /* Start address of non-initialized data section */
  61. uint8_t *b_e; /* End address of non-initialized data section */
  62. } _BTBL[] = {
  63. { __sectop("B"), __secend("B") },
  64. { __sectop("B_2"), __secend("B_2") },
  65. { __sectop("B_1"), __secend("B_1") }
  66. };
  67. /* Section start */
  68. #pragma section
  69. /* CTBL prevents excessive output of L1100 messages when linking.
  70. Even if CTBL is deleted, the operation of the program does not change. */
  71. uint8_t * const _CTBL[] = {
  72. __sectop("C_1"), __sectop("C_2"), __sectop("C"),
  73. __sectop("W_1"), __sectop("W_2"), __sectop("W")
  74. };
  75. /* Preprocessor directive */
  76. #pragma packoption
  77. /* This is to ensure compatibility with new L section in version 1.1 and up of the RXC compiler. Do not remove! */
  78. #pragma section C L
  79. const unsigned long deadSpace = 0xDEADDEAD;
  80. #pragma section
  81. #endif /* BSP_CFG_STARTUP_DISABLE == 0 */
  82. #endif /* defined(__CCRX__) */