2014-10-09 12:22 AM
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
2014-10-09 06:55 AM
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.2017-02-14 01:46 PM
,
,
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 StudioTestStruct_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'),,
, , ,},
}