[ABANDONED] Ozone v.2.70 and C++ Lambdas

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ABANDONED] Ozone v.2.70 and C++ Lambdas

    Hi,
    I just wonder if anyone is using C++ Lambdas and Ozone ?
    I tried, but Ozone stopped with the message : "An unexpected exception occurred and Ozone needs to close."... when starting up the project.
    I had no problem compiling it using C++14/GCC++ 8.2.1, and it runs fine on the target platform Cortex-M4 Kinetis K27F (downloaded by J-Flash).
    Sample code like this :

    #define LAMBDA // Ozone v2.70 crashes with LAMBDA defined!

    #ifndef LAMBDA
    // use a function instead of lambda
    static auto outOfRange(float value, float loMin, float hiMax)
    {
    return (value < loMin || value > hiMax);
    };
    #endif


    void Measurement::sample()
    {
    #ifdef LAMBDA
    // lambda function
    auto outOfRange = [] (auto value, auto loMin, auto hiMax) { return (value < loMin || value > hiMax);};
    #endif

    const auto chargeOutOfRange = outOfRange(getChargeCurrent(), maxChargeCurrentLimit() - chargeCurrentToleranseLimit(), maxChargeCurrentLimit() + chargeCurrentToleranseLimit());
    const auto dischargeOutOrRange = outOfRange(getDischargeCurrent(),minDischargeCurrentLimit(), maxDischargeCurrentLimit());
    ....
    }


    Regards,
    Eldar
  • Hello Eldar,

    Thank you for your inquiry.
    Such an issue is not known to us.
    Could you provide an example project for reproduction that would run on an eval board?

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.