[SOLVED] Where are FW_ARCHITECTURE and MGOS_APP defined?

I’ve been working on tests for my project and have come unstuck trying to test a function that uses one of the auto-created getters and setters that are created as part of the build.

The place I’m stuck is when including the file mgos_config.c which is auto-generated as part of the build and contains the getters and setters.

../deps/modules/mongoose-os/src/mgos_sys_config.c: In function ‘mgos_sys_config_init’:
../deps/modules/mongoose-os/src/mgos_sys_config.c:334:43: error: ‘MGOS_APP’ undeclared (first use in this function)
  334 |   mgos_ro_vars_set_app(&mgos_sys_ro_vars, MGOS_APP);
      |                                           ^~~~~~~~
../deps/modules/mongoose-os/src/mgos_sys_config.c:334:43: note: each undeclared identifier is reported only once for each function it appears in

My guess is MGOS_APP and FW_ARCHITECTURE are maybe defined during the build/generation process but I’ve not been able to find them as yet. Any help would be appreciated.

What do you mean? mgos_config.c is already included in the firmware.

I’ve written some functions around logging to FS and have pulled them out in to a separate .C and .H file
I’m using Google Test (gtest) and am writing unit tests for the functions mentioned above.

In order to compile my .C file I need to first compile the dependent .C files, of which mgos_config.c and mgos_sys_config.c are dependencies due to the fact that I’m using the mos.yml getter and setters created at compile time.

When compiling mgos_sys_config.c I’m getting the above error about the compiler complaining about missing definitions. I’ve not been successful in discovering where these are coming from.

I’ve previously attempted to mock the functions unsuccessfully, might have to go back to that if I can’t work this one out

MGOS_APP and FW_ARCHITECTURE are macros defined in the platorms’ makefiles.
E.g ubuntu.

Thanks @nliviu, solved!