Post Go back to editing

debug LDR file not booting after power reboot

Category: Hardware
Product Number: SC572
Software Version: CCES2.11

Hi team,

I have a simple LED flashing project modified for a custom SC572 board. I have confirmed that I can debug the program on RAM (with a modified pre-loader binary), and I'm able to flash the LDR to flash using the CLDP (with a modified flash driver). However, on power reset, the application doesn't start up. I have tried to use the ICE1000 debugger to load only project symbols for debugging but that didn't help much on why it's not booting up. 

Please advise how I can debug the boot process for this LDR?

I have attached the simple LED project with my driver for flash memory and my customised init & preloader code.

Hardware and software info:

  • ICE1000
  • CCES 2.11
  • Windows 10
  • custom board with SC572 chip
  • same SRAM chip as SC573 ez-kit
  • Flash chip is W25Q256JV, flash driver works with CLDP for flashing, and I also used the CLDP -cmd compare to validate the binary is stored on flash. As well as doing raw reads of the flash memory after power reboot and compared it to LDR binary

5270.sc572_simple_led.zip



added ram info
[edited by: analoggggez at 6:01 AM (GMT -4) on 1 Nov 2022]
  • In addition, i was following this FAQ:  How to debug a target board which boots from Flash using CrossCore Embedded Studio 

    But I'm not sure where to put the jmp command in the pre-loader/init code so that I can use the debugger to debug the booting process. 

    Another note: the init code attached in the zip is in a debug configuration as opposed to release, so I could add debug symbols

  • note2: After a fresh flash and reboot of the board, i loaded obly symbols with the debugger and viewed the RCU registers and have noticed that the ERRCODE bit is 3 instead of 0. See image below for the image. I looked through the HRM but couldn't find any more info that could help debug my application. "ROM Error Code. The RCU_MSG.ERRCODE bit indicates the error code of the ROM. It is valid only when in the error handler." I can't confirm that the program is in the error handler either as the IDE shows "no debug context"

  • Hi,

    From your "Button_LED_GPIO_Polled_SC572_SHARC_Core1" application we have noted, Append (-NoFinalTag) was disabled in loader settings when adding executable files.

    Please note, Append core input without introducing a FINAL block (-NoFinalTag) should be enabled for Core 0.
    When building an .ldr file with multiple .dxe files, -NoFinalTag  prevents the boot from halting after the first .dxe completes.
    So in your loader side, when the -NoFinalTag was not enabled, it gets halt in the first application itself.

    We recommend to refer the below linked FAQ for more details on flashing using CLDP:
    ez.analog.com/.../faq-how-to-load-and-run-a-program-from-flash-on-adsp-sc5xx-target-board-using-crosscore-embedded-studio

    If still you are facing issue, could you please try without initcode and change the ARM code mappting from L3 to L2 by following below steps:
    1.Double-click the system.svc file of the project(Button_LED_GPIO_Polled_SC572_SHARC_Core0) listed in the project explorer view. The System Configuration overview appears.
    2.Select the "Add" then enable "Linker Files" listed in the Recommended Add-Ins
    3. Click on finish.
    4. Then click on "Linker files" tab button and change to "L2" memory from Target memory option. Then save and compile the project.
    5. Now create the loader file without initcode, flash the loader file and check booting works.

    To debug it further,  before entering to DND mode, please ensure that you have enabled the "Load Symbols Only" option, and disable the "Reset Core before load" option in Debug configuration window.

    Regarding, But I'm not sure where to put the jmp command in the pre-loader/init code so that I can use the debugger to debug the booting process.
    >> You should put JUMP(PC,0);  instruction inside the main function or in init_code and generate ldr to load it into the flash and boot it. The emulator can then be connected in DND mode.

    After you provide instant power up, if it halt at JUMP(PC,0); means that it is booting properly and you can change the JUMP(PC,0); to NOP in disassembly window , you can now step through your init code/application as required and debug you application further

    After connecting with “DND” mode can you please share us the screenshots of the Disassembly window.
                     
    Regards,
    Divya.P564156.zip