Skip to content

Commit f98d563

Browse files
committed
debugging tools to solve the mergy thing
1 parent 094792b commit f98d563

File tree

8 files changed

+31
-23
lines changed

8 files changed

+31
-23
lines changed

FprimeZephyrReference/Components/BootloaderTrigger/BootloaderTrigger.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// \author aychar
44
// \brief cpp file for BootloaderTrigger component implementation class
55
// ======================================================================
6-
76
#include "FprimeZephyrReference/Components/BootloaderTrigger/BootloaderTrigger.hpp"
7+
#include <zephyr/sys/printk.h>
88

99
#include <pico/bootrom.h>
1010

@@ -14,7 +14,9 @@ namespace Components {
1414
// Component construction and destruction
1515
// ----------------------------------------------------------------------
1616

17-
BootloaderTrigger ::BootloaderTrigger(const char* const compName) : BootloaderTriggerComponentBase(compName) {}
17+
BootloaderTrigger ::BootloaderTrigger(const char* const compName) : BootloaderTriggerComponentBase(compName) {
18+
printk("Bootloader Trigger component constructed\n");
19+
}
1820

1921
BootloaderTrigger ::~BootloaderTrigger() {}
2022

FprimeZephyrReference/Components/Burnwire/Burnwire.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// ======================================================================
66

77
#include "FprimeZephyrReference/Components/Burnwire/Burnwire.hpp"
8+
#include <zephyr/sys/printk.h>
89

910
namespace Components {
1011

@@ -13,8 +14,7 @@ namespace Components {
1314
// ----------------------------------------------------------------------
1415

1516
Burnwire ::Burnwire(const char* const compName) : BurnwireComponentBase(compName) {
16-
this->m_safetyCounter = 0;
17-
this->m_state = Fw::On::OFF;
17+
printk("Burnwire component constructed\n");
1818
}
1919

2020
Burnwire ::~Burnwire() {}

FprimeZephyrReference/Components/Drv/RtcManager/RtcManager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// ======================================================================
55

66
#include "FprimeZephyrReference/Components/Drv/RtcManager/RtcManager.hpp"
7+
#include <zephyr/sys/printk.h>
78

89
namespace Drv {
910

@@ -14,6 +15,7 @@ namespace Drv {
1415
RtcManager ::RtcManager(const char* const compName) : RtcManagerComponentBase(compName) {
1516
// Initialize device
1617
this->dev = device_get_binding("RV3028");
18+
printk("RTC Manager component constructed\n");
1719
}
1820

1921
RtcManager ::~RtcManager() {}

FprimeZephyrReference/Components/ImuManager/ImuManager.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// \title ImuManager.cpp
33
// \brief cpp file for ImuManager component implementation class
44
// ======================================================================
5-
65
#include "FprimeZephyrReference/Components/ImuManager/ImuManager.hpp"
6+
#include <zephyr/sys/printk.h>
77

88
#include <Fw/Types/Assert.hpp>
99

@@ -13,7 +13,9 @@ namespace Components {
1313
// Component construction and destruction
1414
// ----------------------------------------------------------------------
1515

16-
ImuManager ::ImuManager(const char* const compName) : ImuManagerComponentBase(compName) {}
16+
ImuManager ::ImuManager(const char* const compName) : ImuManagerComponentBase(compName) {
17+
printk("IMU mabger \n");
18+
}
1719

1820
ImuManager ::~ImuManager() {}
1921

FprimeZephyrReference/ReferenceDeployment/Main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,21 @@ int main(int argc, char* argv[]) {
1919
// the application starts writing to it.
2020
k_sleep(K_MSEC(3000));
2121

22+
printk("finished sleeps");
2223
Os::init();
24+
printk("initined\n");
2325
// Object for communicating state to the topology
2426
ReferenceDeployment::TopologyState inputs;
27+
printk("created state input object");
2528
inputs.uartDevice = serial;
2629
inputs.baudRate = 115200;
2730

2831
// Setup, cycle, and teardown topology
32+
printk("starting to setup the topology\n");
2933
ReferenceDeployment::setupTopology(inputs);
34+
printk("finished setting up the topology\n");
3035
ReferenceDeployment::startRateGroups(); // Program loop
36+
printk("finished rate groups\n");
3137
ReferenceDeployment::teardownTopology(inputs);
3238
return 0;
3339
}

FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentTopology.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ void configureTopology() {
5757
rateGroup1Hz.configure(rateGroup1HzContext, FW_NUM_ARRAY_ELEMENTS(rateGroup1HzContext));
5858

5959
gpioDriver.open(ledGpio, Zephyr::ZephyrGpioDriver::GpioConfiguration::OUT);
60-
gpioBurnwire0.open(burnwire0Gpio, Zephyr::ZephyrGpioDriver::GpioConfiguration::OUT);
61-
gpioBurnwire1.open(burnwire1Gpio, Zephyr::ZephyrGpioDriver::GpioConfiguration::OUT);
60+
gpioDriver.open(burnwire0Gpio, Zephyr::ZephyrGpioDriver::GpioConfiguration::OUT);
61+
gpioDriver.open(burnwire1Gpio, Zephyr::ZephyrGpioDriver::GpioConfiguration::OUT);
6262
}
6363

6464
// Public functions for use in main program are namespaced with deployment name ReferenceDeployment

FprimeZephyrReference/ReferenceDeployment/Top/instances.fpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,20 @@ module ReferenceDeployment {
6464

6565
instance gpioBurnwire1: Zephyr.ZephyrGpioDriver base id 0x10015200
6666

67-
instance watchdog: Components.Watchdog base id 0x10015000
67+
instance watchdog: Components.Watchdog base id 0x10016000
6868

69-
instance rtcManager: Drv.RtcManager base id 0x10016000
69+
instance burnwire: Components.Burnwire base id 0x10017000
7070

71-
instance imuManager: Components.ImuManager base id 0x10017000
71+
instance rtcManager: Drv.RtcManager base id 0x10018000
7272

73-
instance lis2mdlManager: Drv.Lis2mdlManager base id 0x10018000
73+
instance imuManager: Components.ImuManager base id 0x10019000
7474

75-
instance lsm6dsoManager: Drv.Lsm6dsoManager base id 0x10019000
75+
instance lis2mdlManager: Drv.Lis2mdlManager base id 0x10020000
7676

77-
instance bootloaderTrigger: Components.BootloaderTrigger base id 0x10020000
77+
instance lsm6dsoManager: Drv.Lsm6dsoManager base id 0x10021000
78+
79+
instance bootloaderTrigger: Components.BootloaderTrigger base id 0x10022000
7880

79-
instance burnwire: Components.Burnwire base id 0x10021000
8081

8182

8283
}

FprimeZephyrReference/ReferenceDeployment/Top/topology.fpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ module ReferenceDeployment {
2929
instance gpioBurnwire0
3030
instance gpioBurnwire1
3131
instance watchdog
32-
instance prmDb
32+
instance burnwire
3333
instance rtcManager
3434
instance imuManager
3535
instance lis2mdlManager
3636
instance lsm6dsoManager
3737
instance bootloaderTrigger
38-
instance burnwire
38+
instance prmDb
39+
3940

4041
# ----------------------------------------------------------------------
4142
# Pattern graph specifiers
@@ -109,12 +110,6 @@ module ReferenceDeployment {
109110
watchdog.gpioSet -> gpioDriver.gpioWrite
110111
}
111112

112-
connections BurnwireGpio {
113-
burnwire.gpioSet[0] -> gpioBurnwire0.gpioWrite
114-
burnwire.gpioSet[1] -> gpioBurnwire1.gpioWrite
115-
}
116-
117-
118113
connections imuManager {
119114
imuManager.accelerationGet -> lsm6dsoManager.accelerationGet
120115
imuManager.angularVelocityGet -> lsm6dsoManager.angularVelocityGet

0 commit comments

Comments
 (0)