Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Edit Typo and Style.

...

This document describes the the project generator for application projects.
Beside that the generator for the GOAL web server is described.

...

GOAL projects consist of a Makefile and are build using the make utility.
Changes regarding features or files need to be done within the project
Makefile.

Following an example project file:

Code Block
## @file
#
# @brief
# Generic Makefile
#
# The output will be stored in the directory build/.
#
# @copyright
# Copyright 20202021 port GmbH Halle/Saale.
# This software is protected Intellectual Property and may only be used
# according to the license agreement.
#


# paths
PWD = $(shell pwd)
GOAL = $(PWD)/../../../../..
APPL = appl/2015013_irj45/ac/09_ecat_slave
TGTS = $(PWD)/targets

# features
CONFIG_MAKE_FEAT_MCTC_AC = 1
CONFIG_MAKE_FEAT_GOAL_ECAT = 1
CONFIG_MAKE_FEAT_DD_CTC_AC = 1
CONFIG_MAKE_FEAT_LM_EMIT_MA_UART = 1
CONFIG_MAKE_FEAT_HTTP = 1

# files
SRC_C += \
    $(APPL)/goal_appl.c \
    $(APPL)/../../rpc/ccm_rpc_ac.c \
    $(APPL)/goal_appl_ecat.c \
    $(APPL)/goal_appl_ecat_objects.c \
    $(APPL)/goal_appl_foe.c \
    $(APPL)/goal_appl_http.c

INC_C_FILES += \
    $(APPL)/../../rpc/ccm_rpc_ac.h \
    $(APPL)/../../rpc/ccm_rpc.h \
    $(APPL)/goal_appl_ecat.h \
    $(APPL)/goal_appl_ecat_objects.h \
    $(APPL)/goal_appl.h \
    $(APPL)/goal_appl_http.h \
    $(APPL)/goal_http_fs.h \
    $(APPL)/goal_config.h

export


all:
	@$(MAKE) --no-print-directory -f $(GOAL)/tools/make/Makefile $@


.DEFAULT:
	@$(MAKE) --no-print-directory -f $(GOAL)/tools/make/Makefile $@

gen_http_fs:
	$(GOAL)/tools/generator/goal_gen_http_fs.sh $(GOAL)/$(APPL) $(GOAL)/$(APPL)/html goal_http_fs.h

...

This section configures features which are part of the project. Available
features are described within the file
$(GOAL)/tools/make/gcc/Makefile.features. In this example the required features for an application controller (AC) are configured which enable:

...

This section describes the required source files and used header files. The
list of header files is required for project generation. Only the listed files
will be visible within the target IDE.

...

This target can be used to generate header files required for the web server.

Installation

On In order to use the generators a shell environment is required. Following for
different operating systems a an installation procedure is provided.

Linux

Reference system is a an Ubuntu Server 20.04.1 64 bit system.

  • Install build essentials

Code Block
    sudo apt-get install build-essential

...

Reference system is Windows 10, version 2004 (10.0.19041.0).

Optionally the Windows subsystem for Linux can be used, then the Linux
installation procedure applies.

...

MacOS X

Reference system is a an OSX Catalina (10.15.6).

...

The project generator needs to be run within the project folder (where the
Makefile is located).

  • Enter the project folder

...

The provided tool takes a folder containing files, prepared for delivery by the
web server and converts those to a format, which can be compiled into the
application binary.

Within the project makefile a target can be created which performs this action:

...

This target calls the bash script goal_gen_http_fs.sh which takes the following
arguments:

  1. target path: where the generated header file goal_http_fs.h is created

  2. source path: folder which contains html files, images, js files ... for web server delivery

  3. target filename

Upon invoking of the generator the target file is created. This file can be
included from the application. For each file within the source file the
following artefacts are created (e.g. from index.html):

...