cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with STM32 Perf Stick 2

azranath
Associate
Posted on April 20, 2010 at 15:49

Problems with STM32 Perf Stick 2

4 REPLIES 4
picguy2
Associate II
Posted on May 17, 2011 at 13:48

Sorry to be a little OT but has anyone been able to use the IAR J-Link with either the performance or com sticks?  My local IAR office is severally manpower limited and has not been work on that incompatibility.

I would rather use IAR and in any event HITOP refuses to consider running on 64-bit Win7.
Andrew Neil
Evangelist
Posted on May 17, 2011 at 13:48

''HiTOP always show errors compiling (the funniest ist that find the errors in the llibraries provided by the firma). Can someone help me?''

 

 

How can anyone help you if you don't actually say what errors, specifically, you are getting?!

Tip: When dealing with compiler errors, always read the text literally - that usually tells you what to do to fix it!

eg, if the error says ''X is undefined'' - then the solution to that is to define X!

Another: if the error says ''file X not found'' then you need to verify that the file does, in fact exist - and that the compiler is looking in the correct place for it.

etc, etc,...
Andrew Neil
Evangelist
Posted on May 17, 2011 at 13:48

Another tip: it is

very

common that one error early in the build will lead to many consequent errors later in the build. eg, if an include file is not found, then anything that relies upon that include file will, obviously, cause further errors!

Therefore always start by fixing the earliest error first

azranath
Associate
Posted on May 17, 2011 at 13:48

Thanks for the answer.

The program says me: 

.\Source\main.c: In function 'main':

.\Source\main.c:58: warning: implicit declaration of function 'RCC_APB2PeriphClockCmd'

.\Source\main.c:58: error: 'RCC_APB2Periph_GPIOB' undeclared (first use in this function)

.\Source\main.c:58: error: (Each undeclared identifier is reported only once

.\Source\main.c:58: error: for each function it appears in.)

.\Source\main.c:61: error: 'GPIO_InitStructure' undeclared (first use in this function)

.\Source\main.c:61: error: 'GPIO_Pin_5' undeclared (first use in this function)

.\Source\main.c:62: error: 'GPIO_Mode_Out_PP' undeclared (first use in this function)

.\Source\main.c:63: error: 'GPIO_Speed_50MHz' undeclared (first use in this function)

.\Source\main.c:64: warning: implicit declaration of function 'GPIO_Init'

.\Source\main.c:64: error: 'GPIOB' undeclared (first use in this function)

.\Source\main.c:67: warning: implicit declaration of function 'GPIO_WriteBit'

.\Source\main.c:67: error: 'Bit_RESET' undeclared (first use in this function)

But it's suposed that it is declared in the libraris, isn't it?

Kind Regards

#include ''stdio.h''

#include ''string.h''

#include ''main.h''

#include ''stm32f10x_lib.h''

GPIO_InitTypeDef GPIO_InitStructure;

int main (void)

{

RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);

/* redrawPictures = 1;*/

 GPIO_InitStructure.GPIO_Pin =  GPIO_Pin_5;

  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;

  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; 

  GPIO_Init(GPIOB, &GPIO_InitStructure);

  GPIO_WriteBit(GPIOB, GPIO_Pin_5, Bit_RESET); 

  while(1)

   {

     // todo, insert your code here

   }

}