Oliver Fabel 1 год назад
Родитель
Сommit
42a1fd1d8a
3 измененных файлов с 14 добавлено и 26 удалено
  1. 0 26
      .vscode/settings.json
  2. 12 0
      application.fam
  3. 2 0
      py_app.h

+ 0 - 26
.vscode/settings.json

@@ -1,26 +0,0 @@
-// This file is autogeneated by the ufbt.
-// You can modify it, and it will not be overwritten if exists.
-// Some paths are absolute, and will need to be updated if you move the project.
-// To regenerate the file, delete it and run `ufbt vscode_dist` again.
-{
-    "cortex-debug.enableTelemetry": false,
-    "cortex-debug.variableUseNaturalFormat": false,
-    "cortex-debug.showRTOS": true,
-    "cortex-debug.armToolchainPath": "/home/ofa/.ufbt/toolchain/x86_64-linux/bin",
-    "cortex-debug.openocdPath": "/home/ofa/.ufbt/toolchain/x86_64-linux/bin/openocd",
-    "cortex-debug.gdbPath": "/home/ofa/.ufbt/toolchain/x86_64-linux/bin/arm-none-eabi-gdb-py3",
-    "editor.formatOnSave": true,
-    "files.associations": {
-        "*.scons": "python",
-        "SConscript": "python",
-        "SConstruct": "python",
-        "*.fam": "python",
-        "string.h": "c",
-        "stdint.h": "c"
-    },
-    "cortex-debug.registerUseNaturalFormat": false,
-    "python.analysis.typeCheckingMode": "off",
-    "[python]": {
-        "editor.defaultFormatter": "ms-python.black-formatter"
-    }
-}

+ 12 - 0
application.fam

@@ -12,6 +12,10 @@ App(
     fap_file_assets="examples",
     # fap_weburl="https://github.com/user/funky_flipper_app",
     # fap_icon_assets="images",  # Image assets to compile for this application
+    cdefines=[
+        "MP_FLIPPER_RUNTIME",
+        "MP_FLIPPER_COMPILER",
+    ],
     sources=[
         "*.c*",
         "!./lib/micropython",
@@ -19,6 +23,10 @@ App(
     fap_private_libs=[
         Lib(
             name="micropython",
+            cdefines=[
+                "MP_FLIPPER_RUNTIME",
+                "MP_FLIPPER_COMPILER",
+            ],
             cflags=[
                 "-Wno-error",
                 "-w",
@@ -36,6 +44,10 @@ App(
         ),
         Lib(
             name="micropython-port",
+            cdefines=[
+                "MP_FLIPPER_RUNTIME",
+                "MP_FLIPPER_COMPILER",
+            ],
             cflags=[
                 "-Wno-error",
                 "-w",

+ 2 - 0
py_app.h

@@ -1,3 +1,5 @@
+#pragma once
+
 #include <furi.h>
 
 #define TAG "uPython"