v1.11.0 #243

Merged
muellerr merged 159 commits from develop into main 2022-05-04 17:19:57 +02:00
34 changed files with 891 additions and 628 deletions
Showing only changes of commit 604d7ab228 - Show all commits

26
CHANGELOG.md Normal file
View File

@ -0,0 +1,26 @@
Change Log
=======
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
The [milestone](https://egit.irs.uni-stuttgart.de/eive/eive-obsw/milestones)
list yields a list of all related PRs for each release.
# [unreleased]
# [v1.11.0]
## Changed
- Update rootfs base of Linux, all related OBSW changes
- Use gpsd version 3.17 now. Includes API changes
- Add `/usr/local/bin` to PATH. All shell scripts are there now
- Rename GPS device to `/dev/gps0`
# [v1.10.0]
For all releases equal or prior to v1.10.0,
see [milestones](https://egit.irs.uni-stuttgart.de/eive/eive-obsw/milestones)

View File

@ -16,7 +16,10 @@ set(CMAKE_SCRIPT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
option(EIVE_ADD_ETL_LIB "Add ETL library" ON)
option(EIVE_ADD_JSON_LIB "Add JSON library" ON)
option(EIVE_HARDCODED_TOOLCHAIN_FILE "\
For Linux Board Target BSPs, a default toolchain file will be set. Should be set to OFF \
if a different toolchain file is set externally" ON
)
option(EIVE_SYSROOT_MAGIC "Perform sysroot magic which might not be necessary" OFF)
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name" ON)
@ -41,7 +44,7 @@ include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake)
pre_project_config()
# Check whether the user has already installed Catch2 first. This has to come before
# the project call. We could also exlcude doing this when the Q7S primary OBSW is built..
# the project call. We could also exclude doing this when the Q7S primary OBSW is built..
find_package(Catch2 3 CONFIG QUIET)
# Project Name
@ -99,10 +102,14 @@ include (${CMAKE_SCRIPT_PATH}/HardwareOsPreConfig.cmake)
pre_source_hw_os_config()
if(TGT_BSP)
set(LIBGPS_VERSION_MAJOR 3)
# I assume a newer version than 3.17 will be installed on other Linux board than the Q7S
set(LIBGPS_VERSION_MINOR 20)
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/raspberrypi"
OR TGT_BSP MATCHES "arm/beagleboneblack" OR TGT_BSP MATCHES "arm/egse"
OR TGT_BSP MATCHES "arm/te0720-1cfa"
)
find_library(${LIB_GPS} gps)
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
if(NOT BUILD_Q7S_SIMPLE_MODE)
set(EIVE_ADD_LINUX_FILES TRUE)
@ -133,6 +140,8 @@ if(TGT_BSP)
if(TGT_BSP MATCHES "arm/q7s")
# Used by configure file
set(XIPHOS_Q7S ON)
set(LIBGPS_VERSION_MAJOR 3)
set(LIBGPS_VERSION_MINOR 17)
endif()
if(TGT_BSP MATCHES "arm/te0720-1cfa")
@ -154,8 +163,6 @@ elseif(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/egse")
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
endif()
configure_file(${WATCHDOG_PATH}/watchdogConf.h.in watchdogConf.h)
# Set common config path for FSFW
@ -243,8 +250,13 @@ else()
endif()
set_target_properties(${OBSW_NAME} PROPERTIES OUTPUT_NAME ${OBSW_BIN_NAME})
#watchdog
add_executable(${WATCHDOG_NAME} EXCLUDE_FROM_ALL)
# Watchdog
if(TGT_BSP MATCHES "arm/q7s")
add_executable(${WATCHDOG_NAME})
else()
add_executable(${WATCHDOG_NAME} EXCLUDE_FROM_ALL)
endif()
add_subdirectory(${WATCHDOG_PATH})
target_link_libraries(${WATCHDOG_NAME} PUBLIC
${LIB_CXX_FS}
@ -310,8 +322,8 @@ target_link_libraries(${OBSW_NAME} PRIVATE
if(TGT_BSP MATCHES "arm/q7s")
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
${LIB_ARCSEC}
${LIB_GPS}
${LIB_ARCSEC}
)
endif()
@ -369,7 +381,7 @@ endif()
if(${CMAKE_CROSSCOMPILING})
if(CMAKE_CROSSCOMPILING)
include (${CMAKE_SCRIPT_PATH}/HardwareOsPostConfig.cmake)
post_source_hw_os_config()
endif()
@ -391,6 +403,8 @@ else()
endif()
endif()
install(TARGETS ${OBSW_NAME} RUNTIME DESTINATION bin)
string(CONCAT POST_BUILD_COMMENT
"Build directory: ${CMAKE_BINARY_DIR}\n"
"Target OSAL: ${FSFW_OSAL}\n"
@ -405,6 +419,5 @@ add_custom_command(
COMMENT ${POST_BUILD_COMMENT}
)
include (${CMAKE_SCRIPT_PATH}/BuildType.cmake)
set_build_type()

View File

@ -163,23 +163,26 @@ automatically.
The EIVE OBSW is the default target if no target is specified.
**Debug**
```sh
mkdir build-Debug-Q7S && cd build-Debug-Q7S
cmake -DTGT_BSP=arm/q7s -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . -j
```
### Q7S Watchdog
To build the EIVE watchdog, the corresponding target must be specified in the build command.
The configure steps do not need to be repeated if the folder has already been configured.
**Release**
```sh
mkdir build-Debug-Watchdog && cd build-Debug-Watchdog
cmake -DTGT_BSP=arm/q7s -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --target eive-watchdog -j
mkdir build-Release-Q7S && cd build-Release-Q7S
cmake -DTGT_BSP=arm/q7s -DCMAKE_BUILD_TYPE=Release ..
cmake --build . -j
```
### Q7S Watchdog
The watchdog will be built along side the primary OBSW binary.
### Hosted
You can also use the FSFW OSAL `host` to build on Windows or for generic OSes.

View File

@ -8,13 +8,13 @@ RUN apt-get --yes install cmake libgpiod-dev xz-utils nano curl git gcc g++ lcov
# Q7S root filesystem, required for cross-compilation.
RUN mkdir -p /usr/rootfs; \
curl https://buggy.irs.uni-stuttgart.de/eive/tools/cortexa9hf-neon-xiphos-linux-gnueabi.tar.gz \
| tar -xz -C /usr/rootfs
curl https://buggy.irs.uni-stuttgart.de/eive/tools/eive-compile-rootfs-v0.1.0-7-gae69838.tar.xz \
| tar -xJ -C /usr/rootfs
# Cross compiler
RUN mkdir -p /usr/tools; \
curl https://buggy.irs.uni-stuttgart.de/eive/tools/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.gz \
| tar -xz -C /usr/tools
ENV ZYNQ_7020_SYSROOT="/usr/rootfs/cortexa9hf-neon-xiphos-linux-gnueabi"
ENV ZYNQ_7020_SYSROOT="/usr/rootfs/eive-compile-rootfs"
ENV PATH=$PATH:"/usr/tools/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin"

View File

@ -5,7 +5,7 @@ pipeline {
}
agent {
docker {
image 'eive-obsw-ci:d3'
image 'eive-obsw-ci:d4'
args '--sysctl fs.mqueue.msg_max=100'
}
}

View File

@ -8,7 +8,7 @@ static constexpr char SPI_RW_DEV[] = "/dev/spi-rw";
static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-eive";
static constexpr char UART_GNSS_DEV[] = "/dev/ul-gps";
static constexpr char UART_GNSS_DEV[] = "/dev/gps0";
static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ul-plmpsoc";
static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ul-plsv";
static constexpr char UART_SYRLINKS_DEV[] = "/dev/ul-syrlinks";

View File

@ -246,7 +246,11 @@ void Q7STestTask::testGpsDaemon() {
sif::warning << "Q7STestTask: Reading GPS data failed" << std::endl;
}
sif::info << "-- Q7STestTask: GPS shared memory read test --" << std::endl;
#if LIBGPS_VERSION_MINOR <= 17
time_t timeRaw = gps->fix.time;
#else
time_t timeRaw = gps->fix.time.tv_sec;
#endif
std::tm* time = gmtime(&timeRaw);
sif::info << "Time: " << std::put_time(time, "%c %Z") << std::endl;
sif::info << "Visible satellites: " << gps->satellites_visible << std::endl;
@ -254,7 +258,11 @@ void Q7STestTask::testGpsDaemon() {
sif::info << "Fix (0:Not Seen|1:No Fix|2:2D|3:3D): " << gps->fix.mode << std::endl;
sif::info << "Latitude: " << gps->fix.latitude << std::endl;
sif::info << "Longitude: " << gps->fix.longitude << std::endl;
#if LIBGPS_VERSION_MINOR <= 17
sif::info << "Altitude(MSL): " << gps->fix.altitude << std::endl;
#else
sif::info << "Altitude(MSL): " << gps->fix.altMSL << std::endl;
#endif
sif::info << "Speed(m/s): " << gps->fix.speed << std::endl;
}

View File

@ -8,7 +8,7 @@
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/timemanager/Stopwatch.h"
#include "fsfw/version.h"
#include "watchdogConf.h"
#include "watchdog/definitions.h"
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
#include "fsfw/osal/common/UdpTmTcBridge.h"
#else
@ -29,7 +29,10 @@ xsc::Chip CoreController::CURRENT_CHIP = xsc::Chip::NO_CHIP;
xsc::Copy CoreController::CURRENT_COPY = xsc::Copy::NO_COPY;
CoreController::CoreController(object_id_t objectId)
: ExtendedControllerBase(objectId, objects::NO_OBJECT, 5), opDivider(5), hkSet(this) {
: ExtendedControllerBase(objectId, objects::NO_OBJECT, 5),
opDivider5(5),
opDivider10(10),
hkSet(this) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
try {
result = initWatchdogFifo();
@ -75,6 +78,8 @@ void CoreController::performControlOperation() {
sdStateMachine();
performMountedSdCardOperations();
readHkData();
opDivider5.checkAndIncrement();
opDivider10.checkAndIncrement();
}
ReturnValue_t CoreController::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
@ -141,7 +146,7 @@ ReturnValue_t CoreController::initializeAfterTaskCreation() {
}
// Add script folder to path
char *currentEnvPath = getenv("PATH");
std::string updatedEnvPath = std::string(currentEnvPath) + ":/home/root/scripts";
std::string updatedEnvPath = std::string(currentEnvPath) + ":/home/root/scripts:/usr/local/bin";
setenv("PATH", updatedEnvPath.c_str(), true);
updateProtInfo();
initPrint();
@ -1200,7 +1205,7 @@ ReturnValue_t CoreController::handleProtInfoUpdateLine(std::string nextLine) {
void CoreController::performWatchdogControlOperation() {
// Only perform each fifth iteration
if (watchdogFifoFd != 0 and opDivider.checkAndIncrement()) {
if (watchdogFifoFd != 0 and opDivider5.check()) {
if (watchdogFifoFd == RETRY_FIFO_OPEN) {
// Open FIFO write only and non-blocking
watchdogFifoFd = open(watchdog::FIFO_NAME.c_str(), O_WRONLY | O_NONBLOCK);
@ -1692,14 +1697,22 @@ void CoreController::setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::C
}
ReturnValue_t CoreController::timeFileHandler() {
if (gpsFix == GpsHyperion::FixMode::FIX_2D or gpsFix == GpsHyperion::FixMode::FIX_3D) {
// Always set time. We could only set it if it is updated by GPS, but then the backup time would
// become obsolete on GPS problems.
if (opDivider10.check()) {
// It is assumed that the system time is set from the GPS time
timeval currentTime = {};
ReturnValue_t result = Clock::getClock_timeval(&currentTime);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
std::ofstream timeFile(currMntPrefix + TIME_FILE);
std::string fileName = currMntPrefix + TIME_FILE;
std::ofstream timeFile(fileName);
if (not timeFile.good()) {
sif::error << "CoreController::timeFileHandler: Error opening time file: " << strerror(errno)
<< std::endl;
return RETURN_FAILED;
}
timeFile << "UNIX SECONDS: " << currentTime.tv_sec << std::endl;
}
return RETURN_OK;

View File

@ -48,7 +48,7 @@ class CoreController : public ExtendedControllerBase {
static xsc::Chip CURRENT_CHIP;
static xsc::Copy CURRENT_COPY;
static constexpr char CHIP_PROT_SCRIPT[] = "/home/root/scripts/get-chip-prot-status.sh";
static constexpr char CHIP_PROT_SCRIPT[] = "get-chip-prot-status.sh";
static constexpr char CHIP_STATE_FILE[] = "/tmp/chip_prot_status.txt";
static constexpr char CURR_COPY_FILE[] = "/tmp/curr_copy.txt";
static constexpr char CONF_FOLDER[] = "conf";
@ -188,7 +188,8 @@ class CoreController : public ExtendedControllerBase {
* Index 3: Chip 1 Copy 1
*/
std::array<bool, 4> protArray;
PeriodicOperationDivider opDivider;
PeriodicOperationDivider opDivider5;
PeriodicOperationDivider opDivider10;
core::HkSet hkSet;

View File

@ -164,11 +164,9 @@ void ObjectFactory::produce(void* args) {
pcdu::Switches::PDU1_CH3_MGT_5V);
imtqHandler->setPowerSwitcher(pwrSwitcher);
static_cast<void>(imtqHandler);
#if OBSW_DEBUG_IMTQ == 1
#if OBSW_TEST_IMTQ == 1
imtqHandler->setStartUpImmediately();
imtqHandler->setToGoToNormal(true);
#else
(void)imtqHandler;
#endif
#endif
createReactionWheelComponents(gpioComIF);
@ -177,12 +175,8 @@ void ObjectFactory::produce(void* args) {
I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV);
BpxBatteryHandler* bpxHandler =
new BpxBatteryHandler(objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie);
#if OBSW_TEST_BPX_BATT == 1
bpxHandler->setToGoToNormalMode(true);
bpxHandler->setStartUpImmediately();
#else
static_cast<void>(bpxHandler);
#endif
bpxHandler->setToGoToNormalMode(true);
#endif
new FileSystemHandler(objects::FILE_SYSTEM_HANDLER);

View File

@ -8,7 +8,7 @@
#include "OBSWVersion.h"
#include "fsfw/tasks/TaskFactory.h"
#include "fsfw/version.h"
#include "watchdogConf.h"
#include "watchdog/definitions.h"
static int OBSW_ALREADY_RUNNING = -2;

View File

@ -82,7 +82,7 @@ void initmission::initTasks() {
std::vector<PeriodicTaskIF*> pstTasks;
FixedTimeslotTaskIF* pst = factory->createFixedTimeslotTask(
"UART_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
"UART_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc);
result = pst::pstUart(pst);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;

View File

@ -44,16 +44,15 @@ void ObjectFactory::produce(void* args) {
ObjectFactory::produceGenericObjects();
#if OBSW_ADD_PLOC_MPSOC == 1
UartCookie* mpsocUartCookie =
new UartCookie(objects::PLOC_MPSOC_HANDLER, te0720_1cfa::MPSOC_UART, UartModes::NON_CANONICAL,
uart::PLOC_MPSOC_BAUD, mpsoc::MAX_REPLY_SIZE);
UartCookie* mpsocUartCookie = new UartCookie(objects::PLOC_MPSOC_HANDLER, te0720_1cfa::MPSOC_UART,
uart::PLOC_MPSOC_BAUD, mpsoc::MAX_REPLY_SIZE);
mpsocUartCookie->setNoFixedSizeReply();
PlocMPSoCHelper* plocMpsocHelper = new PlocMPSoCHelper(objects::PLOC_MPSOC_HELPER);
new UartComIF(objects::UART_COM_IF);
auto dummyGpioIF = new DummyGpioIF();
PlocMPSoCHandler* plocMPSoCHandler =
new PlocMPSoCHandler(objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocUartCookie,
plocMpsocHelper, Gpio(gpioIds::ENABLE_MPSOC_UART, dummyGpioIF));
PlocMPSoCHandler* plocMPSoCHandler = new PlocMPSoCHandler(
objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocUartCookie, plocMpsocHelper,
Gpio(gpioIds::ENABLE_MPSOC_UART, dummyGpioIF), objects::PLOC_SUPERVISOR_HANDLER);
plocMPSoCHandler->setStartUpImmediately();
#endif /* OBSW_ADD_PLOC_MPSOC == 1 */

View File

@ -42,6 +42,7 @@ add_compile_options(
)
set(STRIPPED_OBSW_NAME ${OBSW_BIN_NAME}-stripped)
set(STRIPPED_WATCHDOG_NAME eive-watchdog-stripped)
add_custom_command(
TARGET ${OBSW_NAME}
@ -51,4 +52,12 @@ add_custom_command(
COMMENT "Generating stripped executable ${STRIPPED_OBSW_NAME}.."
)
add_custom_command(
TARGET ${WATCHDOG_NAME}
POST_BUILD
COMMAND ${CMAKE_STRIP} --strip-all eive-watchdog -o ${STRIPPED_WATCHDOG_NAME}
BYPRODUCTS ${STRIPPED_WATCHDOG_NAME}
COMMENT "Generating stripped executable ${STRIPPED_WATCHDOG_NAME}.."
)
endfunction()

View File

@ -11,7 +11,7 @@ endif()
# Disable compiler checks for cross-compiling.
if(FSFW_OSAL MATCHES linux AND TGT_BSP)
if(FSFW_OSAL MATCHES linux AND TGT_BSP AND EIVE_HARDCODED_TOOLCHAIN_FILE)
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/te0720-1cfa")
set(CMAKE_TOOLCHAIN_FILE
"${CMAKE_SCRIPT_PATH}/Zynq7020CrossCompileConfig.cmake"

View File

@ -2,6 +2,6 @@
export PATH=$PATH:"$HOME/EIVE/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin"
export CROSS_COMPILE="arm-linux-gnueabihf"
export ZYNQ_7020_SYSROOT="$HOME/Xilinx/cortexa9hf-neon-xiphos-linux-gnueabi"
export ZYNQ_7020_SYSROOT="/opt/xiphos/sdk/ark/sysroots/cortexa9hf-neon-xiphos-linux-gnueabi"
export CONSOLE_PREFIX="[Q7S ENV]"
/bin/bash

View File

@ -5,7 +5,7 @@ function help () {
}
TOOLCHAIN_PATH="/c/Xilinx/Vitis/2019.2/gnu/aarch32/nt/gcc-arm-linux-gnueabi/bin"
SYSROOT="/c/Users/${USER}/eive-software/cortexa9hf-neon-xiphos-linux-gnueabi"
SYSROOT="/c/Users/${USER}/eive-software/eive-compile-rootfs"
for i in "$@"; do
case $i in
@ -46,4 +46,4 @@ if [ -d "$SYSROOT" ]; then
else
echo "Sysroot path $SYSROOT does not exist"
return
fi
fi

2
fsfw

@ -1 +1 @@
Subproject commit cec12c007336441ea0f5ce912c181c3f14e574ca
Subproject commit befaca78c660f232c312667202f2bbd5da95c235

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,7 @@
#include "GPSHyperionLinuxController.h"
#include "OBSWConfig.h"
#include "fsfw/FSFW.h"
#include "fsfw/datapool/PoolReadGuard.h"
#include "fsfw/timemanager/Clock.h"
#include "linux/utility/utility.h"
@ -17,7 +18,6 @@ GPSHyperionLinuxController::GPSHyperionLinuxController(object_id_t objectId, obj
bool debugHyperionGps)
: ExtendedControllerBase(objectId, objects::NO_OBJECT),
gpsSet(this),
myGpsmm(GPSD_SHARED_MEMORY, nullptr),
debugHyperionGps(debugHyperionGps) {
timeUpdateCd.resetTimer();
}
@ -36,6 +36,7 @@ ReturnValue_t GPSHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_
uint32_t *msToReachTheMode) {
if (not modeCommanded) {
if (mode == MODE_ON or mode == MODE_OFF) {
gpsNotOpenSwitch = true;
// 5h time to reach fix
*msToReachTheMode = MAX_SECONDS_TO_REACH_FIX;
maxTimeToReachFix.resetTimer();
@ -105,18 +106,28 @@ ReturnValue_t GPSHyperionLinuxController::handleCommandMessage(CommandMessage *m
#ifdef FSFW_OSAL_LINUX
void GPSHyperionLinuxController::readGpsDataFromGpsd() {
gpsmm myGpsmm(GPSD_SHARED_MEMORY, nullptr);
// The data from the device will generally be read all at once. Therefore, we
// can set all field here
if (not myGpsmm.is_open()) {
// Opening failed
#if FSFW_VERBOSE_LEVEL >= 1
sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Opening GPSMM failed" << std::endl;
#endif
if(gpsNotOpenSwitch) {
// Opening failed
#if FSFW_VERBOSE_LEVEL >= 1
sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Opening GPSMM failed | " <<
"Error " << errno << " | " << gps_errstr(errno) << std::endl;
#endif
gpsNotOpenSwitch = false;
}
return;
}
gps_data_t *gps = nullptr;
gps = myGpsmm.read();
if (gps == nullptr) {
sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Reading GPS data failed" << std::endl;
if(gpsReadFailedSwitch) {
gpsReadFailedSwitch = false;
sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Reading GPS data failed" << std::endl;
}
return;
}
PoolReadGuard pg(&gpsSet);
@ -180,10 +191,19 @@ void GPSHyperionLinuxController::readGpsDataFromGpsd() {
gpsSet.speed.setValid(false);
}
#if LIBGPS_VERSION_MINOR <= 17
gpsSet.unixSeconds.value = gps->fix.time;
#else
gpsSet.unixSeconds.value = gps->fix.time.tv_sec;
#endif
timeval time = {};
time.tv_sec = gpsSet.unixSeconds.value;
#if LIBGPS_VERSION_MINOR <= 17
double fractionalPart = gps->fix.time - std::floor(gps->fix.time);
time.tv_usec = fractionalPart * 1000.0 * 1000.0;
#else
time.tv_usec = gps->fix.time.tv_nsec / 1000;
#endif
std::time_t t = std::time(nullptr);
if (time.tv_sec == t) {
timeIsConstantCounter++;
@ -222,7 +242,11 @@ void GPSHyperionLinuxController::readGpsDataFromGpsd() {
gpsSet.seconds = timeOfDay.second;
if (debugHyperionGps) {
sif::info << "-- Hyperion GPS Data --" << std::endl;
#if LIBGPS_VERSION_MINOR <= 17
time_t timeRaw = gps->fix.time;
#else
time_t timeRaw = gps->fix.time.tv_sec;
#endif
std::tm *time = gmtime(&timeRaw);
std::cout << "Time: " << std::put_time(time, "%c %Z") << std::endl;
std::cout << "Visible satellites: " << gps->satellites_visible << std::endl;
@ -230,7 +254,11 @@ void GPSHyperionLinuxController::readGpsDataFromGpsd() {
std::cout << "Fix (0:Not Seen|1:No Fix|2:2D|3:3D): " << gps->fix.mode << std::endl;
std::cout << "Latitude: " << gps->fix.latitude << std::endl;
std::cout << "Longitude: " << gps->fix.longitude << std::endl;
#if LIBGPS_VERSION_MINOR <= 17
std::cout << "Altitude(MSL): " << gps->fix.altitude << std::endl;
#else
std::cout << "Altitude(MSL): " << gps->fix.altMSL << std::endl;
#endif
std::cout << "Speed(m/s): " << gps->fix.speed << std::endl;
std::time_t t = std::time(nullptr);
std::tm tm = *std::gmtime(&t);

View File

@ -52,7 +52,8 @@ class GPSHyperionLinuxController : public ExtendedControllerBase {
Countdown maxTimeToReachFix = Countdown(MAX_SECONDS_TO_REACH_FIX * 1000);
bool modeCommanded = true;
bool timeInit = true;
gpsmm myGpsmm;
bool gpsNotOpenSwitch = true;
bool gpsReadFailedSwitch = true;
bool debugHyperionGps = false;
uint32_t timeIsConstantCounter = 0;
Countdown timeUpdateCd = Countdown(60);

View File

@ -26,6 +26,9 @@ static const DeviceCommandId_t TC_REPLAY_WRITE_SEQUENCE = 13;
static const DeviceCommandId_t TC_DOWNLINK_PWR_ON = 14;
static const DeviceCommandId_t TC_DOWNLINK_PWR_OFF = 15;
static const DeviceCommandId_t TC_MODE_REPLAY = 16;
static const DeviceCommandId_t TC_CAM_CMD_SEND = 17;
static const DeviceCommandId_t TC_MODE_IDLE = 18;
static const DeviceCommandId_t TM_CAM_CMD_RPT = 19;
// Will reset the sequence count of the OBSW
static const DeviceCommandId_t OBSW_RESET_SEQ_COUNT = 50;
@ -33,6 +36,7 @@ static const DeviceCommandId_t OBSW_RESET_SEQ_COUNT = 50;
static const uint16_t SIZE_ACK_REPORT = 14;
static const uint16_t SIZE_EXE_REPORT = 14;
static const uint16_t SIZE_TM_MEM_READ_REPORT = 18;
static const uint16_t SIZE_TM_CAM_CMD_RPT = 18;
/**
* SpacePacket apids of PLOC telecommands and telemetry.
@ -49,18 +53,23 @@ static const uint16_t TC_FLASHFOPEN = 0x119;
static const uint16_t TC_FLASHFCLOSE = 0x11A;
static const uint16_t TC_FLASHDELETE = 0x11C;
static const uint16_t TC_MODE_REPLAY = 0x11F;
static const uint16_t TC_MODE_IDLE = 0x11E;
static const uint16_t TC_DOWNLINK_PWR_OFF = 0x124;
static const uint16_t TC_CAM_CMD_SEND = 0x12C;
static const uint16_t TM_MEMORY_READ_REPORT = 0x404;
static const uint16_t ACK_SUCCESS = 0x400;
static const uint16_t ACK_FAILURE = 0x401;
static const uint16_t EXE_SUCCESS = 0x402;
static const uint16_t EXE_FAILURE = 0x403;
static const uint16_t TM_CAM_CMD_RPT = 0x407;
} // namespace apid
/** Offset from first byte in space packet to first byte of data field */
static const uint8_t DATA_FIELD_OFFSET = 6;
static const size_t MEM_READ_RPT_LEN_OFFSET = 10;
static const char NULL_TERMINATOR = '\0';
static const uint8_t MIN_SPACE_PACKET_LENGTH = 7;
static const uint8_t SPACE_PACKET_HEADER_SIZE = 6;
/**
* The size of payload data which will be forwarded to the requesting object. e.g. PUS Service
@ -117,11 +126,11 @@ class TcBase : public SpacePacket, public MPSoCReturnValuesIF {
virtual ReturnValue_t createPacket(const uint8_t* commandData, size_t commandDataLen) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
result = initPacket(commandData, commandDataLen);
if (result != HasReturnvaluesIF::HasReturnvaluesIF::RETURN_OK) {
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
result = addCrc();
if (result != HasReturnvaluesIF::HasReturnvaluesIF::RETURN_OK) {
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
return result;
@ -615,6 +624,45 @@ class TcModeReplay : public TcBase {
}
};
/**
* @brief Class to build mode idle command
*/
class TcModeIdle : public TcBase {
public:
TcModeIdle(uint16_t sequenceCount) : TcBase(apid::TC_MODE_IDLE, sequenceCount) {}
ReturnValue_t createPacket() {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
result = addCrc();
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
this->setPacketDataLength(static_cast<uint16_t>(CRC_SIZE - 1));
return HasReturnvaluesIF::RETURN_OK;
}
};
class TcCamcmdSend : public TcBase {
public:
TcCamcmdSend(uint16_t sequenceCount) : TcBase(apid::TC_CAM_CMD_SEND, sequenceCount) {}
protected:
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) {
if (commandDataLen > MAX_DATA_LENGTH) {
return INVALID_LENGTH;
}
std::memcpy(this->getPacketData(), commandData, commandDataLen);
*(this->getPacketData() + commandDataLen) = CARRIAGE_RETURN;
uint16_t trueLength = commandDataLen + sizeof(CARRIAGE_RETURN) + CRC_SIZE;
this->setPacketDataLength(trueLength - 1);
return HasReturnvaluesIF::RETURN_OK;
}
private:
static const uint8_t MAX_DATA_LENGTH = 10;
static const uint8_t CARRIAGE_RETURN = 0xD;
};
} // namespace mpsoc
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_PLOCMPSOCDEFINITIONS_H_ */

View File

@ -133,6 +133,7 @@ ReturnValue_t PlocMPSoCHandler::executeAction(ActionId_t actionId, MessageQueueI
}
void PlocMPSoCHandler::doStartUp() {
#ifdef XIPHOS_Q7S
switch (powerState) {
case PowerState::OFF:
commandActionHelper.commandAction(supervisorHandler, supv::START_MPSOC);
@ -145,6 +146,9 @@ void PlocMPSoCHandler::doStartUp() {
default:
break;
}
#else
setMode(_MODE_TO_ON);
#endif /* XIPHOS_Q7S */
}
void PlocMPSoCHandler::doShutDown() {
@ -211,6 +215,14 @@ ReturnValue_t PlocMPSoCHandler::buildCommandFromCommand(DeviceCommandId_t device
result = prepareTcModeReplay();
break;
}
case (mpsoc::TC_MODE_IDLE): {
result = prepareTcModeIdle();
break;
}
case (mpsoc::TC_CAM_CMD_SEND): {
result = prepareTcCamCmdSend(commandData, commandDataLen);
break;
}
default:
sif::debug << "PlocMPSoCHandler::buildCommandFromCommand: Command not implemented"
<< std::endl;
@ -238,16 +250,21 @@ void PlocMPSoCHandler::fillCommandAndReplyMap() {
this->insertInCommandMap(mpsoc::TC_DOWNLINK_PWR_OFF);
this->insertInCommandMap(mpsoc::TC_REPLAY_WRITE_SEQUENCE);
this->insertInCommandMap(mpsoc::TC_MODE_REPLAY);
this->insertInReplyMap(mpsoc::ACK_REPORT, 1, nullptr, mpsoc::SIZE_ACK_REPORT);
this->insertInCommandMap(mpsoc::TC_MODE_IDLE);
this->insertInCommandMap(mpsoc::TC_CAM_CMD_SEND);
this->insertInReplyMap(mpsoc::ACK_REPORT, 3, nullptr, mpsoc::SIZE_ACK_REPORT);
this->insertInReplyMap(mpsoc::EXE_REPORT, 3, nullptr, mpsoc::SIZE_EXE_REPORT);
this->insertInReplyMap(mpsoc::TM_MEMORY_READ_REPORT, 2, nullptr, mpsoc::SIZE_TM_MEM_READ_REPORT);
this->insertInReplyMap(mpsoc::TM_CAM_CMD_RPT, 2, nullptr, SpacePacket::PACKET_MAX_SIZE);
}
ReturnValue_t PlocMPSoCHandler::scanForReply(const uint8_t* start, size_t remainingSize,
DeviceCommandId_t* foundId, size_t* foundLen) {
ReturnValue_t result = RETURN_OK;
uint16_t apid = (*(start) << 8 | *(start + 1)) & APID_MASK;
SpacePacket spacePacket;
std::memcpy(spacePacket.getWholeData(), start, remainingSize);
uint16_t apid = spacePacket.getAPID();
switch (apid) {
case (mpsoc::apid::ACK_SUCCESS):
@ -262,6 +279,11 @@ ReturnValue_t PlocMPSoCHandler::scanForReply(const uint8_t* start, size_t remain
*foundLen = tmMemReadReport.rememberRequestedSize;
*foundId = mpsoc::TM_MEMORY_READ_REPORT;
break;
case (mpsoc::apid::TM_CAM_CMD_RPT):
*foundLen = spacePacket.getFullSize();
tmCamCmdRpt.rememberSpacePacketSize = *foundLen;
*foundId = mpsoc::TM_CAM_CMD_RPT;
break;
case (mpsoc::apid::EXE_SUCCESS):
*foundLen = mpsoc::SIZE_EXE_REPORT;
*foundId = mpsoc::EXE_REPORT;
@ -276,6 +298,7 @@ ReturnValue_t PlocMPSoCHandler::scanForReply(const uint8_t* start, size_t remain
return MPSoCReturnValuesIF::INVALID_APID;
}
}
sequenceCount++;
uint16_t recvSeqCnt = (*(start + 2) << 8 | *(start + 3)) & PACKET_SEQUENCE_COUNT_MASK;
if (recvSeqCnt != sequenceCount) {
@ -297,6 +320,10 @@ ReturnValue_t PlocMPSoCHandler::interpretDeviceReply(DeviceCommandId_t id, const
result = handleMemoryReadReport(packet);
break;
}
case (mpsoc::TM_CAM_CMD_RPT): {
result = handleCamCmdRpt(packet);
break;
}
case (mpsoc::EXE_REPORT): {
result = handleExecutionReport(packet);
break;
@ -463,6 +490,37 @@ ReturnValue_t PlocMPSoCHandler::prepareTcModeReplay() {
return RETURN_OK;
}
ReturnValue_t PlocMPSoCHandler::prepareTcModeIdle() {
ReturnValue_t result = RETURN_OK;
sequenceCount++;
mpsoc::TcModeIdle tcModeIdle(sequenceCount);
result = tcModeIdle.createPacket();
if (result != RETURN_OK) {
sequenceCount--;
return result;
}
memcpy(commandBuffer, tcModeIdle.getWholeData(), tcModeIdle.getFullSize());
rawPacket = commandBuffer;
rawPacketLen = tcModeIdle.getFullSize();
nextReplyId = mpsoc::ACK_REPORT;
return RETURN_OK;
}
ReturnValue_t PlocMPSoCHandler::prepareTcCamCmdSend(const uint8_t* commandData,
size_t commandDataLen) {
ReturnValue_t result = RETURN_OK;
sequenceCount++;
mpsoc::TcCamcmdSend tcCamCmdSend(sequenceCount);
result = tcCamCmdSend.createPacket(commandData, commandDataLen);
if (result != RETURN_OK) {
sequenceCount--;
return result;
}
copyToCommandBuffer(&tcCamCmdSend);
nextReplyId = mpsoc::TM_CAM_CMD_RPT;
return RETURN_OK;
}
void PlocMPSoCHandler::copyToCommandBuffer(mpsoc::TcBase* tc) {
if (tc == nullptr) {
sif::debug << "PlocMPSoCHandler::copyToCommandBuffer: Invalid TC" << std::endl;
@ -586,6 +644,25 @@ ReturnValue_t PlocMPSoCHandler::handleMemoryReadReport(const uint8_t* data) {
return result;
}
ReturnValue_t PlocMPSoCHandler::handleCamCmdRpt(const uint8_t* data) {
ReturnValue_t result = RETURN_OK;
SpacePacket packet;
std::memcpy(packet.getWholeData(), data, tmCamCmdRpt.rememberSpacePacketSize);
result = verifyPacket(data, tmCamCmdRpt.rememberSpacePacketSize);
if (result == MPSoCReturnValuesIF::CRC_FAILURE) {
sif::warning << "PlocMPSoCHandler::handleCamCmdRpt: CRC failure" << std::endl;
}
const uint8_t* dataFieldPtr = data + mpsoc::SPACE_PACKET_HEADER_SIZE;
std::string camCmdRptMsg(reinterpret_cast<const char*>(
dataFieldPtr), tmCamCmdRpt.rememberSpacePacketSize - mpsoc::SPACE_PACKET_HEADER_SIZE - 3);
uint8_t ackValue = *(packet.getPacketData() + packet.getPacketDataLength() - 2);
sif::info << "CamCmdRpt message: " << camCmdRptMsg << std::endl;
sif::info << "CamCmdRpt Ack value: 0x" << std::hex << static_cast<unsigned int>(ackValue)
<< std::endl;
handleDeviceTM(packet.getPacketData(), packet.getPacketDataLength() - 1, mpsoc::TM_CAM_CMD_RPT);
return result;
}
ReturnValue_t PlocMPSoCHandler::enableReplyInReplyMap(DeviceCommandMap::iterator command,
uint8_t expectedReplies, bool useAlternateId,
DeviceCommandId_t alternateReplyID) {
@ -602,6 +679,7 @@ ReturnValue_t PlocMPSoCHandler::enableReplyInReplyMap(DeviceCommandMap::iterator
case mpsoc::TC_DOWNLINK_PWR_OFF:
case mpsoc::TC_REPLAY_WRITE_SEQUENCE:
case mpsoc::TC_MODE_REPLAY:
case mpsoc::TC_MODE_IDLE:
enabledReplies = 2;
break;
case mpsoc::TC_MEM_READ: {
@ -611,6 +689,18 @@ ReturnValue_t PlocMPSoCHandler::enableReplyInReplyMap(DeviceCommandMap::iterator
if (result != RETURN_OK) {
sif::debug << "PlocMPSoCHandler::enableReplyInReplyMap: Reply with id "
<< mpsoc::TM_MEMORY_READ_REPORT << " not in replyMap" << std::endl;
return result;
}
break;
}
case mpsoc::TC_CAM_CMD_SEND: {
enabledReplies = 3;
result = DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true,
mpsoc::TM_CAM_CMD_RPT);
if (result != RETURN_OK) {
sif::debug << "PlocMPSoCHandler::enableReplyInReplyMap: Reply with id "
<< mpsoc::TM_CAM_CMD_RPT << " not in replyMap" << std::endl;
return result;
}
break;
}
@ -690,6 +780,11 @@ size_t PlocMPSoCHandler::getNextReplyLength(DeviceCommandId_t commandId) {
replyLen = tmMemReadReport.rememberRequestedSize;
break;
}
case mpsoc::TM_CAM_CMD_RPT:
// Read acknowledgment, camera and execution report in one go because length of camera
// report is not fixed
replyLen = SpacePacket::PACKET_MAX_SIZE;
break;
default: {
replyLen = iter->second.replyLen;
break;

View File

@ -4,6 +4,7 @@
#include <string>
#include "PlocMPSoCHelper.h"
#include "fsfw/tmtcpacket/SpacePacket.h"
#include "fsfw/action/CommandActionHelper.h"
#include "fsfw/action/CommandsActionsIF.h"
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
@ -126,14 +127,26 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
// Used to block incoming commands when MPSoC helper class is currently executing a command
bool plocMPSoCHelperExecuting = false;
class TmMemReadReport {
public:
struct TmMemReadReport {
static const uint8_t FIX_SIZE = 14;
size_t rememberRequestedSize = 0;
};
TmMemReadReport tmMemReadReport;
struct TmCamCmdRpt {
size_t rememberSpacePacketSize = 0;
};
TmCamCmdRpt tmCamCmdRpt;
struct TelemetryBuffer {
uint16_t length = 0;
uint8_t buffer[SpacePacket::PACKET_MAX_SIZE];
};
TelemetryBuffer tmBuffer;
enum class PowerState { OFF, BOOTING, SHUTDOWN, ON };
PowerState powerState = PowerState::OFF;
@ -151,7 +164,8 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
ReturnValue_t prepareTcDownlinkPwrOn(const uint8_t* commandData, size_t commandDataLen);
ReturnValue_t prepareTcDownlinkPwrOff();
ReturnValue_t prepareTcReplayWriteSequence(const uint8_t* commandData, size_t commandDataLen);
ReturnValue_t prepareTcCamCmdSend(const uint8_t* commandData, size_t commandDataLen);
ReturnValue_t prepareTcModeIdle();
/**
* @brief Copies space packet into command buffer
*/
@ -194,6 +208,8 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
*/
ReturnValue_t handleMemoryReadReport(const uint8_t* data);
ReturnValue_t handleCamCmdRpt(const uint8_t* data);
/**
* @brief Depending on the current active command, this function sets the reply id of the
* next reply after a successful acknowledgment report has been received. This is

View File

@ -127,6 +127,8 @@ debugging. */
#define OBSW_DEBUG_PL_PCDU 0
#define OBSW_TEST_BPX_BATT 0
#define OBSW_DEBUG_BPX_BATT 0
#define OBSW_TEST_IMTQ 0
#define OBSW_DEBUG_IMTQ 0
#define OBSW_TEST_LIBGPIOD 0
#define OBSW_TEST_PLOC_HANDLER 0
@ -143,9 +145,8 @@ debugging. */
#define OBSW_DEBUG_GPS 0
#define OBSW_DEBUG_ACU 0
#define OBSW_DEBUG_SYRLINKS 0
#define OBSW_DEBUG_IMTQ 0
#define OBSW_DEBUG_RW 0
#define OBSW_DEBUG_PDEC_HANDLER 0
#define OBSW_DEBUG_PDEC_HANDLER 0
#ifdef TE0720_1CFA
#define OBSW_DEBUG_PLOC_SUPERVISOR 1
@ -191,6 +192,9 @@ debugging. */
/*******************************************************************/
#cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER
#cmakedefine LIBGPS_VERSION_MAJOR @LIBGPS_VERSION_MAJOR@
#cmakedefine LIBGPS_VERSION_MINOR @LIBGPS_VERSION_MINOR@
#ifdef RASPBERRY_PI
#include "rpiConfig.h"
#elif defined(XIPHOS_Q7S)

View File

@ -589,7 +589,7 @@
<cconfiguration id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689" moduleId="org.eclipse.cdt.core.settings" name="eive-q7s-debug">
<macros>
<stringMacro name="Q7S_SYSROOT_UNIX" type="VALUE_PATH_DIR" value="${HOME}/Xilinx/cortexa9hf-neon-xiphos-linux-gnueabi"/>
<stringMacro name="Q7S_SYSROOT_UNIX" type="VALUE_PATH_DIR" value="${HOME}/Xilinx/eive-compile-rootfs"/>
<stringMacro name="Q7S_SYSROOT" type="VALUE_TEXT" value="C:\Xilinx\cortexa9hf-neon-xiphos-linux-gnueabi"/>
</macros>
<externalSettings/>
@ -603,7 +603,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildProperties="" description="" errorParsers="org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689" name="eive-q7s-debug" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.enablement=null,org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.image=null,org.eclipse.cdt.docker.launcher.containerbuild.property.connection=null" parent="org.eclipse.cdt.build.core.emptycfg">
<configuration artifactName="${ProjName}" buildProperties="" description="" errorParsers="org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689" name="eive-q7s-debug" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.enablement=null,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.connection=null,org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.image=null" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689." name="/" resourcePath="">
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.1439714522" name="Arm Cross GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1064018737" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
@ -687,6 +687,7 @@
<listOptionValue builtIn="false" value="&quot;${Q7S_SYSROOT_UNIX}/usr/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/eive-obsw/fsfw/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/eive-obsw/fsfw/hal/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/eive-obsw/build-Debug-Q7S/fsfw}&quot;"/>
</option>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.1331264991" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
</tool>
@ -698,6 +699,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/eive-obsw/linux/fsfwconfig}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/eive-obsw/fsfw/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/eive-obsw/fsfw/hal/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/eive-obsw/build-Debug-Q7S/fsfw}&quot;"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1143219558" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX=1"/>
@ -714,6 +716,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/eive-obsw/build-Debug-Q7S}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/eive-obsw/fsfw/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/eive-obsw/fsfw/hal/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/eive-obsw/build-Debug-Q7S/fsfw}&quot;"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.1199844227" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX=1"/>
@ -745,7 +748,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="build-Debug-Host|build-Watchdog-Debug" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
@ -755,8 +758,8 @@
<cconfiguration id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1939781894">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1939781894" moduleId="org.eclipse.cdt.core.settings" name="eive-q7s-release">
<macros>
<stringMacro name="Q7S_SYSROOT" type="VALUE_TEXT" value="C:\Xilinx\cortexa9hf-neon-xiphos-linux-gnueabi"/>
<stringMacro name="Q7S_SYSROOT_UNIX" type="VALUE_TEXT" value="${HOME}/Xilinx/cortexa9hf-neon-xiphos-linux-gnueabi"/>
<stringMacro name="Q7S_SYSROOT" type="VALUE_TEXT" value="C:\Xilinx\cortexa9hf-neon-xiphos-linux-gnueabi"/>
</macros>
<externalSettings/>
<extensions>
@ -909,7 +912,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="build-Debug-Host|build-Watchdog-Debug" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>

View File

@ -7,7 +7,7 @@
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>

View File

@ -10,7 +10,6 @@
IMTQHandler::IMTQHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie,
power::Switch_t pwrSwitcher)
: DeviceHandlerBase(objectId, comIF, comCookie),
switcher(pwrSwitcher),
engHkDataset(this),
calMtmMeasurementSet(this),
rawMtmMeasurementSet(this),
@ -19,7 +18,8 @@ IMTQHandler::IMTQHandler(object_id_t objectId, object_id_t comIF, CookieIF* comC
posYselfTestDataset(this),
negYselfTestDataset(this),
posZselfTestDataset(this),
negZselfTestDataset(this) {
negZselfTestDataset(this),
switcher(pwrSwitcher) {
if (comCookie == NULL) {
sif::error << "IMTQHandler: Invalid com cookie" << std::endl;
}

View File

@ -92,7 +92,7 @@ def build_cmd(args):
else:
target = args.target
if args.invert:
cmd += f"{port_args} {address}:{args.source} {target}"
cmd += f"{port_args} {address}:{source_files} {target}"
else:
cmd += f"{port_args} {source_files} {address}:{target}"
return cmd

2
tmtc

@ -1 +1 @@
Subproject commit 8a30f669f075c284494d7c1c6618e42e2aec8f15
Subproject commit 28983d387b82578a73fbfe052cb53dec1910d021

View File

@ -6,3 +6,5 @@ target_sources(${WATCHDOG_NAME} PRIVATE
target_include_directories(${WATCHDOG_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
)
install(TARGETS ${WATCHDOG_NAME} RUNTIME DESTINATION bin)

View File

@ -1,5 +1,5 @@
#include "Watchdog.h"
#include "watchdogConf.h"
#include "definitions.h"
#include <errno.h>
#include <sys/types.h>

View File

@ -1,6 +1,8 @@
#ifndef WATCHDOG_DEFINITIONS_H_
#define WATCHDOG_DEFINITIONS_H_
#include <watchdogConf.h>
namespace watchdog {
// Suspend watchdog operations temporarily

View File

@ -1,8 +1,6 @@
#include <cstdint>
#include <string>
#include "watchdog/definitions.h"
#define WATCHDOG_VERBOSE_LEVEL 1
/**
* This flag instructs the watchdog to create a special file in /tmp if the OBSW is running