Sony's Developer World forum

    • Home
    • Forum guidelines

    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)]

    Spresense
    2
    4
    1110
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      gyps last edited by

      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.

      C 1 Reply Last reply Reply Quote
      • C
        CamilaSouza DeveloperWorld @gyps last edited by CamilaSouza

        Hi, @gyps

        We are preparing the answer and will share it shortly with you 🙂

        G 1 Reply Last reply Reply Quote
        • G
          gyps @CamilaSouza last edited by

          @CamilaSouza
          Thank you for your time.
          It will be very helpful.

          C 1 Reply Last reply Reply Quote
          • C
            CamilaSouza DeveloperWorld @gyps last edited by

            Hi @gyps

            Sorry for the delayed answer.
            Here is a basic way to add another worker:

            1. Copy hello directory under spresense/examples/asmp/worker/hello with another name in the same directory
              (For example: hello2)

            2. 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)

            3. 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).

            1 Reply Last reply Reply Quote
            • First post
              Last post
            Developer World
            Copyright © 2021 Sony Group Corporation. All rights reserved.
            • Contact us
            • Legal