cancel
Showing results for 
Search instead for 
Did you mean: 

No variables showing on STM-studio (IAR)

niekbeekman
Associate
Posted on October 09, 2014 at 09:22

Hi all,

I'm having troubles connecting the STM-studio with the STM32F4 - Discovery.

I am using STM-studio 3.3 with IAR Embedded Workbench for ARM (7.3) and after debugging and importing the c.out file, It only shows a single variable, when I use more variables.

How do I get te variables visible on the STM-studio?

I added the C.out file as an Attachment.

Thanks for the support,

Niek

2 REPLIES 2
S C
ST Employee
Posted on October 09, 2014 at 15:55

Hello,

The STMStudio only displays the global variables of the application. It uses gdb for parsing the out file. With the given out file, only one variable is visible at gdb level.

The first thing would be to ensure that the debug information are really generated by EWARM

(output tab of the compiler and linker).

Then ensure that variables are not removed at linker stage because of any optimization and/or defines making some code unexpectedly dead.
Posted on February 14, 2017 at 21:46

 ,

 ,

Hi,

I am also having the same problem of variables not showing up using STM Studio.  ,The problem is specific to the F4, and it is only variables that are NOT arrays which fail to show up. Arrays DO show up. I have verified that the debug information regarding the variables does show up (i.e. if I run the iarElfDumpArm program that comes with IAR Workbench, the missing variables are there, with all type and location information.)  ,What's even stranger, is that if I have a structure that contains both a simple variable and an array, only the array member is visible in STM Studio.

Furthermore, when I compile the same code for the ,L4, STM Studio can see all variables (arrays and simple variables).

Has anyone out there had any luck using the F4 with STM Studio?  ,I am using version 3.5.1 of STM Studio btw

Thanks, Edmund

p.s.  ,Here's the contents of my main.c file, with comments besides each variable declaration to indicate whether it is visible or not.

/* Includes ------------------------------------------------------------------*/

 ,

♯ include 'stdint.h'

 ,

♯ include 'stdio.h'

/* Private function prototypes -----------------------------------------------*/

 ,

void ModifyDataBuffer(uint8_t* data, uint8_t bufLen),

 ,

void InitDataBuffer(uint8_t* data, uint8_t bufLen),

 ,

void DoNopDelays(uint32_t numNops),

 ,

/* Private functions ---------------------------------------------------------*/

/**

 ,

* @brief Main program

 ,

* @param None

 ,

* @retval None

 ,

*/

♯ define MAX_ARRAY_SIZE 100

typedef struct

 ,

{

 ,

 ,  ,  ,  ,uint8_t byteMember, // Not visible in STM Studio

 ,

 ,  ,  ,  ,uint8_t arrayMember[MAX_ARRAY_SIZE], // Visible in STM Studio

} TestStruct_t,

uint8_t DataArray1[MAX_ARRAY_SIZE],  ,// Visible in STM Studio

uint8_t DataArray2[MAX_ARRAY_SIZE], / / Visible in STM Studio

uint8_t byteVal, // Not visible in STM Studio

 ,

uint16_t word16Val, // Not visible in STM Studio

 ,

uint32_t word32Val, // Not visible in STM Studio

TestStruct_t myTestStruct, // Only the Array element is visible in STM Studio

int main(void)

 ,

{

 , , ,InitDataBuffer(DataArray1, MAX_ARRAY_SIZE),

 ,

 , , ,InitDataBuffer(DataArray2, MAX_ARRAY_SIZE),

 ,

 , , ,ModifyDataBuffer(DataArray1, MAX_ARRAY_SIZE),

 ,

 ,

while(1)

 ,

{

 ,

 , , ,ModifyDataBuffer(DataArray2, MAX_ARRAY_SIZE),

 ,

 , , ,DoNopDelays(100),

 ,

 , , ,byteVal = DataArray2[10],

 ,

 , , ,myTestStruct.byteMember = DataArray1[10],

 ,

 , , ,myTestStruct.arrayMember[0] = byteVal,

 ,

}

 ,

 ,

return 0,

 ,

}

 ,

 ,

void InitDataBuffer(uint8_t* data, uint8_t bufLen)

 ,

{

 ,

 , , ,for (int i = 0, i <, bufLen, i++)

 ,

 , , ,{

 ,

 , , , , , ,data[i] = i,

 ,

 , , ,}

 ,

}

void ModifyDataBuffer(uint8_t* data, uint8_t bufLen)

 ,

{

 ,

 , , ,for (int i = 0, i <, bufLen, i++)

 ,

 , , ,{

 ,

 , , , , , ,data[i] = data[i] + bufLen,

 ,

 , , ,}

 ,

}

void DoNopDelays(uint32_t numNops)

 ,

{

 ,

 , , ,for (uint32_t i = 0, i <, numNops, i++)

 ,

 , , ,{

 ,

 , , ,asm('nop'),

 ,

 , , ,}

 ,

}