-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates and fixes to support IPM sample on ESP32: - fix IPM sample code for APPCPU and PROCPU - align with memory layout, add flash awarenes - shell commands to stop/start APPCPU - reorganize overlays Signed-off-by: Marek Matej <[email protected]>
- Loading branch information
Marek Matej
committed
Nov 5, 2024
1 parent
e24f57c
commit c8c9a15
Showing
10 changed files
with
99 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
CONFIG_HEAP_MEM_POOL_SIZE=2048 | ||
CONFIG_MAIN_STACK_SIZE=4096 | ||
CONFIG_IPM=y |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
&ipm0 { | ||
status = "okay"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <stdlib.h> | ||
|
||
#include <zephyr/device.h> | ||
#include <zephyr/drivers/gpio.h> | ||
#include <zephyr/drivers/regulator.h> | ||
#include <zephyr/drivers/watchdog.h> | ||
#include <zephyr/dt-bindings/gpio/nordic-npm6001-gpio.h> | ||
#include <zephyr/dt-bindings/regulator/npm6001.h> | ||
#include <zephyr/posix/unistd.h> | ||
#include <zephyr/shell/shell.h> | ||
#include <zephyr/sys/printk.h> | ||
|
||
/* Command usage info. */ | ||
#define START_HELP ("<cmd>\n\nStart the APPCPU") | ||
#define STOP_HELP ("<cmd>\n\nStop the APPCPU") | ||
|
||
void esp_appcpu_image_start(unsigned int hdr_offset); | ||
void esp_appcpu_image_stop(void); | ||
|
||
static int cmd_appcpu_start(const struct shell *sh, size_t argc, char *argv[]) | ||
{ | ||
ARG_UNUSED(sh); | ||
ARG_UNUSED(argc); | ||
ARG_UNUSED(argv); | ||
|
||
printk("start appcpu\n"); | ||
|
||
esp_appcpu_image_start(0x20); | ||
|
||
return 0; | ||
} | ||
|
||
static int cmd_appcpu_stop(const struct shell *sh, size_t argc, char *argv[]) | ||
{ | ||
ARG_UNUSED(sh); | ||
ARG_UNUSED(argc); | ||
ARG_UNUSED(argv); | ||
|
||
printk("stop appcpu\n"); | ||
|
||
esp_appcpu_image_stop(); | ||
|
||
return 0; | ||
} | ||
|
||
SHELL_STATIC_SUBCMD_SET_CREATE(sub_amp, | ||
/* Alphabetically sorted to ensure correct Tab autocompletion. */ | ||
SHELL_CMD_ARG(appstart, NULL, START_HELP, cmd_appcpu_start, 1, 0), | ||
SHELL_CMD_ARG(appstop, NULL, STOP_HELP, cmd_appcpu_stop, 1, 0), | ||
SHELL_SUBCMD_SET_END /* Array terminated. */ | ||
); | ||
|
||
SHELL_CMD_REGISTER(amp, &sub_amp, "AMP debug commands.", NULL); |