/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Application Debug Question

Username:     
Password:     
             

Forum

# 1   2009-04-23 20:56:29 Application Debug Question

jetcode
Member
Registered: 2009-04-03
Posts: 49

Application Debug Question

I created a new project using CircleOS and examples from various projects. The project builds and flashes (release and debug builds) but when I execute RUN from the debugger the connection with the debugger is lost. I was assuming I could place a breakpoint in my code and execute run/ How do you debug an application that executes under CircleOS? It's not clear to me and I can't seem to locate much documentation regarding application debug.

Joe

Offline

 

# 2   2009-04-24 06:27:54 Application Debug Question

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Application Debug Question

You can debug within the first 32KB (from 0x08000000 up to 0x08008000).
The SD card function (filesystem) are in the upper memory and cannot be debugged..
Except these limitations, it should work.

Offline

 

# 3   2009-04-24 07:27:43 Application Debug Question

jetcode
Member
Registered: 2009-04-03
Posts: 49

Re: Application Debug Question

I have the Pro license. When I use "start" the built program gets flashed to the Primer2 wiping out all other functions. "Run" causes the debugger to terminate though the application is installed on the Primer2. Are there configuration issues I am not taking into account? I had the same troubles with the PlayWav and Recwav applications. They work fine when the Primer2 is programmed with the factory CircleOS release but I was never able to run them from debug mode before the Pro key and after.

Offline

 

# 4   2009-04-24 07:35:31 Application Debug Question

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Application Debug Question

I suggest you follow first the tutorial. At least the very first steps.
See: http://www.stm32circle.com/projects/project.php?id=53

I hope you will find waht is wrong in your configuration. I guess:
  1. either you didn't use the wizard to create the project (and the two elf files are missing)
  2. you built a Primer1 project for the Primer2,
  ....

Offline

 

# 5   2009-04-24 19:18:32 Application Debug Question

jetcode
Member
Registered: 2009-04-03
Posts: 49

Re: Application Debug Question

I am using the Cubic tutorial project which looks like the projects I've been creating using the wizard for Primer2 CircleOS projects complete with both ELF files. It appears that on Reset Main appears in the disassembly window and I can scroll and single step from main and see Cubic0 code in flash above CircleOS code.

When I single step from main execution stops single stepping at fct_dummy. When I use the application source code to set a breakpoint on return MENU_CONTINUE in ApplicationHandler and execute(run) the debugger terminates with OPI Driver "lost communication with ....". So the same effect is happening with the tutorial project as well as my projects and every project I've tried to debug (play wav, rec wav, dictaphone, etc).

I understand the basic architecture and firmware for CircleOS and application interface but I can't seem to get a round trip development cycle to occur due to the above stated problem. I thought that I would be able to break my application during runtime (run) execution and inspect variables and logic in the source code.

I think it would be handy if the tutorial project was used demonstrate debugging a CircleOS application while captured on video showing the Ride7 sequences necessary for single-stepping source code in a CircleOS application under Ride7 on Primer2.

Last edited by jetcode (2009-04-24 20:37:18)

Offline

 

# 6   2009-04-25 09:33:05 Application Debug Question

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Application Debug Question

What you describe should be the normal way to get an application working (in debug mode).
Once you are stopped at main, you can normally launch the execution, then select your application in the main menu and stop within your application if you have set a breakpoint.
I don't understand why you are facing this problem, but the only solution I see would be to debug with the source files of CircleOS (at least to check the initialization stage in CircleOS).
What I suggest:
1. Install the source files of CircleOS and compile them (build Primer2_circle.elf).
2. In your application, replace the default \RIDE\LIB\ARM\CircleOS\primer2_circle.elf by the same file resulting of the previous build.
3. Now, when you will launch your application, you will be able to follow the execution (and to step at the C level) in the main function of CircleOS. I hope you will see where/why the execution fails.

Offline

 

# 7   2009-04-25 17:51:39 Application Debug Question

jetcode
Member
Registered: 2009-04-03
Posts: 49

Re: Application Debug Question

I will try that ... is there any possibility that the OS is an issue here? I am using Vista x64.

Offline

 

# 8   2009-04-25 20:32:07 Application Debug Question

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Application Debug Question

I don't think so. If you start the debug session, and you reach the main function, the rest should work.

Offline

 

# 9   2009-04-25 23:14:44 Application Debug Question

jetcode
Member
Registered: 2009-04-03
Posts: 49

Re: Application Debug Question

I can get the code to run in CircleOS main up to the point where it loops on "wfi" and the opening announcement. At this point the OPIDriver error occurs so this is definitely relating to an event after the OS is up.

Offline

 

# 10   2009-04-26 04:43:23 Application Debug Question

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Application Debug Question

OK.... You need to download a recent version of RIDE+KitARM. I believe that an old version of RIDE had some problems to support the 'sleep' mode.
Sorry, I didn't remember this issue earlier.

Offline

 

# 11   2009-04-26 17:02:48 Application Debug Question

jetcode
Member
Registered: 2009-04-03
Posts: 49

Re: Application Debug Question

Hi Francis ... thanks I found the new version of software ... Joe

It Works! and the flash programming sequence is much faster ... let the games begin!

Last edited by jetcode (2009-04-26 18:07:37)

Offline

 

Board footer