Open capsulecorplab opened 1 year ago
Currently the math component tutorial does not support baremetal because it uses Linux drivers.
Ah, that makes sense
If you want, you could create an Arduino version of the math component tutorial. The Components/
directory would remain untouched. Then you can use my Arduino cookiecutter to create an Arduino-based MathDeployment
by following this from my fprime-arduino-led-blinker
tutorial. Then, add the Math components to your topology.
This might be cheating, but I just forked the fprime-arduino-led-blinker
and added the math components (with deployment + updated topology) here :upside_down_face: So far, the build seems to be working~
Will have to try to build/port/test the deployment for the rpipicow tomorrow morning...
Not much luck with trying to build the math component for the rpipicow :confused:
I can give a few pointers right now (I was able to deploy math component on my Teensy), but I will be able to help more in detail later today.
After taking a peek at your fork, the MathDeployment/
directory you have is still built for Linux systems. Instead, you can directly add the math instances to the LedBlinker
deployment.
You also need to edit the config/
files as those configurations were specific to the fprime-arduino-led-blinker
project. Or, you can use the default config inside of fprime/config/
if you are using a board with sufficient memory (i.e. Teensy 4.1).
Still waiting on my Teensy 4.1 to arrive in the mail, so just testing with the rpipicow for now~
What should I look out for as far as editing the config files?
Still waiting on my Teensy 4.1 to arrive in the mail, so just testing with the rpipicow for now~
What should I look out for as far as editing the config files?
The main ones are the telemetry configurations (TlmChanImplCfg.hpp
) and command dispatcher (CommandDispatcherImplCfg.hpp
). The macros defined in here depend on how many components/commands/telemetries you have.
Feel free to take a look at this.
Bug that needs fixing: Since there's no file system on baremetal, there is no prmDb component so the initial parameter values cannot be loaded (hence the loadParameters() is commented out). Before sending the mathSender.DO_MATH
command, send the mathReceiver.FACTOR_PRM_SET
command with a val
of 1
.
Shot in the dark, but attempted to build the fprime-tutorial-math-component project using @ethancheez's fprime-arduino fork on the
rpipicow
branch with theconfig
folder andsettings.ini
(withdefault_toolchain
set torpipicow
) from fprime-arduino-led-blinker, but encountered a few cmake errors Has anyone else had more success attempting to build the math component for anfprime-arduino
platform?