Error installing Amazon FreeRTOS on a Mac; Error compiling Cython file

0

A couple of years ago, my company contracted with an agency to create firmware for our device to talk to IoT services. The device is based on an ESP32 chip and I know the firmware developer used Amazon FreeRTOS. The agency is no longer available, but I have their source code and I need to be able to build it so I can modify it. Unfortunately, firmware is not my ususal area of expertise.

At the moment I am carefully following these instructions: https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_espressif.html

When I reach step 3c under MacOS, the script runs for a while but then crashes with a very long error message. I believe the root cause of the problem is "Error compiing Cython file". Actually there are several such errors. The first one reads, "Cannot convert 'ev_watcher *' to Python object".

I don't know why this is happening or what I'm supposed to do to fix it.

  • If doing this on a Mac is a problem, I can switch to Windows or Linux. Whatever works to get it done.

Frank
asked 3 months ago138 views
2 Answers
1
Accepted Answer

After much struggling, switching build tools, etc. I did get this to compile.

I notice that there is a non-deprecated FreeRTOS on Github that is different from amaon-freertos. Should I switch to using that one?

Frank
answered 3 months ago
profile picture
EXPERT
reviewed a month ago
  • The amazon-freertos repo doesn't actually contain FreeRTOS (it just includes it as a git sub-module). The amazon-freertos repo just contains reference examples for various vendor development boards. So it shows you how to build complete binaries that use FreeRTOS and connect to AWS IoT Core. The FreeRTOS org and repos you see on GitHub have always been where to find FreeRTOS itself. You can find newer and maintained reference examples in that org: https://github.com/FreeRTOS?q=reference&type=all&language=&sort=

1

Hi Frank. If I understand correctly, you're trying to build your company's repo, not the amazon-freertos repo. Please be aware that both the amazon-freertos repo and that getting started page are deprecated. And ESP IDF 4.2 is EOL. So the build steps are perhaps stale. For instance, the ESP IDF prereqs page seems to have been written in the time of Catalina: https://docs.espressif.com/projects/esp-idf/en/release-v4.2/esp32/get-started/macos-setup.html. And your contractor may have changed things anyway.

In any case, is this your issue? https://github.com/espressif/esp-idf/issues/12322. If so, you should be able to follow the discussion there to resolve it.

I don't have a Mac to try to replicate. In my experience, it's unusual that a firmware developer would use a Mac. Perhaps your contractor was building under Windows or Linux? If so, you may meet more success if you can spin up a virtual environment and try to build under one of those operating systems.

profile pictureAWS
EXPERT
Greg_B
answered 3 months ago
  • Thanks for the response. I am working from some sparse notes left by the prior developers and the first thing they want me to do is install Amazon FreeRTOS, so I haven't even gotten to the point of building my own code yet. I'll take a look at these links and retry this on Linux or Windows if I can't get anywhere with the Mac.

    As you might expect, I am disappointed to find that the firmware we had made for us less than two years ago is using an obsolete framework. In the event we decide to have someone create new firmware from scratch, what should we be looking for them to use instead?

  • This does look like the same error I'm getting (Requirements to build wheel did not run successfully). I am not sure I understand the solution, if any.

  • Getting the exact same error running this on Linux.

  • What version of Linux? In that issue, the reporter seemed to resolve the problem by upgrading the patch version of ESP IDF. Alternately, if you create a VM of an older OS, like Ubuntu 18.04, I think the build may work.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions