Specifications

#
# example_sw_package_sw.tcl
#
# Create a software package known as "example_sw_package"
create_sw_package example_sw_package
# The version of this software
set_sw_property version 14.1
# Location in generated BSP that sources should be copied into
set_sw_property bsp_subdirectory Example_SW_Package
#
# Source file listings...
#
# C/C++ source files
#add_sw_property c_source EXAMPLE_SW_PACKAGE/src/my_source.c
# Include files
add_sw_property include_source
EXAMPLE_SW_PACKAGE/inc/example_sw_package.h
# Lib files
add_sw_property lib_source
EXAMPLE_SW_PACKAGE/lib/libexample_sw_package_library.a
# Include paths for headers which define the APIs for this package
# to share w/ app & bsp
# Include paths are relative to the location of this software
# package tcl file
add_sw_property include_directory EXAMPLE_SW_PACKAGE/inc
# This driver supports HAL & UCOSII BSP (OS) types
add_sw_property supported_bsp_type HAL
add_sw_property supported_bsp_type UCOSII
# Add example software package system.h setting to the BSP:
add_sw_setting quoted_string system_h_define \
example_sw_package_system_value EXAMPLE_SW_PACKAGE_SYSTEM_VALUE 1 \
"Example software package system value"
# End of file
6. In the SBT for Eclipse, create a Nios II application and BSP project based on the Hello World template.
Set the application project name to hello_example_sw_package.
7. Create a new C file named hello_example_sw_package.c in the new application project containing the
following code:
/*
* "Hello World" example.
*
NII5V2
2015.05.14
Creating a Software Package
2-27
Getting Started with the Graphical User Interface
Altera Corporation
Send Feedback