2

I'm using MicroPython and I would like to generate a QSTR that contains the contents of a macro. For example, I have the following macro:

#define MY_MACRO "hello"

How can I generate a QSTR that has the value "hello" and is called MP_QSTR_MY_MACRO?

When I use MP_QSTR_MY_MACRO, that QSTR contains "MY_MACRO" instead of "hello".

Pablo
  • 121
  • 4
  • You may also want to ask over on the [micropython discussions](https://github.com/orgs/micropython/discussions). – larsks Mar 04 '23 at 02:45

0 Answers0