Post Go back to editing

ADSP-SC58x/2158x Simple Led- Example code for Boot Testing

Attached folder comprises of a simple LED blink code for all the 3 cores in ADSP-SC58x processor. Apart from that it also has a loader stream generated for SPI master boot mode for various combination.

These loader streams can be programmed into the flash and SPI master boot can be tested.
  • Hi Harshit,

    Thanks for this boot code. I also want to generate this ldr images for my sample application, and want to run the application as standalone. Can you please suggest me abt how to do it? Going through some of the documents, but not getting the clear picture.

    Thanks in advance, waiting for your replay.


  • Hi Ksam,

    I would request you to kindly go through the Application Note EE-384 which talks about loader stream generation in detail.

    The link for the Application Note is given below:

    Please let me know if you still face an issue in booting your application.



  • Hi,

    I used the code on ADSP-SC58x_EZ-KIT and it seemed to be flashed on the DSP and running.

    The only thing I could not get it verify that it is working properly or not is that I could not get this development board LEDs (LED10 or 11 or 12) to blink using this code.

    The board manual says these LEDs are for PE_13, PE_14 and PE_15 but I do not find a reference for these pins to modify the code you attached. I want to know how I can modify the code you attached in order to get these LEDs on the EVAL-SC589-EZLITE kit blinking?


  • Hi Hassan,

    These are configured in the PORT registers as shown below:

    *pREG_PORTE_FER = 0;  // Using this as GPIO pin

    *pREG_PORTE_DIR_SET  = 0xE0EE;  //Making PE13,14,15 as output pins

    *pREG_PORTE_DATA_TGL  = 0x2002; // toggling these pins which will be reflected as LED blink.

    In the attached zip folder, you can also see sample codes which you can run via emulator to see the LED toggling on single stepping these instructions in a code.



  • Hi Harshit,

    I've used your code on sc584-ezbrd LPC (to test if I can program SHARC code and see if it works).

    I've flashed the SPI-NOR with Boot_Code/SPI_Master_Boot_Streams/SPIMASTER_Single_ARM_SHARC1.ldr 

    After reset I do see two blinking LEDs...... LED10 and LED12.

    This is good :-)

    However, I would like to come back to my u-boot/Linux setup (I've followed ADI's CCES Linux manual).

    I've reset the board with the push button, and before LEDs started blink I typed:

    (gdb) target remote :3333

    (gdb) load /opt/analog/cces-linux-add-in/1.1.0/uboot-sc58x-1.1.0/bin/init-sc58x-ezkit-lpc.elf

    (gdb) c
    Program received signal SIGINT, Interrupt.
    0x00005470 in ?? ()

    (gdb) load /opt/analog/cces-linux-add-in/1.1.0/uboot-sc58x-1.1.0/bin/u-boot-sc58x-ezkit-lpc

    Loading section .text, size 0x2af54 lma 0x89200000
    Loading section .rodata, size 0xabb9 lma 0x8922af54
    Loading section .hash, size 0x2c lma 0x89235b10
    Loading section .data, size 0x216a lma 0x89235b3c
    Loading section .got.plt, size 0xc lma 0x89237ca8
    Loading section .u_boot_list, size 0x840 lma 0x89237cb4
    Loading section .rel.dyn, size 0x6ce8 lma 0x892384f4
    Loading section .dynsym, size 0x60 lma 0x8923f1dc
    Loading section .dynstr, size 0x2a lma 0x8923f23c
    Loading section .dynamic, size 0x80 lma 0x8923f268
    Loading section .interp, size 0x11 lma 0x8923f2e8
    Start address 0x89200000, load size 258802
    Transfer rate: 30 KB/sec, 10783 bytes/write.
    (gdb) c

    Unfortunately, I do not see any output on the serial console (with u-boot prompt).  

    I can only see the blinking LEDs when I reset the board.

    Also OpenOCD do not show any errors:

    target halted in Thumb state due to debug-request, current mode: Supervisor
    cpsr: 0x400001f3 pc: 0x00001840, semihosting
    MMU: disabled, D-Cache: disabled, I-Cache: disabled
    semihosting is enabled

    Could you help me with debricking the devel board?

    Thanks in advance,


  • Hmm..... the problem has been solved....

    It turned out that the example *-ldr file puts the Core0 (ARM-Cortex A5)
    into thumb state.

    How to debrick:

    Start OpenOCD (the one from ADI's Linux CCES AddIN).

    Open GDB:

    target remote :3333

    (issue this command when you release the reset push button) - so the SW from SPI-NOR won't start.

    (gdb) set $cpsr = 0x1D3
    (gdb) load /opt/analog/cces-linux-add-in/1.1.0/uboot-sc58x-1.1.0/bin/init-sc58x-ezkit-lpc.elf


    (gdb) load /opt/analog/cces-linux-add-in/1.1.0/uboot-sc58x-1.1.0/bin/u-boot-sc58x-ezkit-lpc


    And you should see the output from serial console :-)

    After that one can restore the original u-boot/Linux.

    Sorry for the noise :-)

    Best regards,


  • This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

    Thank you,
    EZ Admin