Not able to integrate LPDSP32 fibonacci sample project with the RSL10 Arm Cortex application

I am following the LPDSP32 support manual (RSL10_lpdsp32_support_manual.pdf)

I am able to run the fibonacci sample code given in chapter 4, where the LPDSP32 code is downloaded executed directly in PRAM using Synopsis ChessDE IDE

In chapter 5 it says it’s possible to extract the relevant code and data from the LPDSP32 application elf file, and include this with the Arm Cortex code so that I don’t need to use the ChessDE to run the LPDSP32 part of the application

I have used elfConverter.py as instructed and generated all the .c and .h files. I have included these in the Arm Cortex project of the fibonacci sample, and in main.c I replaced

Sys_LPDSP32_DIOJTAG(DIO_WEAK_PULL_DOWN, JTAG_LPDSP32_TDI, JTAG_LPDSP32_TMS, JTAG_LPDSP32_TCK, JTAG_LPDSP32_TDO);

with

loadDSPMemory(&Fibonacci_dsp_Overview);

But now I am not able to debug the Arm cortex program and see the increasing fibonacci series count in Eclipse IDE. The program compiles fine and I can download it in the development board in debug mode, but when I press the button on the board , Arm Cortex continuously seems to stay in stateBUSY

The behaviour is equivalent to simply commenting the loadDSPMemory(&Fibonacci_dsp_Overview); line. It looks like LPDSP32 code is not running properly. How do I include the LPDSP32 code in the Arm Cortex project so that I can load it in PRAM through Arm Cortex? I can include my project source code if needed.

@mahaju

By running “hello world”, you do not need run the command jtalk.exe -c jlink -f 2000 -v
The following picture shows simulation with “ lpdsp32 ” and use Debug >run in console.

But if you need run debug in EVB board using Debug >select debugger>lpdsp32_client, you
need use jtalk.exe -c jlink -f 2000 -v .

— issue: There is no “hello world” in the console window.

“The loop issue was observed for all versions of the Synopsys tools (tested M-2017.03-SP3-4, N-2018.03-SP3-2 and O-2018.09-SP3)”.

Thank you for using our community forum!

@larry.zhu
Actually I have already fixed this issue
I had a look at your attached code as well and your code also works
The main difference between my solution and your solution seems to be this

Your solution:
You load the LPDSP32 code like this:

//Initialize the lpdsp32
loadDSPMemory(&Fibonacci_dsp_Overview);

/* Enable the JTAG for the LPDSP32 using the DIOs we defined above */
	Sys_LPDSP32_DIOJTAG(DIO_WEAK_PULL_DOWN, JTAG_LPDSP32_TDI,
			JTAG_LPDSP32_TMS, JTAG_LPDSP32_TCK, JTAG_LPDSP32_TDO);  

My solution:
I load the LPDSP32 code like this:

SYSCTRL->DSS_CTRL = DSS_LPDSP32_PAUSE;
loadDSPMemory(&Fibonacci_dsp_Overview); 
SYSCTRL->DSS_CTRL = DSS_LPDSP32_RESUME;

I don’t call the Sys_LPDSP32_DIOJTAG() function

Is my method correct? Also, how did adding Sys_LPDSP32_DIOJTAG() after loadDSPMemory() fix the problem in your attached program? As far as I understand, when loading the LPDSP32 using Arm Cortex like this, I don’t need the external jlink to connect to LPDSP32. Is this correct? If that is the case why do we need to call Sys_LPDSP32_DIOJTAG()?

Also, please have a look at my other question as well:

Hi @mahaju ,
Actually your method is correct.

  1. We don’t need external jlink for LPDSP32. So we don’t need call Sys_LPDSP32_DIOJTAG().
  2. In my program, you can comment off Sys_LPDSP32_DIOJTAG() function for 4 DIO pins. and remove
    /* Enable the JTAG for the LPDSP32 using the DIOs we defined above */
    Sys_LPDSP32_DIOJTAG(DIO_WEAK_PULL_DOWN, JTAG_LPDSP32_TDI,
    JTAG_LPDSP32_TMS, JTAG_LPDSP32_TCK, JTAG_LPDSP32_TDO);
  3. Add the following line after loadDSPMemory(&Fibonacci_dsp_Overview);
    SYSCTRL->DSS_CTRL = DSS_LPDSP32_RESUME;

I wish this could help you. Please let me know if you have any further question.

(NOTE: For your another question for “hello world” does not show in Hosted I/O console is issue(bug).
This problem is presumably caused by the debugger reading the registers of the HW loop stack when certain debugger’s windows are active.
Reading these registers causes the HW loop stack to be cleared and the loop body to be executed only once (exactly as observed).)

Regards,
Larry

@larry.zhu

So this is a bug in ChessDE? What is the workaround for this? Is there any way to display log messages from LPDSP32?

Also, please have a look at a different issue I posted here: