-
|
Hello everyone, I'm trying to build the payload image for a pico 2 board (rp2350 - instead of the older rp2040) how do I change/extend that to also include RP2350? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
|
Hi Marcel, The preprocessor directives such as the one you posted are there so the STEM Payload code can be compiled for the original Sparkfun Pro Micro, STM32 blue pill, or the Raspberry Pi Pico or Pico W microcontrollers. When the Pico 2 first came out, I tried it and ran into some problems, but I don't remember what they were. I also don't know if there is a preprocessor Macro specifically for the Pico 2 RP2350 or not. By the way, I still recommend using the Arduino v1.8.x Legacy IDE so all my instructions refer to it. This Wiki page has the full instructions for installing the board files and libraries so you can compile the code: https://github.com/alanbjohnston/CubeSatSim/wiki/Adding-New-Sensors So my first question is, are you using this environment? If you are using a different environment, I can't give you specific instructions but you should be able to figure out what to do. The recommended board file (Raspberry Pi Pico/RP2040 by Earle F. Philhower, III Board file - see the above Wiki page for how to install it in the v1.18.x IDE) says it supports the Pico 2, and I was able to go under the menu I don't have my Pico 2 with me so I can't test if this works or not, but if you are able to try it and test it and let me know, that would be great. It is also possible that the preprocessor directives need to be removed in order to get the code to actually work for the Pico 2. I can provide some suggestions on how to do this if you are able to compile the code but it doesn't work. The code will then only run on the Pico 2 and not the other microcontrollers, but that doesn't matter to you. Hopefully we can get this working. However, I will say that we don't need any of the capabilities of the Pico 2 for this application, so I would still recommend just buying the cheaper Pico W and using the code without modification. Alan |
Beta Was this translation helpful? Give feedback.
-
|
found the issue with the linker - I'm missing payload_extension.cpp. simplified the code by removing preprocessor directives and now compiling seems to work with IDE 2.3.6 and the latest version of all modules. Still need to verify/test all of it. |
Beta Was this translation helpful? Give feedback.
-
|
getting some output. Still awaiting the FM and GPS module so can't test fully - but progress nevertheless. Squelch: 1 Values of the MPU6050 change if the PCB is moved around - I take that as "it works". re extension sensors: I plan on adding an air quality/PM sensor - given the drifting smoke from the wildfires, this should provide some interesting data. Marcel |
Beta Was this translation helpful? Give feedback.
-
|
Update - and resolution: looks like ARDUINO_ARCH_PR2040 also covers the RP2350. Adding (or commenting out) payload_setup()/payload_loop() solved my issue. Built the payload from a fresh copy without any modification and uploaded to the Pico 2. Works as advertised. Environment: Marcel |
Beta Was this translation helpful? Give feedback.
Update - and resolution:
looks like ARDUINO_ARCH_PR2040 also covers the RP2350. Adding (or commenting out) payload_setup()/payload_loop() solved my issue. Built the payload from a fresh copy without any modification and uploaded to the Pico 2. Works as advertised.
Environment:
Arduino IDE 2.3.6
https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json - latest version
latest version of BME280 and MPU6050
Marcel