This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-AM243: How to create multicore apps and flash to device?

Part Number: LP-AM243
Other Parts Discussed in Thread: UNIFLASH

Tool/software:

Is there a guide on how to create multicore apps?
I want to create an app that also uses the PRU.

Right now I just create two separate projects in CCS.
Then I build them individually, and load the built binaries through CCS to each core and run.

But I don't know how to build them so the uart_uniflash.py application flashes them to the right offsets or whatever...

*I have followed this guide and built a single-core app that works fine. But I don't know how to add PRU...
https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/09_02_00_50/exports/docs/api_guide_am243x/GETTING_STARTED_FLASH.html 

  • Hello Keito,

    I see you are working on AM243-LP.

    On that note, if you look through the MCU PLUS SDK for AM243x, under the directory C:\ti\mcu_plus_sdk_am243x_09_02_00_50\examples\empty\am243x-lp you will find system_freertos and system_nortos examples.

    If you import them onto CCS(Code Composer Studio) you would see that it takes into consideration a bunch of cores and you can develop your multicore application from this point onwards.

    Regards,

    Vaibhav

  • Hi Vaibhav,

    I think I almost have it, thanks! Just real quick:

    The system_freertos / system_nortos examples have one project loaded that just contains the "system.xml" file.
    This file is modified to link which project should be built for which core, right?

    Then, all I need to do to include program for the PRU core is to add a PRU project via the "system.xml" file, then copy over my assembly files / etc and build.

    This will give me a binary in the same project folder that holds the "system.xml" file, and this is what I use when flashing?
    So in the uart_uniflash.py ospi configuration file, I set the appimage files to the files in that directly, and the flash offset/etc are all the same (i.e. 0x80000) right?

  • Hello Keito,

    Your understanding is correct.

    So lets say you generate a single multicore appimage of r50_0 and r50_1, then you would just need to replace this appimage in the following file: default_sbl_ospi.cfg. So line 27 of the following file should be fine.

    #-----------------------------------------------------------------------------#
    #                                                                             #
    #      DEFAULT CONFIGURATION FILE TO BE USED WITH THE FLASHWRITER SCRIPT      #
    #                                                                             #
    #-----------------------------------------------------------------------------#
    #
    # By default this config file,
    # - points to pre-built flash writer, bootloader for this LP
    # - The application image points to relative path of the ipc echo application image for this LP
    #   - Make sure this application is built before running this script
    # - You can customized this config file to point to your own bootloader and/or application images
    # - You can use --operation=flashverify if you just want to verify the flash contents and not flash the file.
    #
    
    # First point to sbl_uart_uniflash binary, which function's as a server to flash one or more files
    --flash-writer=sbl_prebuilt/am243x-lp/sbl_uart_uniflash.release.hs_fs.tiimage
    
    # Now send one or more files to flash or flashverify as needed. The order of sending files does not matter
    
    # 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/am243x-lp/sbl_ospi.release.hs_fs.tiimage --operation=flash --flash-offset=0x0
    
    # When sending application image, make sure to flash at offset 0x80000 (default) or to whatever offset your bootloader is configured for
    --file=../../examples/drivers/ipc/ipc_notify_echo/am243x-lp/system_freertos_nortos/ipc_notify_echo_system.release.appimage.hs_fs --operation=flash --flash-offset=0x80000
    
    # send the XIP image for this application, no need to specify flash offset since flash offset is specified within the image itself
    --file=../../examples/drivers/ipc/ipc_notify_echo/am243x-lp/system_freertos_nortos/ipc_notify_echo_system.release.appimage_xip --operation=flash-xip
    
    

    Regards,

    Vaibhav