Hi @gyps
Sorry for the delayed answer.
Here is a basic way to add another worker:
Copy hello directory under spresense/examples/asmp/worker/hello with another name in the same directory
(For example: hello2)
Rename the target binary name in the Makefile in the directory you copied
(For example:
Under spresense/examples/asmp/worker/hello2/Makefile
Line 50:
BIN = hello2)
Add a new target (hello2) in worker/Makefile in WORKER_ELFS parameter
(For example:
Under spresense/examples/asmp/worker/Makefile
Line 40:
WORKER_ELFS = hello/hello hello2/hello2
Line 73:
# Build workers
hello/hello: lib
$(Q) $(MAKE) -C $(dir $@) TOPDIR="$(TOPDIR)" SDKDIR="$(SDKDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV)
hello2/hello2: lib
$(Q) $(MAKE) -C $(dir $@) TOPDIR="$(TOPDIR)" SDKDIR="$(SDKDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV)
)
Then, build.
OBS:
In current asmp example, worker binaries are stored in ROM-FS. If the you want to use the SD Card for storing worker binaries, you need to remove FS_ROM config and add CXD56_SDIO config, and modify worker/Makefile to avoid making romfs.h.
To do so, binary of each worker is generated in the worker directory. (In this case, hello/hello and hello2/hello2).