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:
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.
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.
So, I set up TFTP in a laptop and tried the same command. According to the output I got and the docs you've shared with me, I need stage1-boot.ldr and stage2-boot.ldr.
My build of U-Boot didn't generate those. How do I generate them? Can I change the update_spi command in a way to choose different files?
Hi do you compile u-boot outside of yocto? Those files should be generated by one of the yocto steps and generated by ldr utility.
Those are u-boot-spl and u-boot-proper converted to LDR file format.
On your previous screenshots I can see ldr files are generated you can use those, and rename those
u-boot-spl-sc594-ezkit.ldr is stage1.ldr
u-boot-sc594-ezkit.ldr is stage2.ldr
Hi Arturs,
Sorry, I missed the notifications.
I'm building U-Boot outside of yocto - I've cloned https://github.com/analogdevicesinc/lnxdsp-u-boot and I'm compiling this directly as our goal is to use U-Boot without Linux.
I'll retry at the end of the day.
Hi Arturs,
I have issues establishing a network connection between my PC and the EZBOARD. I've followed the instructions of the guide you've shared step by step, but pings do not reach either destination. I don't use DHCP on my PC so I have this configuration:
PC address: 169.254.99.90/16
EZBoard ipaddr: 169.254.99.95
EZBoard tftpserverip: 169.254.99.90
When I ping from EZBoard:
When I ping from my PC:
and I see red LED20 blinking everytime a ping is sent on the EZBoard.
Packets are flowing from my PC to EZBoard, but they aren't accepted.
I tried setting `gatewayip` to 169.254.99.80 and `netmask` to 255.255.0.0 on U-Boot but noting changed. Is that the correct way to set the IP settings for the network interface?
Here's my U-Boot environment:
Can you get some other machine with ethernet port and for testing purpose establish same connection between those and test ping? LED blinking suggests that the packets are sent.
I see your netmask is set to 255.255.0.0 default value usually is 255.255.255.0
As a reminder, I'm using u-boot version of: https://github.com/analogdevicesinc/lnxdsp-u-boot/commit/09225f2bf4e9466c8bdd055af96370912f75c9b5
and I've changed to an ADSP-SC573 EZKIT which has board revision of 1.9.
Also I'm following this guide: github.com/.../Getting-Started-with-ADSP‐SC573-(Linux-for-ADSP‐SC5xx-Processors-3.1.1)
I got a bit further:
stage1-boot.ldr and stage2-boot.ldr have the same size as they are identical.
Also, I see at the end of the transfers that 0 bytes are written and everything else is skipped.
I powered-off the device, disconnected the ICE-1000, switched to BOOT mode 1 and after power on all I got in the serial was a bootloop:
Then I tried everything from the start but with `run spi_boot` as instructed in a previous reply:
It's weird that after the first two boot images have been transferred successfully (pink ticks in the image), no bytes are written to the SPI (red crosses), but later one for the other two uninteresting images (pink crosses), I see that bytes are written in the flash (pink questionmarks).
I restarted the devices and all I got was again a boot loop:
Any ideas?
Cheers Ioannis
Hi so from logs I see stage1 and stage2 are the same size, stage1 should be <100kb in size.
What the content of your tftp server directory? Do all files that failed to download are in same directory as stage1.ldr and stage2.ldr files?