Post Go back to editing

Custom u-boot with SHARC firmware for SC589

Hi,

I've made many tests but i'm still stuck with a custom u-boot problem.

I create a custom u-boot (make menuconfig / make) in ~/sc58x/uboot folder

This create me a new u-boot and it works fine, I can load it from previous u-boot, store it to flash, and so on...

But

When I try to create a custom u-boot with SHARC firmware inside I experience a complete u-boot crash.

Here's what I've done:

   1. Create a loader with elfloader (under windows)

elfloader.exe -proc ADSP-SC589 -si-revision any -b spimaster -f binary -width 8 -bcode 1 -init init -core0=u-boot -core1=MCAPI_Msg_SC589_SHARC_Core1.dxe -NoFinalTag=u-boot -NoFinalTag=MCAPI_Msg_SC589_SHARC_Core1.dxe -o u-boot-mcapi.ldr

   2. Boot and stops boot of my SC589 by pressing a key

In u-boot, I set some parameters

set serverir myip

set ubootfile u-boot-mcapi.ldr

   3. Try an update

run update

The u-boot loads the code without any error.

But:

If I try to save current u-boot parameters (with command save)

Or if I reboot the board

The board crash (with no serial log).

The only way is to restore a default-uboot with

cldp -proc ADSP-SC589 -core 1 -emu 1000 -driver "C:\Analog Devices\ADSP-SC5xx_EZ-KIT_Lite-Rel2.0.1\ADSP-SC5xx_EZ-KIT\Examples\Device_Programmer\sc589\sharc\sc589_w25q128fv_dpia_Core1\sc589_w25q128fv_dpia_Core1.dxe" -cmd prog -erase affected -format bin -file u-boot-sc58x-ezkit-hpc.ldr

Do you have any advice ?

Is it a flash address error or integrity loss ?

Final goal is to have an u-boot containing :

   * original u-boot for ARM

   * SHARC core 1 firmware

   * SHARC core 2 firmware

I saw many post about embeddingboth SHARC firmware into u-boot, but don't find a simple procedure for this.

Any ideas will be welcome.

Regards

