Post Go back to editing

Init Code for SHARC boot through SPI Master mode

Hi,

Iam booting my processor using Realterm software.

In that after loading the ldr code through UART slave mode, changing the switch to SPI master boot mode has no effect..

It is told that while generating the ldr file, initialization file to be added in the loader settings.

Is there any init code to be added while compiling my ldr file..

Please provide me the knowledge to do the same.

regards,

Vignesh.

  • Hi,

    External memory needs to be configured appropriately before applications can be loaded. When the application boots, this is done through initcodes;

    To run from flash, the corresponding initcode file ought to be selected in the initialization section while creating the loader file.

    For CCES:

    You can select an appropriate "Initialization file" from the following location:
    <installation path>:\Analog Devices\CrossCore Embedded Studio <version>\SHARC\ldr

    Please note that the above init code is specific to our evaluation boards. You may have to modify the external memory initialization to suit your configuration if you are using custom board.

    Please refer the below FAQ to program flash into target board.
    FAQ: How do I program flash on my target board using CrossCore Embedded Studio?
    ez.analog.com/.../faq-how-do-i-program-flash-on-my-target-board-using-crosscore-embedded-studio

    You can also refer the below link, which might be helpful to you:
    FAQ: How to debug a target board which boots from Flash using CrossCore Embedded Studio
    ez.analog.com/.../faq-how-to-debug-a-target-board-which-boots-from-flash-using-crosscore-embedded-studio

    Also, please refer the below EE-note to Modify the default Preload and Initialization Code for Customized CGU/DMC Settings which might be helpful to you:
    www.analog.com/.../ee387.pdf

    You can find the associated code example in the below link:
    www.analog.com/.../ee387.zip

    For VDSP:

    Please ensure to select the Initialization file while creating loader file in "Project options > Load > Initialization File"

    Examples are provided in the below path:
    "<Installation path>\Analog Devices\VisualDSP 5.1.2\<processor>\ldr", which configure the SDRAM Control Registers to appropriate values for the EZ-KIT Lites, and should allow you to get the example to boot from Flash.

    Please refer the below FAQ's to load program to flash on EZ-KIT

    FAQ: How to load and run a program from flash on an EZ-KIT in VisualDSP++?
    ez.analog.com/.../faq-how-to-load-and-run-a-program-from-flash-on-an-ez-kit-in-visualdsp

    FAQ: How to debug a target board which boots from Flash?
    ez.analog.com/.../faq-how-to-debug-a-target-board-which-boots-from-flash

    Regards,
    Santhakumari.K

  • Dear Santha,

    Thanks for your response,

    The link www.analog.com/.../ee387.zip

    contains example codes for initialization of DMC and CGU modules.

    Where can i use this functions to generate a init dxe.

    regards,

    Vignesh.

  • Hi,

    As you might known, EE-387 application note discusses hardware and software guidelines for interfacing DDR3/DDR2/LPDDR devices with ADSP-SC5xx/ADSP-215xx processors and please note that, All code examples have been written and tested with CrossCore Embedded Studio.

    Please refer the readme file available for examples to know more details.

    Best Regards,
    Santhakumari.K

  • Hi,

    Whether i need to generate init dxe along with boot code or with my application code,

    regards,

    Vignesh.

  • Hi Vignesh,

    You can make a local copy of examples of EE-note or 2156x_Init project available in below CCES installation path and modify configuration as per your requirement and build project separately to generate init.dxe that suitable for your board.
    [installation]\Analog Devices\CrossCore Embedded Studio <version>\SHARC\ldr\init_code\2156x_Init

    After generating init code dxe successfully, you can include an init code dxe into the *.ldr file built for your application via below project properties.
    Project properties > C/C++ Build > settings > Tool settings tab> CrossCore sharc loader > Initialization. Please refer the attached screenshot for reference.

    Please follow the below steps to include/browse an init code dxe into loader file of your application.

    1.Assuming your executable project is already loaded into CCES,select the Project > Properties > C/C++ Build > Settings > Build Artifact tab.
    There you will see "Artifact Type". From the drop down menu select "Loader File".
    2.Click on the "Tool Settings" tab and select "CrossCore sharc Loader" then "General".
    Select the boot mode, boot format as needed and specify the SPIMCODE value for SPI master.
    3.Click on the “Initialization”. you can browse your newly generated or browse appropriate "Initialization file" (init.dxe) and build project.

    Regards,
    Santhakumari.K