Topic : Serious problems with newest version of Ride7

Forum : ARM

Original Post
Post Information Post
June 10, 2009 - 8:17am
Guest

I've just installed the newest Ride7 version and RKit. I use STM32F103 processor. The software I wrote is compiled without errors but when I start to dubug it a nightmare begins (I use Rlink for debugging).

1. When I try to add any global variables into Watch window I get the message: "Lost communication with Rlink" and the
Ride7 hungs up and the only way to exit is to use Ctrl+Alt+Del in the Task manager.
2. When I add watches by means of "Add watch" popup menu they are added correctly but random values are displayed which are incorrect. For example, when such a table is declared:

const char c[] = "1, 2, 3, 4, 5"

in the watch window I see:

c 0, 32, 45, 54, 12 etc.

3. When I want to do "Step over" or "Single Step" Ride7 hungs up and "Ctrl+Alt+Del" is needed to exit it.

What's going on ???
I didn't have such issues with previous version of Ride7 and RKit 6.1. I tried to reinstall Ride7 several times but without success. Do i do something wrong ???

Replies
Post Information Post
+1
0
-1
June 10, 2009 - 9:59am
Guest

I have also noted more and more troubles for RIDE to follow sourcecode in the debugger, as gcc matures.. Raisonance have blamed it on the optimization that gcc makes. I followed that lead a bit and noted that several where having similar problems when debuggin gcc generated code on other platforms.
If you see these kind of things where variables and constants are misbehaving, the first thing to do is to disable optimization and see if that helps.. Without optimization enabled Ride should be able to follow the generated sourcecode.

+1
0
-1
June 10, 2009 - 11:03am
Guest

Is it possible to find older versions of Ride to download ? Unfortunately i had one but deleted from hard drive :(

+1
0
-1
June 10, 2009 - 4:29pm
Guest

Hi,

1. We managed to reproduce your first point and we will correct it as soon as possible.

2. This is probably due to optimization. If the 'c' array is never referenced by any function, then the linker will optimize it out. (remove it) I saw the same thing as you describe at first, but after I added references to c from my main function, the data was OK. It is possible that older versions of the compiler/linker didn't perform this optimization.

3. We did not manage to reproduce your third point. Can you please send us more information? (version of the Ride and ARM kits, complete project showing the problem, etc.)

We still can provide older version but yo need tolet me know which one you need.
I will then send you an ftp link to download it.

Regards,
Matloub

+1
0
-1
June 11, 2009 - 11:30am
Guest

Various improvements have been introduced in the latest release. One of them if the dynamic refresh ('read 'on the fly') of all the views during execution (including the watch window). The reported problems are probably caused by this new feature (but it seems to depend on the computer configuration...). Anyway, we will fix them and post an update very soon. We apologize for these problems.

+1
0
-1
June 11, 2009 - 12:18pm
Guest

About the problem #1:

We reproduce the problem (but without the need of entering 'Alt-Ctrl-Del'..) with some devices (STM32F103RBT6 for example).
When you launch the command 'Add watch' without any selection in the editor, RIDE will build a temporary table of the symbols to help you in your search of the symbols you wish to build. The crash seems to be caused by the symbols of the DMA2 peripheral.. (that does not exist on the F103RBT6). We still have to analyze why it crashes, but a simple workaround consists in removing the DMA2 from the list of peripherals.
Open in \Program Files\Raisonance\Ride\Sim\ARM\.. the '.sim' file that corresponds to the device you selected in the options.
In this file, search for "DMA2". You will find a line that looks like:
Periph_13_Name = DMA2

replaces DMA2 by a dummy name. For example:
Periph_13_Name = DMA2_dummy

I hope it fixes the 'communication lost' (it does our computers).

Now, it still takes some time to load the table of symbols. We will try to improve this... At the moment, the best is to select in the editor the symbol/expression you want to add in the watch window, and (popup menu) to add this selection. This is immediate..

+1
0
-1
June 15, 2009 - 9:05am
Guest

The Problem 1 was solved. Thank you. Now this works well.

When it comes to Problem 2 it looks like this: I have such a table declared in my program:

typedef unsigned char u8;

const u8 DeviceDescriptor[18] =
{
0x12, /* bLength */
0x01, /* bDescriptorType */
0x00, /* bcdUSB, version 2.00 */
0x02,
0x00, /* bDeviceClass : each interface define the device class */
0x00, /* bDeviceSubClass */
0x00, /* bDeviceProtocol */
0x40, /* bMaxPacketSize0 0x40 = 64 */
0x83, /* idVendor (0483) */
0x04,
0x22, /* idProduct */
0x22,
0x00, /* bcdDevice*/
0x01,
1, /* index of string Manufacturer */
/**/
2, /* index of string descriptor of product*/
/* */
3, /* */
/* */
/* */
0x01 /*bNumConfigurations */
};

The table is referenced in the program. However, in the Watch window the table contens is displayed incorrectly (as many other variables...) and I can see the following:

DeviceDescriptor

[0] 0x00
[1] 0x50
[2] 0x20
[3] 0x0D
[4] 0x13
[5] 0x01
[6] 0x00
[7] 0x20

The "DeviceDescriptor" should be of course shown as follows:

[0] 0x12
[1] 0x01
[2] 0x00
[3] 0x02
[4] 0x00
[5] 0x00
[6] 0x00
[7] 0x40

As far as Problem 3 is concerned the Ride7 version is 7.20.09.0139 and RKit version is 1.20.09.0154. It seems to me it can be due to the fact that some parts of the C source code in software are not compiled at all - that's why i can't perform "Step over" or "Step into". For example, I have C file called "interrupts.c" (it was renamed from "stm32f10x_it.c"). The following code is compiled and included into executable code (the code that is compiled into executable one is marked with pink rectangle and the blue hyphen at the left bar of the editor when the Ride7 is in the debugging mode):

/*******************************************************************************
* Function Name : PVD_IRQHandler
* Description : This function handles PVD interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void PVD_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name : TAMPER_IRQHandler
* Description : This function handles Tamper interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void TAMPER_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name : RTC_IRQHandler
* Description : This function handles RTC global interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void RTC_IRQHandler(void)
{
}

There is some code of the same file however, that is NOT compiled (removed by the linker I think...):

/*******************************************************************************
* Function Name : DMAChannel6_IRQHandler
* Description : This function handles DMA Stream 6 interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void DMAChannel6_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name : DMAChannel7_IRQHandler
* Description : This function handles DMA Stream 7 interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void DMAChannel7_IRQHandler(void)
{
}

/*******************************************************************************
* Function Name : ADC_IRQHandler
* Description : This function handles ADC global interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void ADC_IRQHandler(void)
{
}

void USB_HP_CAN_TX_IRQHandler(void)
{
}

void USB_LP_CAN_RX0_IRQHandler(void)
{
USB_Intr();
}

Why the above code is removed by the linker ??? I cannot put any breakpoint there. There are also other cource code parts in the "interrupts.c" file that are removed by the linker and some that are not.
The "USB_Intr" function is referenced in the "usb.c" file which is also removed by the linker (almost whole "usb.c" code is removed by the linker although the code is referenced by other C functions). Why is this ?
I still stress the importance that the problems described here didn't exist in previous vesrsion of Ride7.

"We still can provide older version but yo need tolet me know which one you need.
I will then send you an ftp link to download it."

It seems I had 7.14 version of Ride7. The RKit version was 6.1.