acassis commented on code in PR #7661:
URL: https://github.com/apache/incubator-nuttx/pull/7661#discussion_r1031771614


##########
arch/risc-v/src/esp32c3/esp32c3_start.c:
##########
@@ -136,6 +177,30 @@ uintptr_t g_idle_topstack = ESP32C3_IDLESTACK_TOP;
  * Private Functions
  ****************************************************************************/
 
+/****************************************************************************
+ * Name: setup_syscall_table
+ *
+ * Description:
+ *   Configure the syscall table used by the ROM code for calling C library
+ *   functions.
+ *   ESP32-C3 ROM code contains implementations of some of C library
+ *   functions. Whenever a function in ROM needs to use a syscall, it calls
+ *   a pointer to the corresponding syscall implementation defined in the
+ *   syscall_stub_table struct.
+ *
+ * Input Parameters:
+ *   None.
+ *
+ * Returned Value:
+ *   None.
+ *
+ ****************************************************************************/
+
+static void setup_syscall_table(void)
+{
+  syscall_table_ptr = &g_stub_table;

Review Comment:
   Yes, the basic idea of it is to force the ROM functions to use the system 
(NuttX) libc instead of using the internal newlibc implemented in the ROM code.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to