Commit Graph

173 Commits

Author SHA1 Message Date
M Starch
b9ea1fd77f Improved Linux GPIO Driver Using Chardev (#2943)
* Linux GPIO Driver refactor WIP

* Initial new GPIO driver

* Fixing toolchain warning

* Adding GPIO interface

* Adding in more states

* Added interrupts to GPIO driver

* Fixing build errors

* Formatting GPIO driver

* Fix spelling

* Fixing config check

* Quality status

* Review fixes

* Clearing GPIO struct values

* Updating to new RawTime

* Fixing take -> now

* Fixing quality error

* Fixing second review comments

* Tested: read, write, interupt rising/falling/both

* Final review comment
2024-10-14 16:23:06 -07:00
Thomas Boyer-Chammard
564cb5773b Add Os::RawTime OSAL implementation, refactor Os::IntervalTimer (#2923)
* Add Os::RawTime and preliminary rule-based tests

* Implement Stubs and stub tests tests + misc improvements

* Update delay functions to use Fw::TimeInterval instead of Fw::Time

* Replace TimerVal with Os::RawTime FPP type, SERIALIZED_SIZE fixed to 2*sizeof(U32)

* Fix spelling and legacy code

* Fix test import

* Remove TimerVal files and misc clean up

* Add Fw/Time as dependency of Os module

* Fix include guards

* Fix default constructors and missing getHandle stub

* Add Handle and Serialization size to FpConfig, refactor interface for less vtable calls, refactor IntervalTimer

* Fixes for new OS CMake API

* Add RawTime FPP Model

* Rename getRawTime to now(), better error handling, added docs for all functions

* Correct handle size, spelling, and more robust test IntervalTimer test

* Peer review changes

* Move `Os.RawTime` to `Os/Types.fpp`

* Fix unused variable

* Fix spelling and comments

* spelling extravaganza

* Update metadata

check-spelling run (pull_request_target) for os-interval-timer

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev>

* Reference based approach to minuend and subtrahend

---------

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
Co-authored-by: Thomas Boyer-Chammard <thomas-bc@users.noreply.github.com>
Co-authored-by: M Starch <LeStarch@googlemail.com>
2024-10-14 10:06:45 -07:00
Thomas Boyer-Chammard
d6ebdff460 Refactor Os::FileSystem and Os::Directory (#2871)
* Add FileSystem Interface

* Add OS::FileSystem interface and implementations

* static interface + global Os::init()

* Add test harness

* Implement Os::Directory interfaces and use it in FileSystem::readDirectory

* Add Stub tests for Directory and FileSystem

* wip: modify the interface from Michael feedback

* wip: move functions around and rework interface a little more

* Add Directory rule-based tests

* Refactored Directory for open-create + WIP: FileSystem tests

* Update state tracking mechanism in FileSystem test implementation + add RandomizedTesting

* Replace bounded while-loop with for-loop

* Code cleanup

* fix typo

* Rename FileTracker and code reorganization / clarification

* Code style and add CWD rule

* Clean up tester code

* More cleanup

* Add Posix tests to Os_ut_exe

* Fix DpCatalog readDirectory usage

* Appease CI checks

* Spelling and CI warnings

* Spelling + removing FppConstants include

* Add review changes and todos

* Add Directory::read(Fw::StringBase&) overload

* Refactor copyFileData to iterate over copied size

* Remove FppConstants.hpp include

* Rework moveFile into rename/copy-remove

* Add majestic comments

* Add option to error if dir exist in Fs::createDirectory

* spelling

* include <algorithm> for std::find in tests

* Fix leftover ::CREATE modes in comments and stub tests

* Fix CmdSequencer test case

* Fix memory leak in testing by conditioning the Open rule

* Fix FileManager tests

* Add Directory and FileSystem FPP type definitions; update CMakeLists and clean up comments

* spelling

* Reoder header guards

* Implement changes from peer-review

* read into StringBase with const_cast

* Fix resetSer() call

* Fix spelling

* fix spelling again i guess

* Fix DpCatalog unchecked return value
2024-09-27 09:15:21 -07:00
M Starch
a049743e07 Removing component init() functions where unneeded (#2893)
* Removing component init() functions where unneeded

* Removing spurious assert
2024-09-23 18:39:00 -07:00
Justine West
672538de32 Update Ref and RPI for compatibility with FPP #349 (fully qualified component instance names) (#2823)
* updated ref and rpi integration tests

* fix component qualifiers

* FPP v2.2.0a1

* fix py file formatting

* add new line

* remove newline

* file py file formatting

* fprime-gds v3.4.4a3

* fix typo in integration test command name

---------

Co-authored-by: jawest <justine.a.west@jpl.nasa.gov>
2024-09-04 14:48:25 -07:00
Alex Mariano
4476828cb3 Update CI to use Json dictionaries (#2806)
* Change CI to use Json dictionaries

* Bumping to gds/tools for alpha release of JSON dictionary

* Change Workflow RPI Dictionary to JSON

* Install requirements.txt on RPIs for integration tests

---------

Co-authored-by: M Starch <LeStarch@googlemail.com>
Co-authored-by: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com>
2024-08-26 15:14:53 -07:00
M Starch
7159e7e347 Implements #2723: Adds Os::Console to replace Os::Log (#2831)
* Initial logging refactor - WIP

* Removing LogAssert as it is not used

* Working on Fw::Logger rewrite

* Initial Os::Console refactor

* Fixing Fw::Logger unit tests

* Fixing up UT build

* Adding Os::Stub::Console implementation

* Added interface UTs

* Adding posix console tests

* Fixing Linux errors

* Spelling

* Initial review requests

* Fixing RPI build issues

* Fixing codeql errors

* Fixing code QL

* Validating 'message' parameter
2024-08-15 18:53:36 -07:00
M Starch
ed87b37e2d Delete RPI legacy Topology.cpp and Components.hpp (#2822)
* Delete RPI/Top/Topology.cpp

* Delete Components.hpp

---------

Co-authored-by: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com>
2024-07-31 10:39:19 -07:00
M Starch
640cf44c80 Os task refactor issue 2526 (#2672)
* Task refactor WIP -- compiles, but does not link

* Adding isCooperative method - WIP

* more WIP

* Initial Os::Posix::Task implementaion

* Adding makeDelegate functions; Fixing existing UTs

* Touching up comments

* Fixing Linux issues

* Adding type_traits import

* Removing TaskId and reworking handle storage

* Do not need to assert that a reference is not nullptr; compiler will get angry

* Starting UT development

* Start test works

* Working start and join rules; random test

* Adding state, delay, and count tests

* Adding stub interface tests

* sp

* Registry tests

* Fixing UTs

* Fixing PTHREAD_MIN_STACK for linux

* Missing newlines

* Fixing GPIO driver's task

* More build fixes

* Fixes for CI

* Correcting errors in GNU only code

* Fixing review comments

* Fixing sp

* Fixing RPI (again)

* Removing divergent open rules from interface testing. Fixes #2733

* Fixing review comments

---------

Co-authored-by: Kevin F. Ortega <kevin.f.ortega@jpl.nasa.gov>
2024-05-22 16:38:18 -07:00
Saurav Maheshkar
109e4bd399 feat(ci): add markdown link checker (#2651)
* feat(ci): add markdown link checker

* Fixing sp

* feat(ci): specify markdown lint check params

* Remove verbose mode

* Remove sdd.html links

* Add historical note to ci/README.md

* Fix broken links

* Fix more dead links

* Test replacementPatterns for CMake API

* Use config file correctly

* Fix config path

* Spell out replacement field

* Add C++ API redirect

* Escape `c++` pattern

* Fix another batch of dead links

* fix options and spelling

* docs: address comments

* docs: address comments

* Fix FPP Wiki links to NASA org

---------

Co-authored-by: M Starch <LeStarch@googlemail.com>
Co-authored-by: thomas-bc <thomas.boyerchammard@gmail.com>
Co-authored-by: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com>
2024-04-24 16:51:42 -07:00
M Starch
9f5b364526 Fixes #2602; bumps required version to 3.16 (#2617) 2024-03-26 10:57:39 -07:00
Rob Bocchino
c02f35145e Remove FPP dependencies on native int types (#2548)
* Remove FPP dependencies on native int types

* Revise FpConfig

* Fix errors in FpConfig

* Revise types

Add size type alias to Serializable
Remove type aliases for generated code
2024-03-04 19:34:23 -08:00
M Starch
bf3e7eb4ed Updating framework for FPP post-v2.0.1 (#2454) 2024-01-04 09:56:46 -08:00
Simone Morettini
36a07dd967 Implementation of the offsets in the RateGroupDriver (#2166)
* Implementation of the offsets

* Fix comment

* Fix spell error

* Changing configure interface by addind DividersSet

* Update RPI topology

* Removing numDivisors from call

* Removing memset clear as the constructor handles zeroed initialization

* Fixing ASSERT and removing m_numDivisors

* Renaming divisersSet to diviserSet

---------

Co-authored-by: Simone Morettini <simone.morettini@redwirespaceeurope.com>
Co-authored-by: Michael D Starch <Michael.D.Starch@jpl.nasa.gov>
2023-10-26 15:09:47 -07:00
M Starch
b5777e99dc Convert Svc.Time into An Interface (#2317)
* Renaming of linux time files to posix

* Fixes #2256. Renames LinuxTime into PosixTime implementing new Time interface

* sp

* Static analysis errors

* Cleaning up other LinuxTime references
2023-10-25 08:54:51 -07:00
M Starch
a56426adbb Converting ByteStreamDriverModel into an interface (#2252)
* Converting ByteStreamDriverModel into an interface

* Fixing Tcp unit tests

* Make reusable builder use pr-check ref as default

* Reusable workflows now build on devel as default

* Review fixes I
2023-08-29 08:39:59 -07:00
Thibault
8f4ec6138d Remove unneeded f-string formatting (#1978)
* (fix) rm useless f-string fmt

* (feat) swap negation in if statement

* (fix) rm unused imports
2023-04-22 20:29:48 -07:00
M Starch
124b6e8170 Tutorial/getting started (#1968)
* Revising the getting started tutorial to cover getting started

* Adding a generate step

* Additional generate note

* Clarifying the directory for running commands

* Adding actual output to New Project

* Updating HelloWorld.md with tool output

* Toushing up Deployments.md

* sp

* Fixing spacing

* Removing prereqs

* Update Tutorial.md to move next link
2023-04-18 17:37:41 -07:00
M Starch
3644086829 Fixing RPI CI By Setting Up Downloadable Toolchain (#1855)
* attempring to add sysroot to RPI

* adding set -x to RPI build to debug in Github actions

* Configure RPI to be a cross-compiler

* moving SYSROOT out of GITHUB_WORKSAPCE

* limiting sysroot to RPI builds

* resetting settings

* Using RPI action to procure toolchain

* lestarch: moving clean-up to post run script

* repairing RPI integration tests to latest version

* formating integration tests

* passing in dictionary for RPI

* fixing minor int test problems

* fixing FilterSeverity
2023-01-23 16:51:37 -08:00
Josh Soref
fbfc9ad563 Update check-spelling to v0.0.21 (#1790)
* spelling: async

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: basic

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: file for

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: files

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: generic

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: github.com/nasa/fprime

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: header

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: into

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: multiline

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: sync

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: workaround

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* Update check-spelling to v0.0.21

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: M Starch <LeStarch@googlemail.com>
2022-12-06 10:19:16 -08:00
M Starch
ab38283287 lestarch: updating Ref app to remove phases (#1748)
* lestarch: updating Ref app to remove phases

* lestarch: fixing CI errors

* lestarch: sp

* lestarch: fixing review comments and formatting code

* lestarch: renaming ambiguous files

* lestarch: sp
2022-11-07 17:19:30 -08:00
codeflight1
c5767dff0a Add standard FPP types (#1698)
* Add standard FPP types

* Update LinuxGpioDriver to use new Fw::Logic type

* sp

* RPI deployment fixes
2022-10-04 15:54:30 -07:00
Sean Marquez
e3216ff09e Update cross compile toolchain for raspberrypi in cmake & RPI CI (#1578)
* install cross-compile tools using apt for RPI CI

* apt install `gcc-arm-linux-gnueabihf` & `g++-arm-linux-gnueabihf`
* check `/usr/arm-linux-gnueabihf` directory for RPI tools

* use @astroesteban cmake toolchain for raspberrypi

see https://github.com/nasa/fprime/issues/1163#issuecomment-1007810914

* check for arm toolchain by env var then PATH

Check environment variable, RPI_TOOLCHAIN_DIR, first.
If RPI_TOOLCHAIN_DIR not set, then check PATH

See https://github.com/nasa/fprime/issues/1163#issuecomment-1133375177

* update expect.txt in .github/actions/spelling

add to expect.txt:
  db
  multiarch
  objcopy
  objdump

* fix typo for Raspberry in raspberrypi.cmake

* set ARM toolchain variables using find_program()

* add gdb to .github/actions/spelling/expect.txt

* lestarch: removing GDB since it isn't used

The build is failing to find gdb-multiarch, but GDB itself is not used in the CMake system.  Thus, I am removing it here and leaving it up to the user to install/run their tooling.

* lestarch: updateing installation in RPI readme

Co-authored-by: M Starch <LeStarch@googlemail.com>
2022-09-19 13:28:41 -07:00
M Starch
b76d8c9a0c Update/types refactor as constants (#1623)
* lestarch: adding logical types implementation into Linux/StandardTypes.hpp

* lestarch: removing VxWorks StandardTypes from repository

* updated fprime types for correct compilation with vxworks and baremetal

* lestarch: refactoring types and configuration header w.r.t type design

* lestarch: replacing usages of AssertArg with FwAssertArgType

* lestarch: missspelled configuration

* lestarch: minor compilation fixes

* lestarch: renaming StandardTypes.hpp -> PlatformTypes.hpp

* lestarch: updating PRI tokens

* lestarch: replacing BasicTypes.hpp includes with FpConfig.hpp

* lestarch: UT and compilation fixes for types refactor

* lestarch: sp

* lestarch: fixing RPI issues in PassiveConsoleTextLogger

* lestarch: converting RPI build to debug

* lestarch: removing duplicate config imports

* lestarch: fixing documentation

* lestarch: fixing up multiple definitions and RPI compilation problems

* lestarch: reverting debug build

* lestarch: reverting platform types to class-based constants

* lestarch: reworking basic types

* lestarch: configured types refactor into classes

* lestarch: fixing bugs with static constants in classes

* lestarch: fixing platform types spelling and documentation

* lestarch: adding include guards to types headers

Co-authored-by: Kevin F Ortega <kevin.f.ortega@jpl.nasa.gov>
2022-08-18 13:25:56 -07:00
M Starch
6822a4fd21 lestarch: adding baud rate values to enum and fixing read size int buffer (#1610)
* lestarch: adding baud rate values to enum and fixing read size int buffer

* lestarch: moving configuration into open call
2022-08-07 21:07:27 -06:00
M Starch
ff2aee29f5 lestarch: reworked linux serial driver into linux uart driver following byte stream driver model (#1597)
* lestarch: reworked linux serial driver into linux uart driver following byte stream driver model

* lestarch: reworking RPI demo for new serial driver

* lestarch: removing unnecessary UartFramer

* lestarch: cleaning-up CI failures and spelling

* lestarch: UART driver code quality enhancements

* lestarch: removing one final TODO

* lestarch: removing DR_ from event names

* lestarch: sp

* lestarch: removing unused stubs/test and adding port comments per-review
2022-08-03 11:36:39 -07:00
Timothy Canham
ba4d16d16f Latest ActiveRateGroup updates (#1510)
* Merged files from old branch

* Corrected instances

* Math tutorial version
2022-06-22 09:43:22 -07:00
Timothy Canham
ddcb2ec138 Update RateGroupDriver to new constructor and configure() function (#1467)
* Updated RateGroupDriver. Moved constructor arguments to new configure() call

* Updated topology to new RateGroupDriver constructor and configure() function

* Updated docs, added assert to make sure it is configured

* Fixed RPI and MathComponent tutorial code

* Fixed configure description

* Moved rgDivs back to configObjects

* Fixed typo in rateGroupDriver instance

* Updated RPI and MathComponent RDG FPP
2022-05-27 12:43:46 -07:00
Rob Bocchino
63bebd2634 Revise instance definitions in Ref and RPI topologies (#1473)
* Revise Ref topology model

Update FPP version
Use new FPP syntax for concrete instance types

* Revise RPI example

Use new FPP syntax for instance types

* Revise Ref and RPI topologies

Use new FPP syntax for LinuxTime instance

* Update FPP version

* Update FPP version

* Revise Ref topology

Remove special C++ code for blockDriver

* Update RPI topology

Remove specialized code for declaring linuxTimer instance

* Update FPP version

* lestarch: bumping latest version of FPP

* Update .lgtm.yml

* lestarch: installing sbt

* lestarch: adding pip upgrade

Co-authored-by: M Starch <LeStarch@googlemail.com>
2022-05-24 15:31:59 -07:00
M Starch
e41886640e lestarch: fixing issues with small stack sizes (#1427) 2022-04-28 19:31:17 -07:00
M Starch
073843ad9e Update/object names 0 (#1389)
* lestarch: stripping out FW_OBJECT_NAMES from Autocoder tests

* lestarch: scrubbing FW_OBJECT_NAMES from templates

* lestarch: scrubbing FW_OBJECT_NAMES from templates dir

* lestarch: fixing polytype toString usage

* lestarch: fixing more FW_OBJECT_NAMES
2022-04-12 18:05:34 -07:00
Sadra Yahyapour
edc2f1c4d3 Using TAB escape sequence instead of pure spaces (#1353)
* using \t instead if raw spaces

* isort observed

* black observed
2022-04-12 12:38:49 -07:00
M Starch
31260eda69 lestarch: fixing RPI readme for ground system runs (#1183)
* lestarch: fixing RPI readme for ground system runs

* lestarch: fixing RPI dictionary path
2021-12-21 14:23:57 -08:00
M Starch
9cf3305f19 lestarch: fixing RPI integration tests for renamed symbols 2021-12-13 11:03:34 -08:00
M Starch
ab9114401c Merge branch 'issue-1144-fpp-models' into update/rpi-int-v3.0.0 2021-12-13 09:49:07 -08:00
M Starch
c39065b835 lestarch: initial implementation of RPI integration tests
lestarch: bash syntax error in RPI integration

lestarch: misstyped variable name

lestarch: fixing glob pattern

lestarch: missing test directory

lestarch: a more complete artifact

lestarch: fixing copy

lestarch: copying with permissions

lestarch: fixing RPI CI path

lestarch: fixing RPI integration test

lestarch: more careful killing of binary

lestarch: better RPI running from scratch
2021-12-10 13:14:35 -08:00
bocchino
9c833e648e Revise RPI topology 2021-12-09 20:22:03 -08:00
bocchino
4ad23653fe Remove trailing spaces 2021-12-09 20:07:25 -08:00
bocchino
7d133020fa Revise comment 2021-12-09 18:04:09 -08:00
bocchino
ccec2d5ca4 Revise RPI topology 2021-12-09 17:56:04 -08:00
bocchino
a14e4bba2d Revise RPI topology 2021-12-09 14:45:50 -08:00
bocchino
f2f9116f02 Revise RPI topology 2021-12-09 14:36:21 -08:00
bocchino
7b51020e85 Revise RPI topology 2021-12-09 14:23:18 -08:00
bocchino
a3c4a9c7e2 Revise RPI topology 2021-12-09 14:20:00 -08:00
bocchino
e9229179b0 Revise RPI topology 2021-12-09 14:09:51 -08:00
bocchino
3e0dfffbd4 Remove unused file in RPI app 2021-12-09 14:02:56 -08:00
bocchino
5d653658e4 Revise RPI demo app 2021-12-09 14:02:28 -08:00
bocchino
17870bbf16 Revise RPI demo 2021-12-09 11:00:05 -08:00
bocchino
9f60f20b4a Revise RPI demo 2021-12-09 10:56:11 -08:00
bocchino
886e191a0e Revise RPI deployment 2021-12-09 09:35:14 -08:00