traveo2_4m.cfg 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #
  2. # Copyright (C) <2019-2024>
  3. # <Cypress Semiconductor Corporation (an Infineon company)>
  4. #
  5. # Configuration script for Cypress TRAVEO™II B-H family of microcontrollers.
  6. # TRAVEO™II B-H is a triple-core device with CM0+ and 2xCM7 cores. All cores share
  7. # the same Flash/RAM/MMIO address space.
  8. #
  9. source [find target/infineon/common/common_ifx.cfg]
  10. namespace import ifx::*
  11. # The following four lines can be used to override Flash Geometry of the target device
  12. # In this case configuration scripts will not perform any auto-detection and will use
  13. # predefined values.
  14. # If all these variables are set to zero, configuration scripts will attempt to detect
  15. # the type of target device by reading SiliconID from SFlash and matching it with MPN
  16. # database, see cympn.cfg file.
  17. set MAIN_LARGE_SECTOR_NUM 126
  18. set MAIN_SMALL_SECTOR_NUM 16
  19. set WORK_LARGE_SECTOR_NUM 96
  20. set WORK_SMALL_SECTOR_NUM 512
  21. # Reset configuration - use hardware XRES pin
  22. # If this line is commented-out OpenOCD will use SYSRESETREQ to reset the CM0+ core and
  23. # all peripherals. This will also reset CM4/CM7 cores.
  24. # reset_config srst_only srst_pulls_trst
  25. # Defines the name of the Target and allows to override it from the command line
  26. set_or_global CHIPNAME traveo2_4m
  27. set TARGET_VARIANT TVIIBH4M
  28. echo "** Supported Flash Loaders: ***********************"
  29. echo "** SMIF0_LOADER: TV2_8M_SI_B0_HyperFlash.elf"
  30. echo "** TV2_8M_SI_B0_DualQuadSPI.elf"
  31. echo "***************************************************"
  32. # External Memory configuration
  33. # The following variables can be set to '1' in the command line to enable corresponding
  34. # external memory banks:
  35. # set ENABLE_HYPERFLASH 1
  36. # set ENABLE_DUALQUADSPI 1
  37. set_or_global ENABLE_HYPERFLASH 0
  38. set_or_global ENABLE_DUALQUADSPI 0
  39. # Default flash loaders, can be overriden from the command line
  40. set_or_global HYPERFLASH_LOADER TV2_8M_SI_B0_HyperFlash.elf
  41. set_or_global DUALQUADSPI_LOADER TV2_8M_SI_B0_DualQuadSPI.elf
  42. set_or_global HYPERRAM_LOADER TV2_8M_SI_B0_HyperRAM.elf
  43. set XIP_BASE 0x64000000
  44. # Include common functionality script
  45. source [find target/infineon/cat1c/base_cytxxx.cfg]
  46. # Procedure to enable external HyperRAM
  47. # Script loads initialization code to target RAM and executes it
  48. # Initialization code is responsible for enabling external RAM and
  49. # mapping it to the CPU address space
  50. proc enable_hyperram { {xip_base 0x64000000} } {
  51. global HYPERRAM_LOADER
  52. catch {
  53. load_image ../flm/cypress/traveo2/${HYPERRAM_LOADER} 0x28000800
  54. reg pc 0x28000800
  55. reg sp 0x28010000
  56. reg r0 $xip_base
  57. reg r1 0
  58. reg r2 3
  59. reg r9 0x28002800
  60. resume 0x28000800
  61. wait_halt
  62. mrw $xip_base
  63. echo "** HyperRAM mapped to address [format 0x%08X $xip_base]"
  64. }
  65. }