Revision b74d5ee3

View differences:

README.txt
55 55
CONTENTS:
56 56

  
57 57
  1  Required software
58
  3  Building and flashing
58
  2  Folder structure
59 59

  
60 60
================================================================================
61 61

  
......
73 73

  
74 74

  
75 75

  
76
2 - BUILDING AND FLASHING
77
-------------------------
78

  
79
For building and flashing a specific setup, you must first define a
80
configuration in the ./configurations folder (e.g. ./configurations/MyConf).
81
Such a configuration must consist of a Makefile and a C header file with the
82
name "osconf.h". Please copy the provided template files from the
83
./configurations/template directory and modify them as required in order to
84
minimize the risk of errors and for the sake of consistency. As a result you can
85
build and flash all software using the Makefile.
76
2 - FOLDER STRUCTURE
77
--------------------
78

  
79
At its root, the AMiRo-Apps projects has six folders to distiquish between the
80
most fundamental parts:
81
.
82
├── apps
83
│     This folder includes individual applications, which can used by
84
│     configigurations. Apps will usually be implemented as nodes for the
85
│     middleware and provide acording interfaces via some message type(s).
86
├── configurations
87
│     Each configuration combines multiple apps and distributes them among any
88
│     supported modules. Furthermore, configurations may modify parameters for
89
│     each module individually. Finally, each configuration should come with a
90
│     makefile, so a user can just use this to build and flash the whole setup.
91
│     For better understanding, have a look at this example:
92
│       - module A: using apps 1, 2 and 3 with parameters X and Y.
93
│       - module B: using apps 1 and 4 with parameter X.
94
│       - module C: using apps 1, 5, 6 and 7 with parameters X and Z.
95
│       - Makefile: set and build everything.
96
│     Note that each configuration needs to explicitely support a module and
97
│     that there can never be an implicit default configuration.
98
├── messagetypes
99
│     Apps shoud take advantage of the middleware and thus implement nodes,
100
│     which communicate via messages. Such messages may have payloads of
101
│     arbitrary types, which can be defined in this folder.
102
├── middleware
103
│     This folder contains the µRtWare submodule and interface files.
104
├── os
105
│     This folder contains the AMiRo-OS submodule and interface files.
106
└── tools
107
      Usable tools can be found in this dirctory.
86 108

  
87 109
================================================================================
88 110

  
apps/HelloWorld/HelloWorld.mk
1
################################################################################
2
# AMiRo-Apps is a collection of applications for the Autonomous Mini Robot     #
3
# (AMiRo) platform.                                                            #
4
# Copyright (C) 2018..2018  Thomas Schöpping et al.                            #
5
#                                                                              #
6
# This program is free software: you can redistribute it and/or modify         #
7
# it under the terms of the GNU General Public License as published by         #
8
# the Free Software Foundation, either version 3 of the License, or            #
9
# (at your option) any later version.                                          #
10
#                                                                              #
11
# This program is distributed in the hope that it will be useful,              #
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
14
# GNU General Public License for more details.                                 #
15
#                                                                              #
16
# You should have received a copy of the GNU General Public License            #
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
18
#                                                                              #
19
# This research/work was supported by the Cluster of Excellence Cognitive      #
20
# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
21
# funded by the German Research Foundation (DFG).                              #
22
################################################################################
23

  
24

  
25

  
26
# absolue path to this directory
27
HelloWorldAPP_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
28

  
29
# include path
30
HelloWorldAPP_INC = $(HelloWorldAPP_DIR)
31

  
32
# C source files
33
HelloWorldAPP_CSRC =
34

  
35
# C++ source files
36
HelloWorldAPP_CPPSRC =
configurations/HelloWorld/Makefile
1
################################################################################
2
# AMiRo-Apps is a collection of applications for the Autonomous Mini Robot     #
3
# (AMiRo) platform.                                                            #
4
# Copyright (C) 2018..2018  Thomas Schöpping et al.                            #
5
#                                                                              #
6
# This program is free software: you can redistribute it and/or modify         #
7
# it under the terms of the GNU General Public License as published by         #
8
# the Free Software Foundation, either version 3 of the License, or            #
9
# (at your option) any later version.                                          #
10
#                                                                              #
11
# This program is distributed in the hope that it will be useful,              #
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
14
# GNU General Public License for more details.                                 #
15
#                                                                              #
16
# You should have received a copy of the GNU General Public License            #
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
18
#                                                                              #
19
# This research/work was supported by the Cluster of Excellence Cognitive      #
20
# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
21
# funded by the German Research Foundation (DFG).                              #
22
################################################################################
23

  
24

  
25

  
26
# absolue path to this directory
27
HelloWorldCONF_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
28

  
29
ifneq ($(BUILDDIR),)
30
  export BUILDDIR
