home Forums # Technical Support Fuzzy Engine in ARM MCU?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #2669


    I would like to compile/use the Fuzzy engine in an embedded environment where Embedded Linux may not be an option for me. I don’t need “console” access to the engine–basically I would like the MCU to use the Fuzzy Engine to control a piece of hardware. Do you know which .cpp files I would need to include in my embedded MCU compiler to make this work?



    I was able to get the source code compiling with my embedded compiler.

    The following were three changes required for me to get it compiling:

    1) I needed to add “std::” scoping to a few items for my compiler to be happy [namely std::ext() and std::va_list].
    2) In “Bell.cpp”, my compiler complained that “std::pow” function had multiple matches of the overloaded function, so I changed it to “std::powf” for my application
    3) In “Consequent.cpp” and “Last.cpp” my compiler does not have an operator overload for “!=” on reverse iterators.
    3a) In “Last.cpp” the following block of code it != ruleBlock->rules().rend(); ++it) { changed to (it.base() - 1) != (ruleBlock->rules().rend().base() - 1); ++it) {
    3b) in “Consequent.cpp” the following block of code rit != proposition->hedges.rend(); ++rit) { changed to (rit.base() - 1) != (proposition->hedges.rend().base() - 1); ++rit) {

    My biggest concern are changes that I had to make for item #3 above. Is this the proper way of updating for reverse iterators, or would you suggest an alternative way?



    thank you very much for your post. Please excuse me for the delay responding.

    I am not too fond of reverse iterators using -1 because the data type (as far as I can remember) is an unsigned int (std::size_t), and then subtracting 1 to an empty iterator would result in the maximum long value (https://stackoverflow.com/questions/7221409/is-unsigned-integer-subtraction-defined-behavior).

    It would be nice to see the docs of your compiler to make sure the whole thing works.


Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.