Skip to content

Commit bba9a54

Browse files
authored
Bump to v4.0.0 (#6)
* Remove old deployment * Upgrade to v4.0.0 * Bump sub repo pointer * Update to telemetry packetizer * Runs to main loop * Add comment, remove unnecessary config * Fix review suggestions * Bump pointer
1 parent 4e12e3d commit bba9a54

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+603
-758
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
url = https://github.com/zephyrproject-rtos/zephyr.git
77
[submodule "lib/fprime-zephyr"]
88
path = lib/fprime-zephyr
9-
url = https://github.com/lestarch/fprime-zephyr.git
9+
url = https://github.com/fprime-community/fprime-zephyr.git

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/lib/fprime/cmake/FPrime.cmake")
2424
fprime_setup_included_code()
2525

2626
# This includes project-wide objects
27-
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/fprime-zephyr-reference")
27+
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/FprimeZephyrReference")
2828

2929
set_target_properties(Svc_FatalHandler PROPERTIES EXCLUDE_FROM_ALL TRUE)
3030
set_target_properties(fprime-zephyr_Drv_ZephyrSpiDriver PROPERTIES EXCLUDE_FROM_ALL TRUE)
File renamed without changes.

fprime-zephyr-reference/Components/FatalHandler/FatalHandler.cpp renamed to FprimeZephyrReference/Components/FatalHandler/FatalHandler.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// ======================================================================
1212

1313
#include <Fw/Logger/Logger.hpp>
14-
#include <fprime-zephyr-reference/Components/FatalHandler/FatalHandler.hpp>
14+
#include <FprimeZephyrReference/Components/FatalHandler/FatalHandler.hpp>
1515
#include <Fw/FPrimeBasicTypes.hpp>
1616
#include <zephyr/sys/reboot.h>
1717

@@ -45,9 +45,8 @@ namespace Components {
4545
asm("bkpt #251");
4646
}
4747
#endif
48-
// Otherwise, use Zephyr to reboot the system
49-
sys_reboot(SYS_REBOOT_COLD);
50-
while(1) {}
48+
// Otherwise, use Zephyr to reboot the system
49+
sys_reboot(SYS_REBOOT_COLD);
5150
}
5251

5352
void FatalHandler::FatalReceive_handler(

fprime-zephyr-reference/Components/FatalHandler/FatalHandler.hpp renamed to FprimeZephyrReference/Components/FatalHandler/FatalHandler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#ifndef FatalHandler_HPP
1414
#define FatalHandler_HPP
1515

16-
#include "fprime-zephyr-reference/Components/FatalHandler/FatalHandlerComponentAc.hpp"
16+
#include "FprimeZephyrReference/Components/FatalHandler/FatalHandlerComponentAc.hpp"
1717

1818
namespace Components {
1919

fprime-zephyr-reference/ReferenceDeployment/CMakeLists.txt renamed to FprimeZephyrReference/ReferenceDeployment/CMakeLists.txt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
###
1111
# Topology and Components
1212
###
13-
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Top/")
1413

15-
# Add custom components to this specific deployment here
16-
# add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/MyComponent/")
14+
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Top/")
1715

1816
if (FPRIME_PLATFORM STREQUAL "Zephyr")
1917
register_fprime_zephyr_deployment(
@@ -23,13 +21,4 @@ if (FPRIME_PLATFORM STREQUAL "Zephyr")
2321
DEPENDS
2422
${FPRIME_CURRENT_MODULE}_Top
2523
)
26-
else()
27-
# In non-Zephyr targets, register a deployment as usual
28-
register_fprime_deployment(
29-
SOURCES
30-
"${CMAKE_CURRENT_LIST_DIR}/Main.cpp"
31-
DEPENDS
32-
${FPRIME_CURRENT_MODULE}_Top
33-
)
3424
endif()
35-
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// ======================================================================
2+
// \title Main.cpp
3+
// \brief main program for the F' application. Intended for CLI-based systems (Linux, macOS)
4+
//
5+
// ======================================================================
6+
// Used to access topology functions
7+
#include <FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentTopology.hpp>
8+
#include <zephyr/sys/printk.h>
9+
#include <zephyr/kernel.h>
10+
11+
const struct device *serial = DEVICE_DT_GET(DT_NODELABEL(cdc_acm_uart0));
12+
13+
int main(int argc, char* argv[]) {
14+
// ** DO NOT REMOVE **//
15+
//
16+
// This sleep is necessary to allow the USB CDC ACM interface to initialize before
17+
// the application starts writing to it.
18+
k_sleep(K_MSEC(3000));
19+
20+
Os::init();
21+
// Object for communicating state to the topology
22+
ReferenceDeployment::TopologyState inputs;
23+
inputs.uartDevice = serial;
24+
inputs.baudRate = 115200;
25+
26+
// Setup, cycle, and teardown topology
27+
ReferenceDeployment::setupTopology(inputs);
28+
ReferenceDeployment::startRateGroups(); // Program loop
29+
ReferenceDeployment::teardownTopology(inputs);
30+
return 0;
31+
}

0 commit comments

Comments
 (0)