6 years, 10 months ago.

MAX32630FTHR -Compilation Error help

Hi,

I need some one help me understand and solve the compilation error in my code for MAX32630FTHR as target.

I get errors like below 1)Error: Identifier "M1B" is undefined in "test.cpp", Line: 63, Col: 2 for variable like M1A,M2A and M2B.

I have define this variables at the start of the code as below,cant understand why this error occurs. DigitalOut M1A(P5_0); DigitalOut M1B(P5_1); DigitalOut M2A(P5_6); DigitalOut M2B(P5_5);

2) Error: Function "speedmap" has already been defined in "test.cpp", Line: 69, Col: 8) But i have defined this at only one place

I do have some more errors(attached a image) ,it would of great help if someone can help me out of this problem, since i am a newbie to programming and from H/W background. /media/uploads/sharish7/error.jpg

Attached the code fyr(some portions of the actual code are commented due to development phase) /media/uploads/sharish7/code.txt

Regards, Harish.S

1 Answer

6 years, 10 months ago.

Looks like you are missing a semicolon at the end of the first occurence of speedmap (around line 17). That confuses the compiler and leads to skipping the M1A etc declarations, leading to more errors.

Accepted Answer

The problem got solved after including the semicolon,thanks for the support.

posted by HARISH S 04 Jun 2017