You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/07/27 10:18:47 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4233: board/ctrl: Add BOARDIOC_LOAD_APPIMAGE for loading an application image

gustavonihei commented on a change in pull request #4233:
URL: https://github.com/apache/incubator-nuttx/pull/4233#discussion_r677315552



##########
File path: include/nuttx/board.h
##########
@@ -331,6 +331,28 @@ int board_uniquekey(FAR uint8_t *uniquekey);
 int board_switch_boot(FAR const char *system);
 #endif
 
+/****************************************************************************
+ * Name:  board_load_appimage
+ *
+ * Description:
+ *   Load an application image from a given load address and perform the
+ *   required actions for executing it (e.g. loading the Program Counter
+ *   register with the application image entry point address).
+ *
+ * Input Parameters:
+ *   loadaddr - Load address of the application image
+ *
+ * Returned Value:
+ *   If this function returns, then it was not possible to load the
+ *   application image due to some constraints. The return value in this case
+ *   is a board-specific reason for the failure.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_BOARDCTL_LOAD_APPIMAGE
+int board_load_appimage(uintptr_t loadaddr);

Review comment:
       Actually, this interface makes no assumption regarding whether the code will be executed in place or from RAM.
   The `loadaddr` parameter refers to the base address of the application image on the flash storage.
   The implementation of `board_load_appimage` may decide whether to copy the image from the load address into RAM, or to execute in place by simply overriding the PC with the application image entry point.




-- 
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-unsubscribe@nuttx.apache.org

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