Nios® V Embedded Processor Design Handbook

ID 726952
Date 5/13/2024
Public
Document Table of Contents

7.3.3.4. Creating Multiple Application Projects

  1. Download the example source code using the link below.
  2. Navigate to the software/app folder and copy the example source codes.
  3. Change the default name of Mailbox Client Intel FPGA IP (MAILBOX_NAME) based on the system.h file, in the following locations:
    1. The example source codes
      • Example Source Codes (application.c and factory.c)
        int main(void)
        {
        	…		
        	fd = mailbox_client_open(MAILBOX_NAME);
        	…
        } 
        
    2. bsp/drivers/src/altera_s10_mailbox_client_flash_rsu.c
      • int plat_qspi_init(struct qspi_ll_intf **qspi_intf)
        {
        …
        #ifdef MAILBOX_NAME
            	/* retrieve data from flash */
            	fd = mailbox_client_open(MAILBOX_NAME);
        #endif
        …
        } 
        
    3. bsp/drivers/src/altera_s10_mailbox_client_rsu.c
      • int plat_mbox_init(struct mbox_ll_intf **mbox_intf)
        {
        …
        #ifdef MAILBOX_NAME
            	fd = mailbox_client_open(MAILBOX_NAME);
        #endif
        …
        } 
        
  4. Launch the Nios V Command Shell.
  5. Execute the command below to generate the user application CMakeLists.txt.
    //For Application Image
    niosv-app --app-dir=software/app --bsp-dir=software/bsp \
    --srcs=software/app/application.c,zlib/crc32.c \
    --incs=zlib
    
    //For Factory Image
    niosv-app --app-dir=software/app --bsp-dir=software/bsp \
    --srcs=software/app/factory.c,zlib/crc32.c \
    --incs=zlib