Part Number: AM2612
Other Parts Discussed in Thread: LP-AM261, SYSCONFIG, UNIFLASH,
Hello E2E Experts,
I am trying the LP-AM261, trying to evaluate the performance in different scenarios of code and data placement.
I am using SysConfig 1.25.0 and SDK for AM261x 11.0.0.29.
I started with the example \examples\drivers\gpio\gpio_led_blink\am261x-lp, where I was able to build, load and execute the example (code executed from OCRAM) successfully. At that time, I didn't know much of the boot process, so I don't exactly know exactly what were the BOOT pins nor the SBL loaded in the chip. Though I can guarantee the BOOT pins were not in UART mode, nor in xSPI mode.
Then I stripped the code associated to LED blinking and added my code used for processors performance evaluation. I was able to build, load and execute successfully directly from CCS, with code executed from OCRAM.
The next goal for me is to execute this code from external OSPI flash. I followed the steps explained in https://dev.ti.com/tirex/explore/content/mcu_plus_sdk_am261x_10_00_01_10/docs/api_guide_am261x/BOOTFLOW_XIP.html and I was able to build the SW.
Trying to load the application from CCS did not work, but I'm pretty sure at some point I've seen logs in the Debug Output window with successfull flash programming, but on the page mentionned above, it is said you need a tool to flash the OSPI flash, so I used the uart_uniflash.py tool from \tools\boot in the SDK, using this .cfg file:
# First point to sbl_uart_uniflash binary, which function's as a server to flash one or more files
--flash-writer=sbl_prebuilt/am261x-lp/sbl_uart_uniflash.release.tiimage
# Program the OSPI PHY tuning attack vector
--operation=flash-phy-tuning-data
# When sending bootloader make sure to flash at offset 0x0. ROM expects bootloader at offset 0x0
--file=sbl_prebuilt/am261x-lp/sbl_ospi_multicore_elf.release.tiimage --operation=flash --flash-offset=0x0
# When sending application image, make sure to flash at offset 0x81000 (default) or to whatever offset your bootloader is configured for
--file=../../../../../workspace_ccstheia/gpio_led_blink_am261x-lp_r5fss0-0_nortos_ti-arm-clang/Release/gpio_led_blink_am261x-lp_r5fss0-0_nortos_ti-arm-clang.mcelf --operation=flash-sector-write --flash-offset=0x81000
# send the XIP image for this application, no need to specify flash offset since flash offset is specified within the image itself
--file=../../../../../workspace_ccstheia/gpio_led_blink_am261x-lp_r5fss0-0_nortos_ti-arm-clang/Release/gpio_led_blink_am261x-lp_r5fss0-0_nortos_ti-arm-clang.mcelf_xip --operation=flash-mcelf-xip
The flash programming succeeds and when I set BOOT pins to xSPI mode, I have the console displaying that all is OK:

According to the page above, I figured to add the "loadSymbolsOnly" option in the launch.json file in order for the debugger not to try to flash when debug starts (in that case I was not able to only connect to the target). Once connected, I could get some performance measurement variables updated so I guess the code of my application was running OK. I was also able to change cache settings to evaluate performance with or without instruction and/or data cache.
Now, here are the issues I need help with (when running from flash and BOOT pins set to xSPI mode):
- I don't understand why no breakpoint works.
- I don't understand what the debugger does when I click the restart button, but apparently, it does nothing.
- When I want to change cache settings (disable it, changing regions atributes to non-cacheable, forcing normal as write-through, etc...) through .syscfg file, or by defining my own ti_dpl_config.c file, I always find the core stuck in an abort or prefetch or undefined instruction exception. When I changed the parameter when running from OCRAM, I had no issue with this.
- Is there a combination of BOOT mode pins and SBL that could make CCS able to program the flash and debug an application without the need of an other tool?
Any help would be appreciated. Thanks











