Nios® V Processor Software Developer Handbook

ID 743810
Date 5/26/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

13.2.1.3. niosv-app

Synopsis

niosv-app [OPTIONS] --srcs=<value>

Description

Generate an application or library CMakeLists.txt. Either an application (-a) or library (-l) must be created. The BSP directory (-b) is required when creating an application. Libraries are independent of BSP; they do not link directly with a BSP.

Usage

#Create an app project which links with a specified BSP
niosv-app -a=app_dir -b=bsp_dir -s=sources[OPTIONS]
#Create a library
niosv-app -l=lib_dir -s=sources -p=public_includes [OPTIONS] 

Example: niosv-app --bsp-dir=software/bsp --app-dir=software/app --srcs=software/app --elf-name=hello.elf

Options

Options Description
-a, --app-dir=<value>
  • Optional.
  • The application directory
-l, --lib-dir=<value>
  • Optional.
  • The library directory.
-b, --bsp-dir=<value>
  • Optional.
  • The Board Support Package (BSP) directory
-s, --srcs=<value>
  • Required.
  • Comma-separated list of sources files (.c, .h, etc.) or source directories.
  • Source directories includes child source files(not recursive).
-i, --incs=<value>
  • Optional.
  • Comma-separated list of include directories.
-p, --public-incs=<value>
  • Optional.
  • Comma-separated list of public include directories.
  • These public include directories are made available to dependent applications or libraries.
-e, --elf-name=<value>
  • Optional.
  • Choose a name for the .elf file that results from compiling the application.
-L, --link-lib=<value>
  • Optional.
  • Repeatable.
  • The specified library directory links with this application or library.
  • May be specified multiple times.
--jvm-max-heap-size=<value>
  • Optional.
  • The maximum memory size to be used for allocations when running this tool.
  • This value is specified as <size><unit> where unit can be m (or M) for multiples of megabytes or g (or G) for multiples of gigabytes.
  • The default value is 512m.
-h, --help
  • Optional.
  • Display help for this tool