When I type these codes in Kinetis Design Studio, I am getting Syntax error. Can anyone debug the errors ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

When I type these codes in Kinetis Design Studio, I am getting Syntax error. Can anyone debug the errors ?

954 Views
ganeshramachand
Contributor IV

There is syntax error in each line. How to resolve it ? The controller which I work on is MKE02Z64VLD2 and the IDE which I use is Kinetis Design Studio.

(void)BitIoLdd1_Init(NULL); /* initialize the port pin PTB1 */

  /* enable internal pull-up on PTB1 */

  PORT_PDD_SetPinPullSelect(PORTB_BASE_PTR, 1, PORT_PDD_PULL_UP);

  PORT_PDD_SetPinPullEnable(PORTB_BASE_PTR, 1, PORT_PDD_PULL_ENABLE);

  WAIT1_Waitms(5); /* wait get pull-up a chance to pull-up */

 

  if (!BL_SW_GetVal()) { /* button pressed (has pull-up!) */

    WAIT1_Waitms(50); /* wait to debounce */

    if (!BL_SW_GetVal()) { /* still pressed */

      return TRUE; /* go into bootloader mode */

    }

  }

  /* BTLD switch not pressed, and we have a valid user application vector */

  return FALSE; /* do not enter bootloader mode */

}

Labels (1)
0 Kudos
6 Replies

509 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

to check the problem efficiently, can you please provide:

1 your KDS version

2. post your demo project in zip here, thus we can look the problem directly.

thanks!


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

509 Views
ganeshramachand
Contributor IV

Kinetis Design Studio Version: 2.0.0

Eclipse Version: Kepler (4.3.2)

0 Kudos

509 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

please click on the Action button, Edit

pastedImage_0.png

then you will see the Attach button is on bottom right of the Text Frame.

pastedImage_1.png
Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

509 Views
ganeshramachand
Contributor IV

Hey Zhang,

                  Could you find out the problem ?
I did attach the zip file of my code as per you instruction last friday. In case you didn't notice, kindly scroll up and peruse my previous comment. Thanks for helping.

Regards

Ganesh R

(I have attached in this comment once again )

Details:

Kinetis Design Studio Version: 2.0.0

Eclipse Version: Kepler (4.3.2)

0 Kudos

509 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Ganesh,

I open your project with KDS3.0, I think I can see the same problem as you mentioned.

pastedImage_0.png

the problem is that I didn't see the code in read rectangle in a function. if i add a function name for instance gpio_init() ahead of this code, the syntax error is gone. see below i highlighted:

pastedImage_2.png

does this answers your question?


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Mark Correct button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

509 Views
ganeshramachand
Contributor IV

Thanks a lot Zhang. This completely will solve my problem :smileyhappy: . Will reach you if I get stuck when I progress through. Thanks again.

Regards

Ganesh R

0 Kudos