Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
How to create multiple workers in ASMP? [spresense sdk(cli)]
-
Hello!
I'm currently working on an ASMP programs using the spresense SDK (cli).
I am wondering how to configure the directories and makefiles for multiple workers on multiple cores in cli and how to build them. -
Hi, @gyps
We are preparing the answer and will share it shortly with you
-
@CamilaSouza
Thank you for your time.
It will be very helpful. -
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).
-