diff --git a/CMakeLists.txt b/CMakeLists.txt
index e0b00d30..a1410bdb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,8 +19,6 @@ if(NOT OS_FSFW)
set(OS_FSFW host CACHE STRING "OS for the FSFW.")
endif()
-set_property(CACHE OS_FSFW PROPERTY STRINGS host linux)
-
# Perform steps like loading toolchain files where applicable.
include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake)
pre_project_config()
@@ -91,6 +89,8 @@ add_subdirectory(${MISSION_PATH})
# Post-Sources preparation
################################################################################
+set_property(CACHE OS_FSFW PROPERTY STRINGS host linux)
+
# Add libraries for all sources.
target_link_libraries(${TARGET_NAME} PRIVATE
${LIB_FSFW_NAME}
diff --git a/README.md b/README.md
index 0dd496c5..0ddf459c 100644
--- a/README.md
+++ b/README.md
@@ -16,55 +16,149 @@ Target systems:
* Linux Kernel https://github.com/XiphosSystemsCorp/linux-xlnx.git
* Host System
* Generic software components which are not dependant on hardware can also
- be run. All host code is contained in the hosted folder
+ be run on a host system. All host code is contained in the `bsp_hosted` folder
* Tested for Linux (Ubuntu 20.04) and Windows 10
* Raspberry Pi
* EIVE OBC can be built for Raspberry Pi as well (either directly on Raspberry Pi or by installing a cross compiler)
The steps in the primary README are related to the main OBC target Q7S.
+The CMake build system can be used to generate build systems as well (see helper scripts in `cmake/scripts`:
+
+- Linux (Raspberry Pi): Using the `bsp_rpi` BSP folder, and a very similar cross-compiler.
+ For running the software on a Raspberry Pi, it is recommended to follow the steps specified in
+ [the fsfw example](https://egit.irs.uni-stuttgart.de/fsfw/fsfw_example/src/branch/mueller/master/doc/README-rpi.md#top) and
+ using the TCF agent to have a similar set-up process also required for the Q7S.
+- Linux Host: Uses the `bsp_hosted` BSP folder and the CMake Unix Makefiles generator.
+- Windows Host: Uses the `bsp_hosted` BSP folder, the CMake MinGW Makefiles generator and MSYS2.
## Setting up development environment
+### Installing Vivado the the Xilinx development tools
+
+It's also possible to perform debugging with a normal Eclipse installation by installing
+the TCF plugin. Still, it is necessary to install Vivado to get the toolchain for generating
+C++ applications. Alternatively you can download the toolchain
+[from the cloud](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Arbeitsdaten/08_Used%20Components/Q7S/Toolchain&fileid=422486).
+
* Install Vivado 2018.2 and Xilinx SDK from https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/vivado-design-tools/archive.html.
- Install the Vivado Design Suite - HLx Editions - 2018.2 Full Product Installation instead of the updates. It is recommended to use the installer
+ Install the Vivado Design Suite - HLx Editions - 2018.2 Full Product Installation instead of the updates. It is recommended to use the installer.
+
* Install settings. In the Devices selection, it is sufficient to pick SoC → Zynq-7000:
-
+
+
+
+
+
+
+
* For supported OS refer to https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_2/ug973-vivado-release-notes-install-license.pdf
-* Add path of linux cross-compiler to environment variables SDK\2018.2\gnu\aarch32\nt\gcc-arm-linux-gnueabi\bin
-* Install make (only on windows, SDK on Linux can use the make installed with the SDK)
+* Add path of linux cross-compiler to permanent environment variables (`.profile` file in Linux):
+ `\SDK\2018.2\gnu\aarch32\nt\gcc-arm-linux-gnueabi\bin`
+ or set up path each time before debugging.
-### Installing make on Windows
-1. Install NodeJS LTS
-2. Install xpm
-
-```sh
-npm install --global xpm
-```
+### Installing CMake and MSYS2 on Windows
-3. Install Windows build tools (after installation also linux commands like mkdir can be used from windows)
+1. Install [MSYS2](https://www.msys2.org/) and [CMake](https://cmake.org/download/) first.
-```sh
-xpm install --global @xpack-dev-tools/windows-build-tools@latest
-```
+2. Open the MinGW64 console. It is recommended to set up aliases in `.bashrc` to navigate to the
+ software repository quickly
+
+3. Run the following commands in MinGW64
-## Building the software
+ ```sh
+ pacman -Syuuu
+ ```
+
+ It is recommended to install the full base development toolchain
+
+ ```sh
+ pacman -S base-devel
+ ```
+
+ It is also possible to only install required packages
+
+ ```sh
+ pacman -S mingw-w64-x86_64-cmake mingw-w64-x86_64-make mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb python3
+ ```
+
+### Installing CMake on Linux
+
+1. Run the following command
+
+ ```sh
+ sudo apt-get install cmake
+ ````
+
+## Building the software with CMake
+
+When using Windows, run theses steps in MSYS2.
1. Clone the repository with
-```sh
-git clone https://egit.irs.uni-stuttgart.de/eive/eive_obsw.git
-```
+
+ ```sh
+ git clone https://egit.irs.uni-stuttgart.de/eive/eive_obsw.git
+ ```
2. Update all the submodules
-```sh
-git submodule init
-git submodule sync
-git submodule update
-```
-3. Open Xilinx SDK 2018.2
-4. Import project
+ ```sh
+ git submodule init
+ git submodule sync
+ git submodule update
+ ```
+
+3. Ensure that the cross-compiler is working with `arm-linux-gnueabihf-gcc --version`.
+ It is recommended to run the shell script `win_path_helper_xilinx_tools.sh` in `cmake/scripts/Q7S`
+ or to set up the [PATH and the CROSS_COMPILE variable permanently](https://unix.stackexchange.com/questions/26047/how-to-correctly-add-a-path-to-path)
+ in the `.profile` file.
+
+4. Run the CMake configuration to create the build system in a `Debug` folder.
+ Navigate into the `eive_obsw` folder first.
+
+ ```sh
+ cd cmake/scripts/Q7S
+ ./create_cmake_debug.sh
+ cd ../../..
+ ```
+
+ This will invoke a Python script which in turn invokes CMake with the correct
+ arguments to configure CMake for Q7S cross-compilation.
+
+5. Build the software with
+ ```sh
+ cd Debug
+ cmake --build . -j
+ ```
+
+## Setting up default Eclipse for Q7S projects - TCF agent
+
+The [TCF agent](https://wiki.eclipse.org/TCF) can be used to perform remote debugging on the Q7S.
+
+1. Install the TCF agent plugin in Eclipse from the [releases](https://www.eclipse.org/tcf/downloads.php). Go to Help → Install New Software and use the download page, for example https://download.eclipse.org/tools/tcf/releases/1.6/1.6.2/ to search for the plugin and install it.
+
+2. Go to Window → Perspective → Open Perspective and open the **Target Explorer Perspective**.
+ Here, the Q7S should show up if the local port forwarding was set up as explained previously.
+
+3. A launch configuration was provided, but it might be necessary to adapt it for your own needs. Alternatively:
+
+ - Create a new **TCF Remote Application** by pressing the cogs button at the top or going to Run → Debug Configurations → Remote Application and creating a new one there.
+
+ - Set up the correct image in the main tab (it might be necessary to send the image to the Q7S manually once) and file transfer properties
+
+ - It is also recommended to link the correct Eclipse project.
+
+After that, comfortable remote debugging should be possible with the Debug button.
+
+A build configuration and a shell helper script has been provided to set up the path variables and build the Q7S binary
+on Windows, but a launch configuration needs to be newly created because the IP address and path settings differ
+from machine to machine.
+
+## Building in Xilinx SDK 2018.2
+
+1. Open Xilinx SDK 2018.2
+2. Import project
* File → Import → C/C++ → Existing Code as Makefile Project
-5. Set build command. Replace \ with either debug or release.
+3. Set build command. Replace \ with either debug or release.
* When on Linux right click project → Properties → C/C++ Build → Set build command to `make -j`
* -j causes the compiler to use all available cores
* The target is used to either compile the debug or the optimized release build.
@@ -73,79 +167,53 @@ git submodule update
* Target name: all
* Uncheck "Same as the target name"
* Uncheck "Use builder settings"
- * As build command type: `make -j WINDOWS=1`
-6. Run build command by double clicking the created target or by right clicking
+ * As build command type: `cmake --build .`
+ * In the Behaviour tab, you can enable build acceleration
+4. Run build command by double clicking the created target or by right clicking
the project folder and selecting Build Project.
-## Debugging the software (when workstation is directly conncected to Q7S)
-1. Assign static IP address to Q7S
- * Open serial console of Q7S (Accessible via the micro-USB of the PIM, see also Q7S user maunal chapter 10.3)
- * Baudrate 115200
- * Login to Q7S:
- * user: root
- * pw: root
- * Set IP address and netmask with
-
- ```sh
+## TCF-Agent
+
+1. On reboot, some steps have to be taken on the Q7S. Set static IP address and netmask
+
+ ```sh
ifconfig eth0 192.168.133.10
ifconfig eth0 netmask 255.255.255.0
```
-2. Connect Q7S to workstation via ethernet
-3. Make sure the netmask of the ehternet interface of the workstation matches the netmask of the Q7S
- * When IP address is set to 192.168.133.10 and the netmask is 255.255.255.0, an example IP address for the workstation
- is 192.168.133.2
-4. Run tcf-agent on Q7S
- * Tcf-agent is not yet integrated in the rootfs of the Q7S. Therefore build tcf-agent manually
-
- ```sh
- git clone git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git
- cd org.eclipse.tcf.agent/agent
- make CC=arm-linux-gnueabihf-gcc LD=arm-linux-gnueabihf-ld MACHINE=arm NO_SSL=1 NO_UUID=1
- ```
+2. `tcfagent` application should run automatically but this can be checked with
+ ```sh
+ systemctl status tcfagent
+ ```
- * Transfer executable agent from org.eclipse.tcf.agent/agent/obj/GNU/Linux/arm/Debug to /tmp of Q7S
-
- ```sh
- cd obj/GNU/Linux/arm/Debug
- scp agent root@192.168.133.10:/tmp
- ```
-
- * On Q7S
- ```sh
- cd /tmp
- chmod +x agent
- ```
-
- * Run agent
- ```sh
- ./agent
- ```
-
-5. In Xilinx SDK 2018.2 right click on project → Debug As → Debug Configurations
-6. Right click Xilinx C/C++ applicaton (System Debugger) → New →
-7. Set Debug Type to Linux Application Debug and Connectin to Linux Agent
-8. Click New
-9. Give connection a name
-10. Set Host to static IP address of Q7S. e.g. 192.168.133.10
-11. Test connection (This ensures the TCF Agent is running on the Q7S)
-12. Select Application tab
- * Project Name: eive_obsw
- * Local File Path: Path to eiveobsw-linux.elf (in _bin\linux\devel)
- * Remote File Path: /tmp/eive_obsw.elf
+3. If the agent is not running, check whether `agent` is located inside `usr/bin`.
+ You can run it manually there. To perform auto-start on boot, have a look at the start-up
+ application section.
## Debugging the software via Flatsat PC
+
Open SSH connection to flatsat PC:
```sh
ssh eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5
```
+or
+
+```sh
+ssh eive@192.168.199.227
+```
+
To access the console of the Q7S run the following:
```sh
picocom -b 115200 /dev/ttyUSB0
```
+If the serial port is blocked for some reason, you can kill
+the process using it with `q7s_kill`.
+
+You can use `AltGr` + `X` to exit the picocom session.
+
To debug an application, first make sure a static IP address is assigned to the Q7S. Run ifconfig on the Q7S serial console.
```sh
@@ -159,19 +227,38 @@ ifconfig eth0 192.168.133.10
ifconfig eth0 netmask 255.255.255.0
```
-To launch application from Xilinx SDK setup port fowarding on the localhost.
+To launch application from Xilinx SDK setup port fowarding on the development machine
+(not on the flatsat!)
```sh
ssh -L 1534:192.168.133.10:1534 eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5
```
This forwards any requests to localhost:1534 to the port 1534 of the Q7S with the IP address 192.168.133.10.
+This needs to be done every time, so it is recommended to create an alias to do this quickly.
Note: When now setting up a debug session in the Xilinx SDK, the host must be set to localhost instead of the IP address of the Q7S.
-## Launching an application after boot
+## Transfering files via SCP
+
+To transfer files from the local machine to the Q7S, use port forwarding
+
+```sh
+ssh -L 1535:192.168.133.10:22 eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5
+```
+
+Then you can copy an `example` file like this
+
+```sh
+scp -P 1535 example root@localhost:/tmp
+```
+
+## Launching an application at start-up
+
Load the root partiton from the flash memory (there are to nor-flash memories and each flash holds two xdi images).
-Note: It is not possible to modify the current loaded root partition.
+Note: It is not possible to modify the currently loaded root partition, e.g. creating directories. To do this,
+the parition needs to be mounted.
+
1. Disable write protection of the desired root partition
```sh
@@ -183,7 +270,10 @@ Note: It is not possible to modify the current loaded root partition.
```sh
xsc_mount_copy 0 0 # Mounts the nominal image from nor-flash 0
```
-3. Copy the executable to /bin/usr
+ The mounted partition will be located inside the `/tmp` folder
+
+3. Copy the executable to `/usr/bin`
+
4. Make sure the permissions to execute the application are set
```sh
chmod +x application
@@ -208,29 +298,33 @@ Note: It is not possible to modify the current loaded root partition.
```
6. Enable the service. This is normally done with systemctl enable. However, this is not possible when the service is
created for a mounted root partition. Therefore create a symlink as follows.
-````
-ln -s '/tmp/the-mounted-xdi-image/lib/systemd/system/example.service' '/tmp/the-mounted-xdi-image/etc/systemd/system/multi-user.target.wants/example.service'
-````
+ ```sh
+ ln -s '/tmp/the-mounted-xdi-image/lib/systemd/system/example.service' '/tmp/the-mounted-xdi-image/etc/systemd/system/multi-user.target.wants/example.service'
+ ```
+
7. The modified root partition is written back when the partion is locked again.
-````
-writeprotect 0 0 1
-````
+ ```sh
+ writeprotect 0 0 1
+ ```
8. Now verify the application start by booting from the modified image
-````
-xsc_boot_copy 0 0
-````
+ ```sh
+ xsc_boot_copy 0 0
+ ````
+
9. After booting verify if the service is running
-````
-systemctl status example
-````
+ ```sh
+ systemctl status example
+ ```
More detailed information about the used q7s commands can be found in the Q7S user manual.
### Bringing up CAN
-````
-ip link set can0 down
-ip link set can0 type can loopback off
-ip link set can0 up type can bitrate 1000000
-````
+
+ ```sh
+ ip link set can0 down
+ ip link set can0 type can loopback off
+ ip link set can0 up type can bitrate 1000000
+ ```
+
Following command sends 8 bytes to device with id 99 (for petalinux)
````
cansend can0 -i99 99 88 77 11 33 11 22 99
@@ -307,17 +401,6 @@ a permanent solution). If running the script before executing the binary does
not help or an warning is issue that the soft real time value is invalid,
the hard real-time limit of the system might not be high enough (see step 1).
-## Building and running the software on a host system
-
-The host build can be built with following command
-
-```sh
-make -f Makefile-Hosted all -j
-```
-
-If compiling on Windows, it is recommended to supply `WINDOWS=1` .
-A release build can be built by using the `mission` target.
-
## Flight Software Framework (FSFW)
An EIVE fork of the FSFW is submodules into this repository.
@@ -339,6 +422,7 @@ Alternatively, changes from other upstreams (forks) and branches can be merged l
the same way.
## PCDU
+
Connect to serial console of P60 Dock
````
picocom -b 500000 /dev/ttyUSBx
@@ -362,3 +446,57 @@ p60-dock # param get out_en[0]
GET out_en[0] = 1
````
+## Debugging the software (when workstation is directly conncected to Q7S)
+
+1. Assign static IP address to Q7S
+ * Open serial console of Q7S (Accessible via the micro-USB of the PIM, see also Q7S user maunal chapter 10.3)
+ * Baudrate 115200
+ * Login to Q7S:
+ * user: root
+ * pw: root
+
+2. Connect Q7S to workstation via ethernet
+3. Make sure the netmask of the ehternet interface of the workstation matches the netmask of the Q7S
+ * When IP address is set to 192.168.133.10 and the netmask is 255.255.255.0, an example IP address for the workstation
+ is 192.168.133.2
+
+4. Run tcf-agent on Q7S
+
+ * Tcf-agent is not yet integrated in the rootfs of the Q7S. Therefore build tcf-agent manually
+
+ ```sh
+ git clone git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git
+ cd org.eclipse.tcf.agent/agent
+ make CC=arm-linux-gnueabihf-gcc LD=arm-linux-gnueabihf-ld MACHINE=arm NO_SSL=1 NO_UUID=1
+ ```
+
+ * Transfer executable agent from org.eclipse.tcf.agent/agent/obj/GNU/Linux/arm/Debug to /tmp of Q7S
+
+ ```sh
+ cd obj/GNU/Linux/arm/Debug
+ scp agent root@192.168.133.10:/tmp
+ ```
+
+ * On Q7S
+ ```sh
+ cd /tmp
+ chmod +x agent
+ ```
+
+ * Run agent
+ ```sh
+ ./agent
+ ```
+
+5. In Xilinx SDK 2018.2 right click on project → Debug As → Debug Configurations
+6. Right click Xilinx C/C++ applicaton (System Debugger) → New →
+7. Set Debug Type to Linux Application Debug and Connectin to Linux Agent
+8. Click New
+9. Give connection a name
+10. Set Host to static IP address of Q7S. e.g. 192.168.133.10
+11. Test connection (This ensures the TCF Agent is running on the Q7S)
+12. Select Application tab
+ * Project Name: eive_obsw
+ * Local File Path: Path to eiveobsw-linux.elf (in _bin\linux\devel)
+ * Remote File Path: /tmp/eive_obsw.elf
+
diff --git a/bsp_hosted/fsfwconfig/FSFWConfig.h b/bsp_hosted/fsfwconfig/FSFWConfig.h
index 66fd276e..261e3d6d 100644
--- a/bsp_hosted/fsfwconfig/FSFWConfig.h
+++ b/bsp_hosted/fsfwconfig/FSFWConfig.h
@@ -4,16 +4,25 @@
#include
#include
-//! Used to determine whether C++ ostreams are used
-//! Those can lead to code bloat.
+//! Used to determine whether C++ ostreams are used which can increase
+//! the binary size significantly. If this is disabled,
+//! the C stdio functions can be used alternatively
#define FSFW_CPP_OSTREAM_ENABLED 1
-//! Reduced printout to further decrese code size
+//! More FSFW related printouts.
//! Be careful, this also turns off most diagnostic prinouts!
-#define FSFW_REDUCED_PRINTOUT 0
+#define FSFW_ENHANCED_PRINTOUT 0
-//! Can be used to enable debugging printouts for developing the FSFW
-#define FSFW_DEBUGGING 0
+//! Can be used to completely disable printouts, even the C stdio ones.
+#if FSFW_CPP_OSTREAM_ENABLED == 0 && FSFW_ENHANCED_PRINTOUT == 0
+ #define FSFW_DISABLE_PRINTOUT 0
+#endif
+
+//! Can be used to enable additional debugging printouts for developing the FSFW
+#define FSFW_PRINT_VERBOSITY_LEVEL 0
+
+//! Can be used to disable the ANSI color sequences for C stdio.
+#define FSFW_COLORED_OUTPUT 1
//! If FSFW_OBJ_EVENT_TRANSLATION is set to one,
//! additional output which requires the translation files translateObjects
@@ -21,18 +30,19 @@
#define FSFW_OBJ_EVENT_TRANSLATION 0
#if FSFW_OBJ_EVENT_TRANSLATION == 1
-#define FSFW_DEBUG_OUTPUT 1
//! Specify whether info events are printed too.
#define FSFW_DEBUG_INFO 1
-#include
-#include
+#include "objects/translateObjects.h"
+#include "events/translateEvents.h"
#else
-#define FSFW_DEBUG_OUTPUT 0
#endif
//! When using the newlib nano library, C99 support for stdio facilities
//! will not be provided. This define should be set to 1 if this is the case.
-#define FSFW_NO_C99_IO 1
+#define FSFW_NO_C99_IO 1
+
+//! Specify whether a special mode store is used for Subsystem components.
+#define FSFW_USE_MODESTORE 0
namespace fsfwconfig {
//! Default timestamp size. The default timestamp will be an eight byte CDC
@@ -49,6 +59,8 @@ static constexpr size_t FSFW_EVENTMGMR_RANGEMATCHERS = 120;
//! simulataneously. This will increase the required RAM for
//! each CSB service !
static constexpr uint8_t FSFW_CSB_FIFO_DEPTH = 6;
+
+static constexpr size_t FSFW_PRINT_BUFFER_SIZE = 124;
}
#endif /* CONFIG_FSFWCONFIG_H_ */
diff --git a/bsp_q7s/InitMission.cpp b/bsp_q7s/InitMission.cpp
index 1527e6c5..9a60a601 100644
--- a/bsp_q7s/InitMission.cpp
+++ b/bsp_q7s/InitMission.cpp
@@ -43,7 +43,7 @@ void InitMission::initTasks(){
/* TMTC Distribution */
PeriodicTaskIF* TmTcDistributor = TaskFactory::instance()->
createPeriodicTask("DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE,
- 0.100, nullptr);
+ 0.2, nullptr);
ReturnValue_t result = TmTcDistributor->addComponent(
objects::CCSDS_PACKET_DISTRIBUTOR);
if(result!=HasReturnvaluesIF::RETURN_OK){
diff --git a/cmake/Q7SCrossCompileConfig.cmake b/cmake/Q7SCrossCompileConfig.cmake
index 665869f9..2fb8134b 100644
--- a/cmake/Q7SCrossCompileConfig.cmake
+++ b/cmake/Q7SCrossCompileConfig.cmake
@@ -1,13 +1,13 @@
# CROSS_COMPILE also needs to be set accordingly or passed to the CMake command
-#if(NOT DEFINED ENV{Q7S_ROOTFS})
+if(NOT DEFINED ENV{Q7S_SYSROOT})
# message(FATAL_ERROR
# "Define the Q7S_ROOTFS variable to "
# "point to the raspbian rootfs."
# )
-#else()
-# set(SYSROOT_PATH "$ENV{Q7S_ROOTFS}")
-#endif()
+else()
+ set(SYSROOT_PATH "$ENV{Q7S_SYSROOT}")
+endif()
if(NOT DEFINED ENV{CROSS_COMPILE})
set(CROSS_COMPILE "arm-linux-gnueabihf")
diff --git a/cmake/scripts/Q7S/win_path_helper_xilinx_tools.sh b/cmake/scripts/Q7S/win_path_helper_xilinx_tools.sh
new file mode 100644
index 00000000..ac2411b7
--- /dev/null
+++ b/cmake/scripts/Q7S/win_path_helper_xilinx_tools.sh
@@ -0,0 +1,4 @@
+export PATH=$PATH:"/c/Xilinx/SDK/2018.2/gnu/aarch32/nt/gcc-arm-linux-gnueabi/bin"
+export CROSS_COMPILE="arm-linux-gnueabihf"
+
+export Q7S_SYSROOT="/c/Xilinx/SDK/2018.2/gnu/aarch32/nt/gcc-arm-linux-gnueabi/arm-linux-gnueabihf/libc"
diff --git a/doc/Q7S-user-manual.pdf b/doc/Q7S-user-manual.pdf
new file mode 100644
index 00000000..70ab7bb4
Binary files /dev/null and b/doc/Q7S-user-manual.pdf differ
diff --git a/doc/img/vivado-edition.png b/doc/img/vivado-edition.png
new file mode 100644
index 00000000..c34051f3
Binary files /dev/null and b/doc/img/vivado-edition.png differ
diff --git a/doc/img/vivado-hl-design.png b/doc/img/vivado-hl-design.png
new file mode 100644
index 00000000..3603f8cb
Binary files /dev/null and b/doc/img/vivado-hl-design.png differ
diff --git a/fsfwconfig/FSFWConfig.h b/fsfwconfig/FSFWConfig.h
index fdfa889a..261e3d6d 100644
--- a/fsfwconfig/FSFWConfig.h
+++ b/fsfwconfig/FSFWConfig.h
@@ -1,19 +1,28 @@
-#ifndef FSFWCONFIG_FSFWCONFIG_H_
-#define FSFWCONFIG_FSFWCONFIG_H_
+#ifndef CONFIG_FSFWCONFIG_H_
+#define CONFIG_FSFWCONFIG_H_
#include
#include
-//! Used to determine whether C++ ostreams are used
-//! Those can lead to code bloat.
+//! Used to determine whether C++ ostreams are used which can increase
+//! the binary size significantly. If this is disabled,
+//! the C stdio functions can be used alternatively
#define FSFW_CPP_OSTREAM_ENABLED 1
-//! Reduced printout to further decrese code size
+//! More FSFW related printouts.
//! Be careful, this also turns off most diagnostic prinouts!
-#define FSFW_REDUCED_PRINTOUT 0
+#define FSFW_ENHANCED_PRINTOUT 0
-//! Can be used to enable debugging printouts for developing the FSFW
-#define FSFW_DEBUGGING 0
+//! Can be used to completely disable printouts, even the C stdio ones.
+#if FSFW_CPP_OSTREAM_ENABLED == 0 && FSFW_ENHANCED_PRINTOUT == 0
+ #define FSFW_DISABLE_PRINTOUT 0
+#endif
+
+//! Can be used to enable additional debugging printouts for developing the FSFW
+#define FSFW_PRINT_VERBOSITY_LEVEL 0
+
+//! Can be used to disable the ANSI color sequences for C stdio.
+#define FSFW_COLORED_OUTPUT 1
//! If FSFW_OBJ_EVENT_TRANSLATION is set to one,
//! additional output which requires the translation files translateObjects
@@ -21,18 +30,19 @@
#define FSFW_OBJ_EVENT_TRANSLATION 0
#if FSFW_OBJ_EVENT_TRANSLATION == 1
-#define FSFW_DEBUG_OUTPUT 1
//! Specify whether info events are printed too.
#define FSFW_DEBUG_INFO 1
-#include
-#include
+#include "objects/translateObjects.h"
+#include "events/translateEvents.h"
#else
-#define FSFW_DEBUG_OUTPUT 0
#endif
//! When using the newlib nano library, C99 support for stdio facilities
//! will not be provided. This define should be set to 1 if this is the case.
-#define FSFW_NO_C99_IO 1
+#define FSFW_NO_C99_IO 1
+
+//! Specify whether a special mode store is used for Subsystem components.
+#define FSFW_USE_MODESTORE 0
namespace fsfwconfig {
//! Default timestamp size. The default timestamp will be an eight byte CDC
@@ -49,6 +59,8 @@ static constexpr size_t FSFW_EVENTMGMR_RANGEMATCHERS = 120;
//! simulataneously. This will increase the required RAM for
//! each CSB service !
static constexpr uint8_t FSFW_CSB_FIFO_DEPTH = 6;
+
+static constexpr size_t FSFW_PRINT_BUFFER_SIZE = 124;
}
-#endif /* FSFWCONFIG_FSFWCONFIG_H_ */
+#endif /* CONFIG_FSFWCONFIG_H_ */
diff --git a/libcsp/src/drivers/can/can_socketcan.c b/libcsp/src/drivers/can/can_socketcan.c
index 7d12f184..94c6bdde 100644
--- a/libcsp/src/drivers/can/can_socketcan.c
+++ b/libcsp/src/drivers/can/can_socketcan.c
@@ -142,7 +142,7 @@ csp_iface_t * csp_can_socketcan_init(const char * ifc, int bitrate, int promisc)
struct sockaddr_can addr;
pthread_t rx_thread;
- printf("Init can interface %s\n", ifc);
+ printf("-I-: Initiating CAN interface %s\n", ifc);
#ifdef CSP_HAVE_LIBSOCKETCAN
/* Set interface up */
diff --git a/misc/eclipse/.cproject b/misc/eclipse/.cproject
index 80fd68eb..e0ac2c75 100644
--- a/misc/eclipse/.cproject
+++ b/misc/eclipse/.cproject
@@ -15,11 +15,11 @@
-
+
-
+
@@ -230,7 +230,7 @@
-
+
@@ -505,6 +505,294 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -512,7 +800,11 @@
+
+
+
+
@@ -520,29 +812,48 @@
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
@@ -550,9 +861,4 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/misc/eclipse/Host/eive-mingw-debug-cmake.launch b/misc/eclipse/Host/eive-mingw-debug-cmake.launch
index e69de29b..3552a26b 100644
--- a/misc/eclipse/Host/eive-mingw-debug-cmake.launch
+++ b/misc/eclipse/Host/eive-mingw-debug-cmake.launch
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mission/devices/GyroL3GD20Handler.cpp b/mission/devices/GyroL3GD20Handler.cpp
index 11a053c8..38016531 100644
--- a/mission/devices/GyroL3GD20Handler.cpp
+++ b/mission/devices/GyroL3GD20Handler.cpp
@@ -171,14 +171,14 @@ ReturnValue_t GyroHandler::interpretDeviceReply(DeviceCommandId_t id,
int8_t temperaturOffset = (-1) * packet[L3GD20H::TEMPERATURE_IDX];
float temperature = 25.0 + temperaturOffset;
- result = dataset.read(20);
+ result = dataset.read();
if(result == HasReturnvaluesIF::RETURN_OK) {
dataset.angVelocX = angVelocX;
dataset.angVelocY = angVelocY;
dataset.angVelocZ = angVelocZ;
dataset.temperature = temperature;
dataset.setValidity(true, true);
- result = dataset.commit(20);
+ result = dataset.commit();
}
break;
}
diff --git a/mission/devices/MGMHandlerLIS3MDL.cpp b/mission/devices/MGMHandlerLIS3MDL.cpp
index 64b6d855..58740d7d 100644
--- a/mission/devices/MGMHandlerLIS3MDL.cpp
+++ b/mission/devices/MGMHandlerLIS3MDL.cpp
@@ -257,13 +257,13 @@ ReturnValue_t MGMHandlerLIS3MDL::interpretDeviceReply(DeviceCommandId_t id,
sif::info << "Z: " << mgmZ << " \xC2\xB5T" << std::endl;
}
#endif
- ReturnValue_t result = dataset.read(20);
+ ReturnValue_t result = dataset.read();
if(result == HasReturnvaluesIF::RETURN_OK) {
dataset.fieldStrengthX = mgmX;
dataset.fieldStrengthY = mgmY;
dataset.fieldStrengthZ = mgmZ;
dataset.setValidity(true, true);
- dataset.commit(20);
+ dataset.commit();
}
break;
}
@@ -278,10 +278,10 @@ ReturnValue_t MGMHandlerLIS3MDL::interpretDeviceReply(DeviceCommandId_t id,
<< std::endl;
}
#endif
- ReturnValue_t result = dataset.read(20);
+ ReturnValue_t result = dataset.read();
if(result == HasReturnvaluesIF::RETURN_OK) {
dataset.temperature = tempValue;
- dataset.commit(20);
+ dataset.commit();
}
break;
}
diff --git a/mission/devices/MGMHandlerRM3100.cpp b/mission/devices/MGMHandlerRM3100.cpp
index eebbac39..0fda5fba 100644
--- a/mission/devices/MGMHandlerRM3100.cpp
+++ b/mission/devices/MGMHandlerRM3100.cpp
@@ -339,13 +339,13 @@ ReturnValue_t MGMHandlerRM3100::handleDataReadout(const uint8_t *packet) {
}
#endif
- ReturnValue_t result = primaryDataset.read(20);
+ ReturnValue_t result = primaryDataset.read();
if(result == HasReturnvaluesIF::RETURN_OK) {
primaryDataset.fieldStrengthX = fieldStrengthX;
primaryDataset.fieldStrengthY = fieldStrengthY;
primaryDataset.fieldStrengthZ = fieldStrengthZ;
primaryDataset.setValidity(true, true);
- result = primaryDataset.commit(20);
+ result = primaryDataset.commit();
}
return result;
}
diff --git a/mission/devices/Tmp1075Handler.cpp b/mission/devices/Tmp1075Handler.cpp
index 6c42242a..c7b9362f 100644
--- a/mission/devices/Tmp1075Handler.cpp
+++ b/mission/devices/Tmp1075Handler.cpp
@@ -99,10 +99,10 @@ ReturnValue_t Tmp1075Handler::interpretDeviceReply(DeviceCommandId_t id,
#if OBSW_ENHANCED_PRINTOUT == 1
sif::info << "Tmp1075: Temperature: " << tempValue<< " °C" << std::endl;
#endif
- ReturnValue_t result = dataset.read(20);
+ ReturnValue_t result = dataset.read();
if(result == HasReturnvaluesIF::RETURN_OK) {
dataset.temperatureCelcius = tempValue;
- dataset.commit(20);
+ dataset.commit();
}
break;
}
diff --git a/mission/devices/devicedefinitions/Tmp1075Definitions.h b/mission/devices/devicedefinitions/Tmp1075Definitions.h
index 3e4c1a02..ac48697b 100644
--- a/mission/devices/devicedefinitions/Tmp1075Definitions.h
+++ b/mission/devices/devicedefinitions/Tmp1075Definitions.h
@@ -42,7 +42,7 @@ public:
StaticLocalDataSet(sid_t(objectId, DATA_SET_ID)) {
}
- lp_var_t temperatureCelcius = lp_var_t(hkManager->getOwner(),
+ lp_var_t temperatureCelcius = lp_var_t(sid.objectId,
TEMPERATURE_C, this);
};
}