I haven't checked what Mongoose does, but it's fairly common for embedded OS's to link the application and kernel together. IOW, using the GPL may force you to give the source code to your customers if they ask for it.
In practice everybody acts under the assumption that the GPL affects all code that is statically linked together, but nothing else. Some people extend the interpretation to dynamic linking, but consensus is that the GPL does not affect code interoperating over other interfaces like web APIs.