From 79ebafbbf27caf133ebc4ec8cb9cd8f894a977f8 Mon Sep 17 00:00:00 2001 From: bskp Date: Sun, 22 Sep 2019 21:11:18 +0200 Subject: [PATCH] Removed amending step of qstrdefsport.h As of commit https://github.com/micropython/micropython/commit/d76c65f599b77aa275eda3d2248cde16f6be7e10, constant strings are auto-generated. The ones remaining in ``qstrdefsport.h``contain special characters and cannot easily be auto-generated (according to my limited understanding of the process). --- adding-module.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/adding-module.rst b/adding-module.rst index bd9e2ff..c62b63b 100644 --- a/adding-module.rst +++ b/adding-module.rst @@ -133,10 +133,11 @@ actually add that function object to our module: Micropython uses the QSTR-macros to define constant strings. This is used to identify strings and store only unique ones for preserving memory (as it is -very limited on the PyBoard-Hardware). Your port has a file ``qstrdefsport.h``. -In our case add ``Q(hello)`` to the list (on a new line). This will define the -string ``hello`` for Micropython. Failing to do so will result in a missing -file on compilation. +very limited on the PyBoard-Hardware). +The string ``hello`` will be auto-generated by ``py/makeqstrdata.py`` upon +compilation. This may fail if a string contains special characters; In this +case, add ``Q(the_funky+string<>)`` to ``qstrdefsport.h``. Failing to do so will +result in a missing file on compilation. Now when you compile and flash the firmware, you will be able to import the module and call the function inside it.