Replace Zephyr for µTVM

I tried to get the µTVM example to run on the Cypress PSoC 6 boards, but failed.

The hope was to get the main program loop running on the M0+ core, while the M4 would run the more demanding neural networks (on demand, not always).

However, the support for PSoC boards in zephyr seems to be limited, as I was not able to compile example for it and zephyr is limited in the flashing capabilities, which would be a problem for autoTVM.

Cypress has its own IDE with the ModusToolbox, which has more options in regards to the flashing and debugging flow, compared to zephyr, but I could not find any RTOS components in it.

What do I need to modify to replace zehpyr with a complete bare-metal approach? I remember reading about it either here or in the docs, as I found a link to this class platform.h, but it seems like it is lacking any mini RPC methods?

Hi Max,

I’m afraid at the moment it will be a pretty heavy lift. At minimum, you will need to provide:

  • An replacement for the ZephyrCompiler class in Python which wraps the Cypress toolchain;
  • A Cypress-compatible implementation of the Zephyr runtime included in TVM, which access TVM RPC commands over the serial port and can be controlled by the host;
  • Probably a few other bits and bobs to glue together Cypress’ toolchain with the microTVM core.

This is obviously not ideal and we are working on making it easier to add support for new platforms. @areusch no doubt has thoughts on this as well.

1 Like

hi @max1996,

yeah as @mdw-octoml said, this is a bit challenging. i’m prototyping the Project API (embryonic RFC) now, which is designed to make work like this easier. maybe keep an eye out for that in the next few days/week. It would be particularly helpful for people to try implementing it with different toolkits to find limitations and bugs.

Andrew

1 Like