ADSP-SC584
Production
The ADSP-SC584 processor is part of the new, high-performance, power-efficient, real-time series that delivers greater than 24 giga-floating-point operations...
Datasheet
ADSP-SC584 on Analog.com
Our end goal is to have U-Boot on our boards and that in-turn will load our non-Linux images on the rest of the cores.
To start with, I'm experimenting with the EZ-Board. My setup is this:
I'm using ADI's U-Boot, lnxdsp-u-boot and more specifically 09225f2bf4e9466c8bdd055af96370912f75c9b5 commit id.
I've built U-Boot for the board in a Ubuntu 20.04 box (WSL2):
$ make sc584-ezkit_defconfig $ CROSS_COMPILE=/opt/analog/cces/2.9.4/ARM/arm-none-eabi/bin/arm-none-eabi- make
I then transferred the generated files to my Windows so that I can proceed with programming U-Boot on SPI flash.
I've followed the "Installing U-boot" guide, and I was successful in "Flash U-Boot for the First Time" section. I managed to get the U-Boot run on the board.
However, we really want to make the procedure shorter and program Das U-Boot directly on Flash via OpenOCD or any other command line tool.
I've tried with OpenOCD but I failed:
$ /c/Analog\ Devices/CrossCore\ Embedded\ Studio\ 2.9.4/ARM/openocd/bin/openocd.exe -s /c/Analog\ Devices/CrossCore\ Embedded\ Studio\ 2.9.4/ARM/openocd/share/openocd/scripts/ -f interface/ice1000.cfg -f board/adspsc584_ezbrd.cfg -c "program ../u-boot-builds/u-boot-sc584-ezkit verify reset exit"
Open On-Chip Debugger (Analog Devices CCES 2.9.0 OpenOCD 0.9.0-ga44a178) 0.9.0 Licensed under GNU GPL v2 Report bugs to <processor.tools.support@analog.com> adapter speed: 1000 kHz Info : transports supported by the debug adapter: "jtag", "swd" Info : auto-select transport "jtag" trst_only separate trst_push_pull adspsc58x_init Info : ICE-1000 firmware version is 1.0.2 Info : clock speed 1000 kHz Info : JTAG tap: adspsc584.adjc tap/device found: 0x228080cb (mfg: 0x065, part: 0x2808, ver: 0x2) Info : JTAG tap: adspsc584.dap enabled Info : adspsc584.dap: hardware has 3 breakpoints, 2 watchpoints Info : adspsc584.dap: but you can only set 1 watchpoint Info : ttbcr 0ttbr0 0ttbr1 0 Info : adspsc584.dap rev 1, partnum c05, arch f, variant 0, implementor 41 Info : number of cache level 1 Info : adspsc584.dap cluster 0 core 0 mono core Info : JTAG tap: adspsc584.adjc tap/device found: 0x228080cb (mfg: 0x065, part: 0x2808, ver: 0x2) Info : JTAG tap: adspsc584.dap enabled Info : adspsc584.dap: hardware has 3 breakpoints, 2 watchpoints Info : adspsc584.dap: but you can only set 1 watchpoint Boot Mode 1 start system reset ... system reset asserted background polling: off TAP: adspsc584.dap (enabled) target state: running target state: halted target halted in Thumb state due to debug-request, current mode: Supervisor cpsr: 0x800001f3 pc: 0x00004884 MMU: disabled, D-Cache: disabled, I-Cache: disabled system reset done REG_RCU0_STAT 0x00002128 HWRST : 0 (0x00) SSRST : 0 (0x00) SWRST : 1 (0x01) SWRST RSTOUT : 1 (0x01) RSTOUT BMODE : 1 (0x01) TESTMODE : 0 (0x00) STESTMODE : 1 (0x01) STESTMODE OTPLOCK : 0 (0x00) STESTROUTINE : 0 (0x00) ADDRERR : 0 (0x00) LWERR : 0 (0x00) RSTOUTERR : 0 (0x00) REG_RCU0_MSG 0x00460600 BOOTERROR : 0 (0x000) C0IDLE : 0 (0x00) C1IDLE : 1 (0x01) Core 1 is IDLE C2IDLE : 1 (0x01) Core 2 is IDLE C0TASK : 0 (0x00) C1TASK : 0 (0x00) C2TASK : 0 (0x00) C0L1INIT : 0 (0x00) C1L1INIT : 1 (0x01) Core 1 L1 initialized C2L1INIT : 1 (0x01) Core 2 L1 initialized L2INIT : 1 (0x01) L2 initialized HALTONAPP : 0 (0x00) HALTONINIT : 0 (0x00) HALTONCALL : 0 (0x00) HALTONERR : 0 (0x00) CALLAPP : 0 (0x00) CALLINIT : 0 (0x00) CALLBACK : 0 (0x00) CALLERR : 0 (0x00) target state: halted target halted in Thumb state due to debug-request, current mode: Supervisor cpsr: 0x800001f3 pc: 0x00004884 MMU: disabled, D-Cache: disabled, I-Cache: disabled ** Programming Started ** ** Programming Failed ** shutdown command invoked embedded:startup.tcl:490: Error: in procedure 'flash' called at file "embedded:startup.tcl", line 490
I've tried with CLDP but I failed again:
$ /c/Analog\ Devices/CrossCore\ Embedded\ Studio\ 2.9.4/cldp -proc ADSP-SC584 -core 0 -emu 1000 -driver /c/Analog\ Devices/ADSP-SC5xx_EZ-KIT_Lite-Rel2.0.2/ADSP-SC5xx_EZ-KIT/Examples/Device_Programmer/sc584/sharc/sc584_w25q128fv_dpia_Core0/w25q128fv_dpia_SC584_SHARC_Core0 -cmd prog -erase affected -format bin -file ../u-boot-builds/u-boot-sc584-ezkit.ldr
Target Emulation Debug Target Platform ADSP-SC584 via ICE-1000 Processor ADSP-SC584 Core 0 Driver C:/Analog Devices/ADSP-SC5xx_EZ-KIT_Lite-Rel2.0.2/ADSP-SC5xx_EZ-KIT/Examples/Device_Programmer/sc584/sharc/sc584_w25q128fv_dpia_Core0/w25q128fv_dpia_SC584_SHARC_Core0 Error: [TpsdkServer] Failed to load file: C:/Analog Devices/ADSP-SC5xx_EZ-KIT_Lite-Rel2.0.2/ADSP-SC5xx_EZ-KIT/Examples/Device_Programmer/sc584/sharc/sc584_w25q128fv_dpia_Core0/w25q128fv_dpia_SC584_SHARC_Core0 [Error: Failed to connect to target., Code=0x80047344]
Do you have any ideas on why I cannot program U-Boot directly on SPI Flash with any of the above tools?
Hi
The openocd isn't supporting this functionality but its on the list.
For cpld command can you try core 1 instead core 0
I've tried your suggestion - I used `-core 1` instead of `-core 0`, along with the associated drivers from Core 1:

I've got this failure this time:
I've tried your suggestion - I used `-core 1` instead of `-core 0`, along with the associated drivers from Core 1:

I've got this failure this time:
The command seems to be correct. Can you try to load instead of the u-boot CCES studio generated example project?
I compiled the POST example from ADSP-SC5xx_EZ-KIT_LITE-Rel2.0.2. I create a loader file with the prebuilt init code given for POST.
This time it loaded successfully, using Core 1:
Hello,
I can't tell for sure but this might be an issue where the booting application is interfering with flashing. When using the cldp, we only interact with the 1 SHARC core so the other cores will sometimes cause problems that prohibit programming flash. I believe this was addressed in a later release if this is indeed the issue. Can you try changing the boot mode switch to position 0, cycling power to the board, and then use the cldp to program the uboot image?
Regards,
Chad
Thanks for the hint.
I switched boot mode to position 0, power-cycled the board and re-ran the command to load u-boot .ldr:

A little bit of progress.
After, I switched boot mode to position 1, power-cycled and got this output in the serial port:

But it hangs there.
Hi does, same image works if you do the "run spi_update" from u-boot ?
I started a GDB session and loaded u-boot-sc584-ezkit. After u-boot loaded, I tried `run spi_update` but I see that this command is not defined:

Those are the files that I have after building U-Boot:

I'm using u-boot-sc584-ezkit.ldr with cldp and u-boot-sc584-ezkit with GDB.
Sorry other way around "run update_spi" not "run spi_update"
No worries,
Here's what I get:

Later on:

As you can see, after Updating reaches 100%, the loop doesn't exit, it re-tries again and again.
I think it is erasing the flash.
Do the network cable is connected? And tftp server is up and running?
Have you followed this quick start guide before? https://github.com/analogdevicesinc/lnxdsp-adi-meta/wiki/Getting-Started-with-ADSP%E2%80%90SC584-(Linux-for-ADSP%E2%80%90SC5xx-Processors-3.1.1) here will be the steps to flash u-boot to SPI
By running update_spi I want to verify that u-boot image that is used can boot board and its ok.
I didn't have a TFTP server up and running for those tests.
One more issue I was facing was the setting of proper network connection between the eval board and my PC. ping wasn't working.
Give me a while to try the steps of the guide you've shared with me - I didn't know about it.