pierre

  • Hi pierre, we also have some issue in saving env in your usecase, the current workaround is to program the env statically in u-boot source code. will give update on this once we have progress on it.

  • Hi Aaron,

    Did you success in creation of a u-boot.ldr that contains u-boot + sharc code.

    I try many times, but still got an error (don't boot, no core1 firmware, and so on).

    Maybe something magic with elfloader.exe

    regards

    pierre

  • Hi pierre,

    I believe yes, just to double confirm if you have explicility start SHARC, before able to see it is running.

    command "icc enable 1" from u-boot is used to start SHARC, also may need to add "enable_sec=no" in the kernel boot commandline.

    Below is an example patch that we customerize the u-boot environment, it's verified to work when runing Linux on ARM and some bare-metal code on SHARC, by booting u-boot and SHARC together with romcode.

    diff --git a/include/configs/sc_adi_common.h b/include/configs/sc_adi_common.h
    index eecb86b..c769eb6 100644
    --- a/include/configs/sc_adi_common.h
    +++ b/include/configs/sc_adi_common.h
    @@ -93,7 +93,7 @@
     # if (CONFIG_SC_BOOT_MODE == SC_BOOT_UART)
     #  define CONFIG_BOOTDELAY -1
     # else
    -#  define CONFIG_BOOTDELAY 5
    +#  define CONFIG_BOOTDELAY 0
     # endif
     #endif
     
    @@ -103,8 +103,9 @@
     # define CONFIG_BOOTARGS_VIDEO ""
     #endif
     
    -#define CONFIG_BOOTCOMMAND "run ramboot"
    +#define CONFIG_BOOTCOMMAND "run sdboot"
     #define CONFIG_BOOTARGS_ROOT "/dev/mtdblock2 rw"
    +#define CONFIG_SD_BOOTARGS_ROOT "/dev/mmcblk0p1 rw rootwait"
     
     #define CONFIG_BOOTARGS \
      "root=" CONFIG_BOOTARGS_ROOT " " \
    @@ -112,9 +113,19 @@
      "clkin_hz=" __stringify(CONFIG_CLKIN_HZ) " " \
      CONFIG_BOOTARGS_VIDEO \
      "earlyprintk=serial,uart0,57600 " \
    + "enable_sec=no " \
      "console=ttySC" __stringify(CONFIG_UART_CONSOLE) "," \
        __stringify(CONFIG_BAUDRATE) " "\
       "mem=" CONFIG_LINUX_MEMSIZE
    +#define CONFIG_SD_BOOTARGS \
    +  "root=" CONFIG_SD_BOOTARGS_ROOT " " \
    +  "rootfstype=ext3 " \
    +  "clkin_hz=" __stringify(CONFIG_CLKIN_HZ) " " \
    +  "earlyprintk " \
    +  "enable_sec=no" \
    +  CONFIG_BOOTARGS_VIDEO \
    +  "console=ttySC" __stringify(CONFIG_UART_CONSOLE) "," \
    +   __stringify(CONFIG_BAUDRATE) " "\
     
     #if defined(CONFIG_CMD_NET)
     # define UBOOT_ENV_FILE "u-boot.ldr"
    @@ -158,6 +169,7 @@
      "dtbfile=" CONFIG_DTBNAME "\0" \
      "dtbaddr=" CONFIG_DTBLOADADDR "\0" \
      "ramargs=set bootargs " CONFIG_BOOTARGS "\0" \
    + "sdargs=set bootargs " CONFIG_SD_BOOTARGS "\0" \
      "ramboot=" \
       "tftp ${loadaddr} ${ramfile};" \
       "tftp ${dtbaddr} ${dtbfile};" \
    @@ -166,6 +178,15 @@
       "bootm ${loadaddr} - ${dtbaddr}" \
       "\0" \
      \
    + "sdboot=" \
    +  "ext2load mmc 0:1 0xc6000000 sc589-ezkit.dtb;" \
    +  "ext2load mmc 0:1 0xc2000000 uImage;" \
    +  "icc enable 1;" \
    +  "dhcp;" \
    +  "run addip;" \
    +  "bootm ${loadaddr} - ${dtbaddr}" \
    +  "\0" \
    + \
      "nfsfile=vmImage\0" \
      "nfsargs=set bootargs " \
       "root=/dev/nfs rw " \
    --

    Regards

    Aaron

  • Hi,

    From this post it seems like it is only possible to load SHARC program with using either ROM loader or JTAG.

    I would like to know if it is possible to postpone the SHARC code loading (now at SoC ROM boot code) and do it under u-boot or Linux?

    Another question - is the SHARC ROM loading procedure described somewhere?

    Thanks in advance for reply,

    Łukasz

  • At the end I success to have an uboot containint boot code + core1 and core 2 code.

    The issue is that it's not possible to change something in flash from uboot. It crashes everything.

    This not fix my furutre problem.

    I need to be able to dynamically change Core1 and core 2 firmware from my linux program (in core 0).

    And I still don't know how to reprogram core 1 and 2 from a simple file.

    Regards

    pierre

  • Hi,

    pypardo wrote:

    At the end I success to have an uboot containint boot code + core1 and core 2 code.

    The issue is that it's not possible to change something in flash from uboot. It crashes everything.

    Do you mean the QSPI memory (SPI2) flash/erase is causing this problems?

     

    This not fix my furutre problem.

    I need to be able to dynamically change Core1 and core 2 firmware from my linux program (in core 0).

    And I still don't know how to reprogram core 1 and 2 from a simple file.

    Yes, I'm also interested in such a feature - but in u-boot not Linux.

     

    Regards

     

    pierre

    Best regards,

    Łukasz

  • Dear Mr wu:

    can you see problem : adsp-sc573 MAC only support RGMII or RMII? ,   we are urgent to know it, thank you very much!

  • Dear Mr wu:

    can you see question : adsp-sc573 MAC only support RGMII or RMII? ,   we are urgent to know it, thank you very much!

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.