debugging mem exception

This commit is contained in:
2022-05-29 16:06:19 +02:00
parent cc138c6886
commit eccf453415
7 changed files with 36 additions and 30 deletions

View File

@ -17,15 +17,16 @@
#include "FreeRTOS.h"
void assemlyDemo();
void InitMission::createTasks() {
TaskFactory *taskFactory = TaskFactory::instance();
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
#if OBSW_ADD_CORE_COMPONENTS == 1
/* TMTC Distribution */
PeriodicTaskIF *distributerTask =
taskFactory->createPeriodicTask("DIST", 5, 1024 * 2, 0.2, nullptr);
ReturnValue_t result =
distributerTask->addComponent(objects::CCSDS_DISTRIBUTOR);
result = distributerTask->addComponent(objects::CCSDS_DISTRIBUTOR);
if (result != HasReturnvaluesIF::RETURN_OK) {
task::printInitError("CCSDS distributor", objects::CCSDS_DISTRIBUTOR);
}
@ -38,6 +39,7 @@ void InitMission::createTasks() {
task::printInitError("TM funnel", objects::TM_FUNNEL);
}
#if OBSW_ADD_LWIP_COMPONENTS == 1
/* UDP bridge */
PeriodicTaskIF *udpBridgeTask = TaskFactory::instance()->createPeriodicTask(
"UDP_UNIX_BRIDGE", 6, 1024 * 2, 0.2, nullptr);
@ -51,6 +53,7 @@ void InitMission::createTasks() {
if (result != HasReturnvaluesIF::RETURN_OK) {
task::printInitError("UDP polling task", objects::UDP_POLLING_TASK);
}
#endif
PeriodicTaskIF *eventManagerTask =
TaskFactory::instance()->createPeriodicTask("EVENT_MGMT", 4, 1024 * 2,
@ -183,8 +186,10 @@ void InitMission::createTasks() {
#if OBSW_ADD_CORE_COMPONENTS == 1
distributerTask->startTask();
eventManagerTask->startTask();
#if OBSW_ADD_LWIP_COMPONENTS == 1
udpBridgeTask->startTask();
udpPollingTask->startTask();
#endif
#endif /* OBSW_ADD_CORE_COMPONENTS == 1 */
#if OBSW_ADD_PUS_STACK == 1
@ -221,8 +226,7 @@ void InitMission::createTasks() {
#endif
#if OBSW_ADD_DEVICE_HANDLER_DEMO
HasModesIF *assembly =
ObjectManager::instance()->get<HasModesIF>(objects::TEST_ASSEMBLY);
auto *assembly = ObjectManager::instance()->get<HasModesIF>(objects::TEST_ASSEMBLY);
if (assembly == nullptr) {
return;
}
@ -236,16 +240,20 @@ void InitMission::createTasks() {
#endif
TaskFactory::delayTask(5000);
CommandMessage modeMessage;
ModeMessage::setModeMessage(&modeMessage, ModeMessage::CMD_MODE_COMMAND,
DeviceHandlerIF::MODE_NORMAL,
TestAssembly::submodes::DUAL);
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Commanding Test Assembly to Normal, Dual" << std::endl;
#else
sif::printInfo("Commanding Test Assembly to Normal, Dual \n");
#endif
MessageQueueSenderIF::sendMessage(assembly->getCommandQueue(), &modeMessage,
MessageQueueIF::NO_QUEUE);
#endif /* OBSW_ADD_DEVICE_HANDLER_DEMO */
}
void assemblyDemo(HasModesIF* assembly) {
CommandMessage modeMessage;
ModeMessage::setModeMessage(&modeMessage, ModeMessage::CMD_MODE_COMMAND,
DeviceHandlerIF::MODE_NORMAL,
TestAssembly::submodes::DUAL);
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Commanding Test Assembly to Normal, Dual" << std::endl;
#else
sif::printInfo("Commanding Test Assembly to Normal, Dual \n");
#endif
MessageQueueSenderIF::sendMessage(assembly->getCommandQueue(), &modeMessage,
MessageQueueIF::NO_QUEUE);
}

View File

@ -51,17 +51,19 @@ void ObjectFactory::produce(void *args) {
new PoolManager(objects::IPC_STORE, poolCfg);
}
#if OBSW_ADD_LWIP_COMPONENTS == 1
/* UDP Server */
new TmTcLwIpUdpBridge(objects::UDP_BRIDGE, objects::CCSDS_DISTRIBUTOR,
objects::TM_STORE, objects::TC_STORE);
new UdpTcLwIpPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE,
&gnetif);
#endif
#endif /* OBSW_ADD_CORE_COMPONENTS == 1 */
ObjectFactory::produceGenericObjects();
/* Test Device Handler */
new STM32TestTask(objects::TEST_TASK, false, true);
new STM32TestTask(objects::TEST_TASK, true, true);
#if OBSW_PERFORM_L3GD20H_TEST == 1