From dbde5488753f0462fc76e00840c41f91e0cd150a Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Fri, 21 Jun 2024 09:15:37 +0200 Subject: [PATCH] docs(lp-core): Added a note about how shared variables are initialized This commit adds a note to the ULP RISC-V and LP-Core docs regarding how shared variables are initialized. --- docs/en/api-reference/system/ulp-lp-core.rst | 4 ++++ docs/en/api-reference/system/ulp-risc-v.rst | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/docs/en/api-reference/system/ulp-lp-core.rst b/docs/en/api-reference/system/ulp-lp-core.rst index cc131a1a80..432755e4dd 100644 --- a/docs/en/api-reference/system/ulp-lp-core.rst +++ b/docs/en/api-reference/system/ulp-lp-core.rst @@ -97,6 +97,10 @@ To access the ULP LP-Core program variables from the main program, the generated ulp_measurement_count = 64; } +.. note:: + + Variables declared in the global scope of the LP-Core program reside in either the ``.bss`` or ``.data`` section of the binary. These sections are initialized when the LP-Core binary is loaded and executed. Accessing these variables from the main program on the HP-Core before the first LP-Core run may result in undefined behavior. + Starting the ULP LP-Core Program -------------------------------- diff --git a/docs/en/api-reference/system/ulp-risc-v.rst b/docs/en/api-reference/system/ulp-risc-v.rst index 377ab15150..7b78fca499 100644 --- a/docs/en/api-reference/system/ulp-risc-v.rst +++ b/docs/en/api-reference/system/ulp-risc-v.rst @@ -103,6 +103,11 @@ To access the ULP RISC-V program variables from the main program, the generated ulp_measurement_count = 64; } +.. note:: + + Variables declared in the global scope of the ULP RISC-V program reside in either the ``.bss`` or ``.data`` section of the binary. These sections are initialized when the ULP RISC-V binary is loaded and executed. Accessing these variables from the main program on the main CPU before the first ULP RISC-V run may result in undefined behavior. + + Mutual Exclusion ^^^^^^^^^^^^^^^^