31
endif
32

  
33
# list of available modules
34
HelloWorldCONF_MODULES = $(patsubst $(HelloWorldCONF_DIR)/modules/%/,%,$(sort $(dir $(wildcard $(HelloWorldCONF_DIR)/modules/*/*))))
35

  
36
CLEANTRGS = $(HelloWorldCONF_MODULES:%=clean_%)
37
FLASHTRGS = $(HelloWorldCONF_MODULES:%=flash_%)
38

  
39
.PHONY: all $(MODULES) $(FLASHTRGS) clean $(CLEANTRGS)
40

  
41
all: $(HelloWorldCONF_MODULES)
42
$(HelloWorldCONF_MODULES):
43
	$(MAKE) -C $(HelloWorldCONF_DIR)/modules/$@
44

  
45
$(FLASHTRGS):
46
	$(MAKE) -C $(HelloWorldCONF_DIR)/modules/$(@:flash_%=%) flash
47

  
48
clean: $(CLEANTRGS)
49
$(CLEANTRGS):
50
	$(MAKE) -C $(HelloWorldCONF_DIR)/modules/$(@:clean_%=%) clean
configurations/HelloWorld/modules/DiWheelDrive_1-1/Makefile
1
################################################################################
2
# AMiRo-Apps is a collection of applications for the Autonomous Mini Robot     #
3
# (AMiRo) platform.                                                            #
4
# Copyright (C) 2018..2018  Thomas Schöpping et al.                            #
5
#                                                                              #
6
# This program is free software: you can redistribute it and/or modify         #
7
# it under the terms of the GNU General Public License as published by         #
8
# the Free Software Foundation, either version 3 of the License, or            #
9
# (at your option) any later version.                                          #
10
#                                                                              #
11
# This program is distributed in the hope that it will be useful,              #
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
14
# GNU General Public License for more details.                                 #
15
#                                                                              #
16
# You should have received a copy of the GNU General Public License            #
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
18
#                                                                              #
19
# This research/work was supported by the Cluster of Excellence Cognitive      #
20
# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
21
# funded by the German Research Foundation (DFG).                              #
22
################################################################################
23

  
24

  
25

  
26
# absolue path to this directory
27
APPCONFIG_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
28

  
29
# AMiRo-Apps root directory
30
AMIROAPPS_DIR = $(realpath $(APPCONFIG_DIR)/../../../..)
31

  
32
# path to the middleware
33
MIDDLEWARE_DIR = $(AMIROAPPS_DIR)/middleware
34

  
35
# path to the operating system
36
OS_DIR = $(AMIROAPPS_DIR)/os
37

  
38
# include environments
39
include $(MIDDLEWARE_DIR)/middleware.mk
40
include $(OS_DIR)/os.mk
41

  
42
# include directories for configurations
43
APPSINC = $(APPCONFIG_DIR)/../ \
44
          $(APPCONFIG_DIR)
45

  
46
# call DiWHeelDrive Makefile module from OS
47
export
48

  
49
all:
50
	$(MAKE) -C $(OS_DIR)/AMiRo-OS/modules/DiWheelDrive_1-1/
51

  
52
clean:
53
	$(MAKE) -C $(OS_DIR)/AMiRo-OS/modules/DiWheelDrive_1-1/ clean
54

  
55
flash:
56
	$(MAKE) -C $(OS_DIR)/AMiRo-OS/modules/DiWheelDrive_1-1/ flash
57

  
configurations/HelloWorld/modules/DiWheelDrive_1-1/mainincludes.hpp
1
/*
2
AMiRo-Apps is a collection of applications for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2018..2018  Thomas Schöpping et al.
4

  
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

  
15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

  
19
#ifndef _MAININCLUDES_HPP_
20
#define _HAININCLUDES_HPP_
21

  
22
#endif /* _MAININCLUDES_HPP_ */
configurations/HelloWorld/modules/DiWheelDrive_1-1/osconf.h
1
/*
2
AMiRo-Apps is a collection of applications for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2018..2018  Thomas Schöpping et al.
4

  
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

  
15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

  
19
#ifndef _OSCONF_H_
20
#define _OSCONF_H_
21

  
22
#include <HelloWorld_osconf.h>
23

  
24
#endif /* _OSCONF_H_ */
configurations/HelloWorld/modules/DiWheelDrive_1-1/urtwareconf.h
1
/*
2
AMiRo-Apps is a collection of applications for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2018..2018  Thomas Schöpping et al.
4

  
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

  
15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

  
19
#ifndef _URTWARECONF_H_
20
#define _URTWARECONF_H_
21

  
22
#include <HelloWorld_urtwareconf.h>
23

  
24
#endif /* _URTWARECONF_H_ */
configurations/HelloWorld/modules/HelloWorld_osconf.h
1
/*
2
AMiRo-Apps is a collection of applications for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2018..2018  Thomas Schöpping et al.
4

  
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

  
15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

  
19
#ifndef _HELLOWORLD_OSCONF_H_
20
#define _HELLOWORLD_OSCONF_H_
21

  
22
#endif /* _HELLOWORLD_OSCONF_H_ */
configurations/HelloWorld/modules/HelloWorld_urtwareconf.h
1
/*
2
AMiRo-Apps is a collection of applications for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2018..2018  Thomas Schöpping et al.
4

  
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

  
15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

  
19
#ifndef _HELLOWORLD_URTWARECONF_H_
20
#define _HELLOWORLD_URTWARECONF_H_
21

  
22
#endif /* _HELLOWORLD_URTWARECONF_H_ */
messagetypes/todo.txt
1
TODO
middleware/middleware.mk
24 24

  
25 25

  
26 26
# absolute path to this directory
27
MIDDLEWARE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
27
MIDDLEWARE_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
28 28

  
29
include $(MIDDLEWARE_DIR)uRtWare/Makefile
29
include $(MIDDLEWARE_DIR)/uRtWare/Makefile
30 30

  
31 31
# include paths
32
MIDDLEWAREINC = $(URTWARE_INC)
32
MIDDLEWAREINC = $(URTWARE_INC) \
33
                $(MIDDLEWARE_DIR)
33 34

  
34 35
# C source files
35 36
MIDDLEWARECSRC = $(URTWARE_CSRC)
middleware/uRtWare
1
Subproject commit 5cf365321c98e5f66cb49f4e38bd5de1d6d3ba3b
1
Subproject commit 35c9457fb41618bf9aa02bf2eda7ea355bea78bf
middleware/urtware_osal.h
1
/*
2
AMiRo-Apps is a collection of applications for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2018..2018  Thomas Schöpping et al.
4

  
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

  
15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

  
19
#ifndef _URTWARE_OSAL_H_
20
#define _URTWARE_OSAL_H_
21

  
22
#endif /* _URTWARE_OSAL_H_ */
os/AMiRo-OS
1
Subproject commit e34c46f0d4b743db0d93f806a1c8395a16a71414
1
Subproject commit 47680f674f68f7631607c72b2b6c004f2cb3a532
os/os.mk
1 1
################################################################################
2 2
# AMiRo-Apps is a collection of applications for the Autonomous Mini Robot     #
3 3
# (AMiRo) platform.                                                            #
4
# Copyright (C) 2016..2018  Thomas Schöpping et al.                            #
4
# Copyright (C) 2018..2018  Thomas Schöpping et al.                            #
5 5
#                                                                              #
6 6
# This program is free software: you can redistribute it and/or modify         #
7 7
# it under the terms of the GNU General Public License as published by         #
......
24 24

  
25 25

  
26 26
# absolute path to this directory
27
OS_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
27
OS_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
28 28

  
29 29
# define to signal that this is an application build
30 30
# (no standalone os-only build)
31 31
UDEFS += -DAMIRO_APPS=true
32 32

  
33
# setup all variables for the LightRing
34
include $(LIGHTRING_APPS)
35
INCDIR += $(CONFIG_DIR)
36
APPSINC_LIGHTRING := $(INCDIR)
37
APPSCSRC_LIGHTRING := $(CSRC)
38
APPSCPPSRC_LIGHTRING := $(CPPSRC)
39
INCDIR :=
40
CSRC :=
41
CPPSRC :=
42

  
43
# setup all variables for the PowerManagement
44
include $(POWERMANAGEMENT_APPS)
45
INCDIR += $(CONFIG_DIR)
46
APPSINC_POWERMANAGEMENT := $(INCDIR)
47
APPSCSRC_POWERMANAGEMENT := $(CSRC)
48
APPSCPPSRC_POWERMANAGEMENT := $(CPPSRC)
49
INCDIR :=
50
CSRC :=
51
CPPSRC :=
52

  
53
# setup all variables for the DiWheelDrive
54
include $(DIWHEELDRIVE_APPS)
55
INCDIR += $(CONFIG_DIR)
56
APPSINC_DIWHEELDRIVE := $(INCDIR)
57
APPSCSRC_DIWHEELDRIVE := $(CSRC)
58
APPSCPPSRC_DIWHEELDRIVE := $(CPPSRC)
59
INCDIR :=
60
CSRC :=
61
CPPSRC :=
62

  
63 33
# make all variables that have been set so far available to all other makefiles
64 34
export
65 35

  
66
include $(OS_DIR)AMiRo-OS/Makefile
36
OS_MODULES_DIR := $(realpath $(OS_DIR)/AMiRo-OS/modules)
37

  
os/ossetup.sh
1 1
################################################################################
2 2
# AMiRo-Apps is a collection of applications for the Autonomous Mini Robot     #
3 3
# (AMiRo) platform.                                                            #
4
# Copyright (C) 2016..2018  Thomas Schöpping et al.                            #
4
# Copyright (C) 2018..2018  Thomas Schöpping et al.                            #
5 5
#                                                                              #
6 6
# This program is free software: you can redistribute it and/or modify         #
7 7
# it under the terms of the GNU General Public License as published by         #
......
281 281
  printf "#                                                                    #\n"
282 282
  printf "######################################################################\n"
283 283
  printf "#                                                                    #\n"
284
  printf "# Copyright (c) 2016..2018  Thomas Schöpping                         #\n"
284
  printf "# Copyright (c) 2018..2018  Thomas Schöpping                         #\n"
285 285
  printf "#                                                                    #\n"
286 286
  printf "# This is free software; see the source for copying conditions.      #\n"
287 287
  printf "# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR  #\n"

Also available in: Unified diff