fprime-community / fprime-baremetal-reference

Apache License 2.0
5 stars 4 forks source link

`The dependency target "Arduino_Drv_I2cDriver" of target "BaremetalReference_Top" does not exist` while running `fprime-util generate` #9

Closed capsulecorplab closed 1 year ago

capsulecorplab commented 1 year ago

Screenshot from 2023-07-23 16-27-44

ethancheez commented 1 year ago

@capsulecorplab This is because my PR for the I2C driver hasn't been merged yet. You can either switch to my fprime-arduino branch or manually add the I2C driver to your project.

https://github.com/ethancheez/fprime-arduino.git

My main branch should be updated.

capsulecorplab commented 1 year ago

Yup, adding your fprime-arduino library was able to generate the build cache! Ran into an undefined symbol error while attempting to build though Screenshot from 2023-07-23 20-05-07

ethancheez commented 1 year ago

Yup, adding your fprime-arduino library was able to generate the build cache! Ran into an undefined symbol error while attempting to build though

I was unable to reproduce this error. Could you check your project if lib/fprime-baremetal/Svc/TlmLinearChan is included?

capsulecorplab commented 1 year ago

Yup, adding your fprime-arduino library was able to generate the build cache! Ran into an undefined symbol error while attempting to build though

I was unable to reproduce this error. Could you check your project if lib/fprime-baremetal/Svc/TlmLinearChan is included?

Yup, lib/fprime-baremetal/Svc/TlmLinearChan is there

ethancheez commented 1 year ago

Yup, adding your fprime-arduino library was able to generate the build cache! Ran into an undefined symbol error while attempting to build though

I was unable to reproduce this error. Could you check your project if lib/fprime-baremetal/Svc/TlmLinearChan is included?

Yup, lib/fprime-baremetal/Svc/TlmLinearChan is there

This was my attempt to reproduce the error:

git clone --recurse-submodules  https://github.com/fprime-community/fprime-baremetal-reference.git
cd fprime-baremetal-reference/
fprime-util generate
fprime-util build -j4

The build succeeded, generating binaries for all deployments: BaremetalReference, RadioPassthrough, and BaseDeployment. My only theory on why the undefined symbol error occurs is if the fprime-baremetal/Svc/TlmLinearChan/TlmLinearChan.fpp file is not included.

If you navigate directly into the lib/fprime-baremetal/Svc/TlmLinearChan directory and run fprime-util build, does it build?

capsulecorplab commented 1 year ago

No, it fails to detect target. I'm not using the devel version of fprime-tools or fprime-gds, if that could be the issue Screenshot from 2023-07-24 11-28-45

ethancheez commented 1 year ago

No, it fails to detect target. I'm not using the devel version of fprime-tools or fprime-gds, if that could be the issue

I tested building using these versions and was successful:

fprime-fpp                1.2.0
fprime-gds                3.2.1a1
fprime-tools              3.2.1

Just making sure, you did not modify any of the cmake files after cloning?

The settings.ini file should include:

library_locations:  ./lib/arduino/fprime-arduino:./lib/fprime-baremetal

Which includes lib/fprime-baremetal/fprime-baremetal.cmake, which includes lib/fprime-baremetal/Svc/CMakeLists.txt, which includes lib/fprime-baremetal/Svc/TlmLinearChan/CMakeLists.txt.

capsulecorplab commented 1 year ago

The settings.ini file should include:

library_locations:  ./lib/arduino/fprime-arduino:./lib/fprime-baremetal

Ah, that could be the issue. I commented that line out and replaced it with just a path to your fork of fprime-arduino Screenshot from 2023-07-24 14-44-51

Let me fix that...

capsulecorplab commented 1 year ago

I reverted any changes to settings.ini and set the head commit in lib/arduino/fprime-arduino to your fork and that fixed the build! Screenshot from 2023-07-24 14-53-06 Screenshot from 2023-07-24 14-58-11

Now I just need to wait for my Teensy 4.1 to arrive in the mail to actually flash/test it :upside_down_face:

ethancheez commented 1 year ago

Now I just need to wait for my Teensy 4.1 to arrive in the mail to actually flash/test it :upside_down_face:

The baremetal reference uses the RFM69 radio to communicate. You would also need two RFM69 breakout boards and two Teensy 4.1 boards.

Or you can get two Feather M0s

capsulecorplab commented 1 year ago

The baremetal reference uses the RFM69 radio to communicate. You would also need two RFM69 breakout boards and two Teensy 4.1 boards.

Or you can get two Feather M0s

Cool! Any advantage to getting two Feather M0s over two RFM69 breakout boards? What would the 2nd Teensy be for?

ethancheez commented 1 year ago

The baremetal reference uses the RFM69 radio to communicate. You would also need two RFM69 breakout boards and two Teensy 4.1 boards.

Or you can get two Feather M0s

Cool! Any advantage to getting two Feather M0s over two RFM69 breakout boards? What would the 2nd Teensy be for?

There are two separate deployments that communicate to each other via the radio: BaremetalReference and RadioPassthrough.

One Teensy would have the BaremetalReference deployment, and the other Teensy would have the RadioPassthrough deployment. Your GDS would connect to the RadioPassthrough deployment to wirelessly command the BaremetalReference deployment.

The advantage of getting two FeatherM0s is that you don't need to do any manual wiring, the radio is directly integrated into the board.

The advantage of getting two radio breakouts is that you can connect the radios to any board (Teensy, RPi Pico W, ESP32, etc.) to test the Baremetal Reference on various platforms. You can also have a Pico talk to a Teensy and vice versa!

capsulecorplab commented 1 year ago

Ordered a couple of the radio breakout boards + an extra teensy - might as well test with all the platforms :slightly_smiling_face:

capsulecorplab commented 1 year ago

I guess I'll go ahead and close this issue and open any new issues that may arise when attempting to connect and test with hardware. Thanks for all the help @ethancheez !

capsulecorplab commented 1 year ago

I also just noticed there's a 433MHz option that's license-free (which means I don't have to renew my ham license). Would this work as well?

ethancheez commented 1 year ago

I also just noticed there's a 433MHz option that's license-free (which means I don't have to renew my ham license). Would this work as well?

Yes, I believe both the 433 MHz and 915 MHz bands do not require a HAM Radio License. As long as both of your radios operate at the same frequency, you should be fine!