Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

Overriding MONGOOSE_FEATURES

Hello Cesanta,

We are developing a C-based Mongoose-IoT application for CC3200. The build process uses the docker-based Makefile + Makefile.build approach. However we now need to set different MONGOOSE_FEATURES, specifically, we remove -DMG_DISABLE_FILESYSTEM and -DMG_DISABLE_COAP. We'll probably need digest http auth as well.

At this point, this either requires using our own set of Makefiles or modifying the makefiles in mongoose-iot.

Is there a better approach to do this? Can you make the make variables overridable, or recommend a way for us to customize build flags without needing to maintain a changeset on top of mongoose-iot?

Thanks!

Comments

  • rojerrojer Dublin, Ireland

    in https://github.com/cesanta/mongoose-iot/commit/ec1481fae338fad0762c934c35d68596e422797b renamed the variable to MG_FEATURES and made it overrideable

  • xxcnxxcn Sofia

    To be able to build out-of-tree applications, can you please make APP_PATH overridable in Makefile.build for PLATFORM=cc3200?

  • xxcnxxcn Sofia

    Also, we want to serve static content from the SPIFFS image over http, but if we remove -DMG_DISABLE_FILESYSTEM compiling mongoose.c fails due to missing rmdir and fseeko functions. Maybe serving static content is supposed to work through a different code path?

  • SergeySergey Dublin, Ireland

    @xxcn

    rmdir() is used for DAV support. I guess you don't need it, so -DMG_DISABLE_DAV.
    fseeko() is used to have resumed download, i.e. Range: header support. I guess you can just add a stub that fails that call.

  • xxcnxxcn Sofia

    -DMG_DISABLE_DAV was what we needed. Strange it isn't in MG_FEATURES_TINY. Thanks!

  • SergeySergey Dublin, Ireland

    yeah makes sense. let me send a PR for that.

  • xxcnxxcn Sofia

    -DMG_DISABLE_COAP spits out some warnings and the build fails ...

  • xxcnxxcn Sofia

    @xxcn said:
    -DMG_DISABLE_COAP spits out some warnings and the build fails ...

    Read that as "Removing -DMG_DISABLE_COAP "...

  • SergeySergey Dublin, Ireland

    -DMG_DISABLE_DAV is now in tiny features.
    Could you elaborate more on -DMG_DISABLE_COAP please?
    It is already disabled in the tiny features, what exactly build fails for you?

  • xxcnxxcn Sofia

    Sorry, -DMG_ENABLE_COAP, my bad.

Sign In or Register to comment.