MODGPS compile error

26 Jan 2013

Whenever I try to compile MODGPS examples I get an error. That error, identifier "_uidx" is undefined, line 37 of GPS.cpp.

If I comment out the switch statements it compiles but I get only zero's as output.

I am not sure what the developer was trying to do so I would appreciate any help fixing the error.

Thank you.

26 Jan 2013

Had a look at the library, didn't understand it :P

Doesn't matter though, fix for this one I do know, replace _uidx with _serial.index. Didnt check if it compiles, but that should do the trick. Was a name change in mbed Serial library. (If that works you can send Andy a PM to ask if he can replace that in his library).

26 Jan 2013

That was it. Thank you. I will let Andy know.

Erik Olieman wrote:

Had a look at the library, didn't understand it :P

Doesn't matter though, fix for this one I do know, replace _uidx with _serial.index. Didnt check if it compiles, but that should do the trick. Was a name change in mbed Serial library. (If that works you can send Andy a PM to ask if he can replace that in his library).

23 Mar 2013

Bravo Erik Olieman, it works !!!

29 Mar 2016

I know it's quite a long shot but i'm struggling with this same problem now, 3 years on. any solutions?

27 May 2016

I am also struggling with this issue.. I am using a Trimble GPS and can't get the MODGPS library to compile: Error: Identifier "LPC_UART1" is undefined in "MODGPS/GPS.cpp", Line: 38, Col: 28

I also can't get the GPS to return a valid location or time.... Has anyone stumbled across a fix for this?

Thanks!

31 May 2016

I think you are hitting an issue because the library was written when only NXP cpus were supported by mbed. LPC_UART1 is implying an NXP LPC part, your board has an ST CPU and so LPC_UART1 is undefined.

Taking a quick look at it you should be able to replace the switch in GPS.cpp lines 37 to 42 with

_base = NULL;

Also "a Trimble GPS" doesn't narrow it down a lot, They have GPS systems varying in price from $10 to $10,000. I'm guessing you have one towards the lower end of that range but if you need more help getting it working then a little more detail would be useful. :-)