11# SOME DESCRIPTIVE TITLE.
2- # Copyright (C) - The MicroPython Documentation is Copyright © 2014-2024 ,
2+ # Copyright (C) - The MicroPython Documentation is Copyright © 2014-2025 ,
33# Damien P. George, Paul Sokolovsky, and contributors
44# This file is distributed under the same license as the MicroPython
55# package.
6- # FIRST AUTHOR <EMAIL@ADDRESS>, 2024 .
6+ # FIRST AUTHOR <EMAIL@ADDRESS>, 2025 .
77#
88#, fuzzy
99msgid ""
1010msgstr ""
1111"Project-Id-Version : MicroPython latest\n "
1212"Report-Msgid-Bugs-To : \n "
13- "POT-Creation-Date : 2024-12-29 14:37 +0900\n "
14- "PO-Revision-Date : 2024-12-29 14:52 +0900\n "
13+ "POT-Creation-Date : 2025-03-20 21:51 +0900\n "
14+ "PO-Revision-Date : 2025-03-20 22:14 +0900\n "
1515"Last-Translator : Minoru Inachi\n "
1616"Language : ja\n "
1717"Plural-Forms : nplurals=1; plural=0;\n "
@@ -2681,6 +2681,24 @@ msgstr ""
26812681
26822682#: ../../develop/natmod.rst:73
26832683msgid ""
2684+ "The native module is not automatically linked against the standard static"
2685+ " libraries like ``libm.a`` and ``libgcc.a``, which can lead to "
2686+ "``undefined symbol`` errors. You can link the runtime libraries by "
2687+ "setting ``LINK_RUNTIME = 1`` in your Makefile. Custom static libraries "
2688+ "can also be linked by adding ``MPY_LD_FLAGS += -l path/to/library.a``. "
2689+ "Note that these are linked into the native module and will not be shared "
2690+ "with other modules or the system."
2691+ msgstr ""
2692+ "ネイティブモジュールは ``libm.a`` や ``libgcc.a`` などの標準の静的ライブラリに"
2693+ "自動的にはリンクされません。そのため ``undefined symbol`` (未定義シンボル)エラーが"
2694+ "発生する可能性があります。ランタイムライブラリをリンクするには Makefile 内で "
2695+ "``LINK_RUNTIME = 1`` を設定してください。また、カスタムの静的ライブラリを"
2696+ "リンクするには ``MPY_LD_FLAGS += -l path/to/library.a`` を追加します。"
2697+ "ただし、これらはネイティブモジュールにリンクされるのみで、他のモジュールやシステムと"
2698+ "共有されることはありません。"
2699+
2700+ #: ../../develop/natmod.rst:80
2701+ msgid ""
26842702"Linker limitation: the native module is not linked against the symbol "
26852703"table of the full MicroPython firmware. Rather, it is linked against an "
26862704"explicit table of exported symbols found in ``mp_fun_table`` (in "
@@ -2694,7 +2712,7 @@ msgstr ""
26942712"対してリンクされており、これはファームウェアのビルド時に決まってしまいます。"
26952713"したがって、たとえば任意の HAL/OS/RTOS/システムの関数を単純に呼び出すことはできません。"
26962714
2697- #: ../../develop/natmod.rst:79
2715+ #: ../../develop/natmod.rst:86
26982716msgid ""
26992717"New symbols can be added to the end of the table and the firmware "
27002718"rebuilt. The symbols also need to be added to ``tools/mpy_ld.py``'s "
@@ -2711,11 +2729,11 @@ msgstr ""
27112729"シンボルが関数の場合には、マクロまたはスタブを ``py/dynruntime.h`` に追加して、"
27122730"関数を簡単に呼び出せるようにする必要があります。"
27132731
2714- #: ../../develop/natmod.rst:87
2732+ #: ../../develop/natmod.rst:94
27152733msgid "Defining a native module"
27162734msgstr "ネイティブモジュールの定義"
27172735
2718- #: ../../develop/natmod.rst:89
2736+ #: ../../develop/natmod.rst:96
27192737msgid ""
27202738"A native .mpy module is defined by a set of files that are used to build "
27212739"the .mpy. The filesystem layout consists of two main parts, the source "
@@ -2725,7 +2743,7 @@ msgstr ""
27252743"ファイルシステムのレイアウトは、ソースファイルと Makefile の2つの主要部分で"
27262744"構成します。"
27272745
2728- #: ../../develop/natmod.rst:92
2746+ #: ../../develop/natmod.rst:99
27292747msgid ""
27302748"In the simplest case only a single C source file is required, which "
27312749"contains all the code that will be compiled into the .mpy module. This C"
@@ -2741,7 +2759,7 @@ msgstr ""
27412759"この関数は、モジュールのエントリポイントであり、モジュールがインポートされる"
27422760"ときに呼び出されます。"
27432761
2744- #: ../../develop/natmod.rst:98
2762+ #: ../../develop/natmod.rst:105
27452763msgid ""
27462764"The module can be split into multiple C source files if desired. Parts "
27472765"of the module can also be implemented in Python. All source files should"
@@ -2754,7 +2772,7 @@ msgstr ""
27542772"する必要があります(後述)。これには C ソースファイルと、結果の .mpy ファイルに含まれる "
27552773"Python ファイルの両方を含めます。"
27562774
2757- #: ../../develop/natmod.rst:104
2775+ #: ../../develop/natmod.rst:111
27582776msgid ""
27592777"The ``Makefile`` contains the build configuration for the module and list"
27602778" the source files used to build the .mpy module. It should define "
@@ -2771,11 +2789,11 @@ msgstr ""
27712789"ソースファイルの一覧を指定します。オプションでマシンアーキテクチャを指定するには変数 "
27722790"``ARCH`` を使います。さらに ``py/dynruntime.mk`` のインクルードも必要です。
27732791
2774- #: ../../develop/natmod.rst:112
2792+ #: ../../develop/natmod.rst:119
27752793msgid " Minimal example"
27762794msgstr "最小限の例"
27772795
2778- #: ../../develop/natmod.rst:114
2796+ #: ../../develop/natmod.rst:121
27792797msgid ""
27802798"This section provides a fully working example of a simple module named "
27812799"``factorial``. This module provides a single function "
@@ -2786,22 +2804,22 @@ msgstr ""
27862804"このモジュールは入力の階乗を計算して結果を返す単一の関数 ``factorial.factorial(x)`` "
27872805"を提供します。"
27882806
2789- #: ../../develop/natmod.rst:118
2807+ #: ../../develop/natmod.rst:125
27902808msgid "Directory layout::"
27912809msgstr "ディレクトリのレイアウト"
27922810
2793- #: ../../develop/natmod.rst:120
2811+ #: ../../develop/natmod.rst:127
27942812msgid ""
27952813"factorial/\n"
27962814"├── factorial.c\n"
27972815"└── Makefile"
27982816msgstr ""
27992817
2800- #: ../../develop/natmod.rst:124
2818+ #: ../../develop/natmod.rst:131
28012819msgid "The file ``factorial.c`` contains:"
28022820msgstr "ファイル ``factorial.c`` の内容は以下のとおりです:"
28032821
2804- #: ../../develop/natmod.rst:126
2822+ #: ../../develop/natmod.rst:133
28052823msgid ""
28062824"// Include the header file to get access to the MicroPython API\n"
28072825"#include \" py/dynruntime.h\" \n"
@@ -2877,11 +2895,11 @@ msgstr ""
28772895" MP_DYNRUNTIME_INIT_EXIT\n"
28782896"}"
28792897
2880- #: ../../develop/natmod.rst:163
2898+ #: ../../develop/natmod.rst:170
28812899msgid "The file ``Makefile`` contains:"
28822900msgstr "ファイル ``Makefile`` の内容は以下のとおりです:"
28832901
2884- #: ../../develop/natmod.rst:165
2902+ #: ../../develop/natmod.rst:172
28852903msgid ""
28862904"# Location of top-level MicroPython directory\n"
28872905"MPY_DIR = ../../..\n"
@@ -2915,68 +2933,68 @@ msgstr ""
29152933"# このインクルードにより、モジュールをコンパイル・リンクするルールを取得\n"
29162934"include $(MPY_DIR)/py/dynruntime.mk"
29172935
2918- #: ../../develop/natmod.rst:183
2936+ #: ../../develop/natmod.rst:190
29192937msgid "Compiling the module"
29202938msgstr "モジュールのコンパイル"
29212939
2922- #: ../../develop/natmod.rst:185
2940+ #: ../../develop/natmod.rst:192
29232941msgid "The prerequisite tools needed to build a native .mpy file are:"
29242942msgstr "ネイティブ .mpy ファイルをビルドするために必要となるツールは以下の通りです:"
29252943
2926- #: ../../develop/natmod.rst:187
2944+ #: ../../develop/natmod.rst:194
29272945msgid ""
29282946"The MicroPython repository (at least the ``py/`` and ``tools/`` "
29292947"directories)."
29302948msgstr ""
29312949"MicroPython リポジトリ(少なくとも ``py/`` と ``tools/`` ディレクトリ)。"
29322950
2933- #: ../../develop/natmod.rst:188
2951+ #: ../../develop/natmod.rst:195
29342952msgid ""
29352953"CPython 3, and the library pyelftools (eg ``pip install "
29362954"'pyelftools>=0.25'``)."
29372955msgstr ""
29382956"CPython 3 とライブラリ pyelftools (``pip install 'pyelftools>=0.25'`` "
29392957"などでインストール)。"
29402958
2941- #: ../../develop/natmod.rst:189
2959+ #: ../../develop/natmod.rst:196
29422960msgid "GNU make."
29432961msgstr ""
29442962
2945- #: ../../develop/natmod.rst:190
2963+ #: ../../develop/natmod.rst:197
29462964msgid "A C compiler for the target architecture (if C source is used)."
29472965msgstr "ターゲットアーキテクチャ用の C コンパイラ(C ソースが使われている場合)。"
29482966
2949- #: ../../develop/natmod.rst:191
2967+ #: ../../develop/natmod.rst:198
29502968msgid ""
29512969"Optionally ``mpy-cross``, built from the MicroPython repository (if .py "
29522970"source is used)."
29532971msgstr ""
29542972"オプションで MicroPython リポジトリでビルドした ``mpy-cross`` "
29552973"(.py ソースを使用している場合)。"
29562974
2957- #: ../../develop/natmod.rst:193
2975+ #: ../../develop/natmod.rst:200
29582976msgid ""
29592977"Be sure to select the correct ``ARCH`` for the target you are going to "
29602978"run on. Then build with::"
29612979msgstr ""
29622980"実行するターゲットに対して適切な ``ARCH`` を選択してください。ビルドは次のように行います::"
29632981
2964- #: ../../develop/natmod.rst:196
2982+ #: ../../develop/natmod.rst:203
29652983msgid "$ make"
29662984msgstr ""
29672985
2968- #: ../../develop/natmod.rst:198
2986+ #: ../../develop/natmod.rst:205
29692987msgid ""
29702988"Without modifying the Makefile you can specify the target architecture "
29712989"via::"
29722990msgstr ""
29732991"Makefile を変更しなくても、次のようにしてターゲットのアーキテクチャを指定できます::"
29742992
2975- #: ../../develop/natmod.rst:200
2993+ #: ../../develop/natmod.rst:207
29762994msgid "$ make ARCH=armv7m"
29772995msgstr ""
29782996
2979- #: ../../develop/natmod.rst:205
2997+ #: ../../develop/natmod.rst:212
29802998msgid ""
29812999"Once the module is built there should be a file called ``factorial.mpy``."
29823000" Copy this so it is accessible on the filesystem of your MicroPython "
@@ -2988,7 +3006,7 @@ msgstr ""
29883006"インポートパスで見つけられるようにします。これで作成したモジュールを、他のモジュールと"
29893007"同じように Python でアクセスできるようになります。例えば次のように使います::"
29903008
2991- #: ../../develop/natmod.rst:210
3009+ #: ../../develop/natmod.rst:217
29923010msgid ""
29933011"import factorial\n"
29943012"print(factorial.factorial(10))\n"
@@ -2998,43 +3016,43 @@ msgstr ""
29983016"print(factorial.factorial(10))\n"
29993017"# 3628800 が表示されるはず"
30003018
3001- #: ../../develop/natmod.rst:215
3019+ #: ../../develop/natmod.rst:222
30023020msgid "Further examples"
30033021msgstr "さらなる例"
30043022
3005- #: ../../develop/natmod.rst:217
3023+ #: ../../develop/natmod.rst:224
30063024msgid ""
30073025"See ``examples/natmod/`` for further examples which show many of the "
30083026"available features of native .mpy modules. Such features include:"
30093027msgstr ""
30103028"ネイティブ .mpy モジュールで利用可能な機能の多くを示すさらなる例については "
30113029"``examples/natmod/`` を参照してください。以下の例があります:"
30123030
3013- #: ../../develop/natmod.rst:220
3031+ #: ../../develop/natmod.rst:227
30143032msgid "using multiple C source files"
30153033msgstr "複数の C ソースファイルの利用"
30163034
3017- #: ../../develop/natmod.rst:221
3035+ #: ../../develop/natmod.rst:228
30183036msgid "including Python code alongside C code"
30193037msgstr "C コード と Python コードを一緒に含める"
30203038
3021- #: ../../develop/natmod.rst:222
3039+ #: ../../develop/natmod.rst:229
30223040msgid "rodata and BSS data"
30233041msgstr "rodata と BSS データ"
30243042
3025- #: ../../develop/natmod.rst:223
3043+ #: ../../develop/natmod.rst:230
30263044msgid "memory allocation"
30273045msgstr "メモリー割り当て"
30283046
3029- #: ../../develop/natmod.rst:224
3047+ #: ../../develop/natmod.rst:231
30303048msgid "use of floating point"
30313049msgstr "浮動小数点の利用"
30323050
3033- #: ../../develop/natmod.rst:225
3051+ #: ../../develop/natmod.rst:232
30343052msgid "exception handling"
30353053msgstr "例外処理"
30363054
3037- #: ../../develop/natmod.rst:226
3055+ #: ../../develop/natmod.rst:233
30383056msgid "including external C libraries"
30393057msgstr "外部 C ライブラリの取り込み"
30403058
0 commit comments