AM2632: Can't enter debug session successfully with multi-core project.

Part Number: AM2632
Other Parts Discussed in Thread: SYSCONFIG,

We using R5-0 and R5-2 two cores in our project. mbc_vipro_dlp_bt runs in R5-2 core, but it can't enter debug session successfully. You can see below picture for more details. Could you give us some advices. Thank you 

debug.png

  • Hi Wei,

    1. Can you please help with the boot-mode the device is set in. If using gel scripts to initialize the memory, check the gel scripts once to see if they initialize the part of memory you are writing into (0x70172b00). incase the gel script has not initialized this bank of memory, the write can fail.

    2. In the application, if you use sysconfig (or use a direct linker), is the memory region size configured to be long enough? Basically does the linker know that the OCRAM length is till 0x701F FFFF. 

    If using example.sysconfig, check if the memory configurator and linker settings have a region defined for OCRAM that is big enough to accomodate this. If using linker.cmd, check the same directly in the cmd file.

    Regards,
    Shaunak

  • Hey Wei,

    The write failure at address 0x70172B00 points to the R5-2 core's program being loaded into OCRAM Bank 2 (0x70100000–0x7017FFFF), and either that memory bank isn't initialized or the linker region isn't sized to cover it. Here's how to resolve this:


    1. Verify OCRAM Bank Initialization (GEL Scripts)

    The AM2632 OCRAM is divided into four 512 KB banks 1:

    Bank Address Range
    MSS_L2_0 0x70000000 – 0x7007FFFF
    MSS_L2_1 0x70080000 – 0x700FFFFF
    MSS_L2_2 0x70100000 – 0x7017FFFF
    MSS_L2_3 0x70180000 – 0x701FFFFF

    Your failing address (0x70172B00) falls in Bank 2. Each bank must be explicitly initialized via the L2_MEM_INIT register (L2_MEM_INIT_PARTITION0–3 bit fields) before use, because OCRAM is ECC-protected and uninitialized memory will cause write failures 2.

    Action: Open the GEL file loaded for your target configuration (found at {CCS_install_path}/ccs_base/emulation/gel/AM263x/) and confirm it initializes all four OCRAM partitions — not just banks 0 and 1. During normal boot, ROM initializes banks 0–1 and the SBL initializes banks 2–3, but GEL scripts during CCS debug must handle this themselves 3.

    2. Check Linker / SysConfig OCRAM Region Size

    If using SysConfig's Memory Configurator, open your .syscfg file and check the OCRAM region definition. A typical configuration looks like 4:

    • Start Address: 0x70040000 (after SBL reserved region of 0x40000)
    • Size: 0x100000 (1 MB)
    • End Address: 0x7013FFFF

    If your R5-2 project's code/data extends to 0x70172B00, the OCRAM region must reach at least 0x70180000. You need to increase the region size — for example, set it to 0x1C0000 (starting from 0x70040000) to cover through Bank 3 5.

    If using a manual linker.cmd, verify the OCRAM MEMORY entry:

    OCRAM : origin = 0x70040000, length = 0x1C0000
    

    Important: If "Automate MPU Setting" is enabled in SysConfig, the region size must be a power of 2 and the start address must be aligned to that size 5. Also ensure the MPU region grants R/W/X access to the full OCRAM range used by R5-2.

    Can you share the OCRAM region definition from your SysConfig .syscfg file (or linker.cmd) for the R5-2 project, and confirm which boot mode (NOBOOT/QSPI/UART) the device is set to?


    1. AM2632 BIST on different MCU banks
    2. AM263x TRM — L2 Memory Initialization
    3. AM2632 No-Init RAM Discussion
    4. AM2632 EDMA/QSPI SysConfig Example
    5. AM263x Memory Configurator Guide
    6. AM263x CCS Launch Guide
    7. AM2632 Target Configuration Guide
    Best Regards,
    Zackary Fleenor