Post Go back to editing

Boot failed after programming flash with large size binary although the size is within serial flash memory

Category: Software
Product Number: ADSP-SC594
Software Version: CCES 2.10.1

Hello,

I have two problems about programming flash memory.

The two symptoms are related with the size of binary file to be programmed.

For example,

case 1) 336 KB binary: no problem! ok

case 2) 8.2 MB binary: small symptom

In console screen of flash programming batch program, writing process finished well, but verifying process halts.

At that time, I terminate the process and repower board, then it boots ok.

case 3) 21.7 MB binary: critical problem

The verifying process halts as above.

and after repowering, boot fails as SYS_FAULT led on.

The specification of our system is as follows:

DSP: ADSP-SC594

CCES: v2.10.1

emulator: ICE-1000 

Flash memory: IS25LP512M (capacity 512Mb = 64MB)

Driver file: is25lp512m_dpia_SC594_Core1.dxe

The content of batch file:

"C:\Analog Devices\CrossCore Embedded Studio 2.10.1\cldp.exe" -proc ADSP-SC594 -core 1 -emu ICE-1000 -driver "is25lp512m_dpia_SC594_Core1.dxe" -cmd prog -erase affected -format bin -file "VC_CM_Core0.ldr" -cmd compare -format bin -file "VC_CM_Core0.ldr"

pause

==The end==

 

Is there anyone who experiences this problem or can help me?

Thank you in advance.

Best Regards,

Johnny Jeong

Parents Reply Children
  • Hi Johnny Jeong,

    Can Please connect the board in DND mode, This would help to isolate whether the issue is with booting or the application. Please refer the below FAQ for connecting the processor in DND mode.
    ez.analog.com/.../faq-how-to-debug-a-target-board-which-boots-from-flash-using-crosscore-embedded-studio

    Also, please share us the LDR file with an LED output, we will try on our setup and let you know.

    Regards,
    Divya.P

  • Hi Divya.P

    I have removed my code leaving main empty loop only in each core.

    In fact, in my binary most of amount is data, wav files included.

    I have attatched two ldr files. 

    One is code-only small sized bin file.

    The other is code+data big sized bin file.

    (Please be aware that these files are of type bin, not intex hex.)

    Sorry but we don't have sc594 ezkit, so I could not implement code for controlling LEDs.

    But you can see SYS_FAULT LED on in your board when big sized file is programmed. 

    Finally, regarding on DND mode you informed, I have one problem. 

    I checked that cces debug can be connected when boot ok, but cannot when boot fails.

    But inserting asm("jump (pc,0)"); at the intial location of main() of arm core makes compile error as message below:

    C:\Users\lunal\AppData\Local\Temp\ccQ6dRIN.s: Assembler messages:
    C:\Users\lunal\AppData\Local\Temp\ccQ6dRIN.s:486: Error: bad instruction `jump (pc,0)'
    make: *** [src/VC_CM_Core0.o] Error 1

    However I guess that although the above debugging becomes enable, 

    probably control cannnot reach the jump point when boot fails.

    Thank you.

    Best regards,

    Johnny Jeong

    VC_CM_Core0_bin.zip

  • Hi Johnny Jeong,

    We suspect the issue may occurred due to block size of the ldr. So can you please try with below steps and boot it.


    Use the -MaxBlockSize switch to limit the block size to a value less than 64KB. As boot code needs to be aligned on a 32-bit boundary,the maximum size of any individual block is 65,532 (0xFFFC); therefore, use -MaxBlockSize 0xFFFC in the additional options while creating the loader file.

    Regards,
    Divya.P

  • Hi Divya.P

    Thank you for a trial, but unhappily it seems not to cure the problem.

    I inserted "-MaxBlockSize 0xFFFC" option to loader setting, and made ldr file (I checked the binary size is slightly increased - by 5KB roughly), then tried. but it still boot failed.

    (At later "-MaxBlockSize 65532" was tried as well. Of course the same result.)

    The following capture shows setting screen as evidence.

     

    Maybe do you have this problem on your board when programming flash with big sized binary(e.g about 21MB in my case)?

    Thank you.

    Best Regards,

    Johnny Jeong

  • Hi,

    I seem to find out a clue.

    I suspected that this problem is closely related with ldr binary size, and have made an experiment to find the boundary line on the size.

    The result of the experiment is as follows. (Only two key cases are shown)

    16,817,904 B -> NG

    16,747,788 B -> OK

    (As your reference, 16MB = 16*2^20 = 16,777,216 B)

    From this result, we can see that programming ldr greater than (or equal to?) "accurately 16 MB" makes problem.

    Possibly could you find the cause?

    (I suspect there is size-limit to process for writing binary greater than 16 MB to Flash, or to process for reading from Flash when boot.)

    P.S

    At the experiments above, the option "-MaxBlockSize 0xFFFC" was applied.

    Best Regards,

    Johnny Jeong

  • Hi,

    I have inspected our board circuit related with SPI Flash chip (QSPI data lines), but not found any strange thing.

    Isn't there anyone who helps me with this problem?

    I attached two ldr binaries (bin type) which are slightly smaller and bigger one than16MB.

    They do not do anything special.

    If the boot fails, you will see SYS_FAULTS LED on.

    VC_CM_Core0_test.zip 

    If it takes time to check this problem, please let me know.

    If no reponse until this week, I think I should find other channel to ask.

     

    Thank you..

  • Hi Johnny Jeong,


    Sorry for the delay in response.

    Issue got simulated in SC594 SOM board, We are checking on this and we will get back to you soon.

    Regards,
    Divya P

  • Hi Divya P

    Thank you for reply. 

    I will be waiting.

    Best Regards,

    Johnny Jeong

  • Hi Johnny Jeong,

    Apologies for the late response.
    If possible, could you please try to create loader file with 'Intel hex' Boot format and let us know the observations.

    Regards,
    Divya.P

  • Hi Divya.P

    In fact, initially I used 'intel hex' ldr format which is default setting.

    With the setting, it had the same problem, and I have been trying inspection using 'bin' ldr format because bin ldr is actual size which is programmed on flash memory. (intel hax is ascii format and its ldr has twice or more times larger size as fas as I know)

    Regrads,

    Johnny Jeong