-
Notifications
You must be signed in to change notification settings - Fork 15
Generate not working for RP2040 #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This builds on-top of |
This repo will work you through the setup: https://github.com/fprime-community/fprime-baremetal-reference |
@LeStarch I have the arduino-cli installed and working as well as the rp2040 board package. |
@csmith608 is arduino-cli on your PATH? |
|
There is a bug in the arduino-cli-wrapper package I also notice you are in Python3.8. This may have worked in newer versions of Python. |
I'd recommend:
If this fixes the problem, then we can patch that script. If more problems abound, run |
The fixed that, then it complained about the TcpClient send port, so I changed it from
To
I don't think I can make the PR for the arduino-cli-cmake-wrapper, but I could for the TcpClient |
I fixed the The fprime-arduino devel branch should build for the RP2040 now. |
fprime-util generate fails with logs:
fprime-util version-check:
arduino-cli version:
Does anyone knows how to fix it or what could be the reason? |
Did you run: arduino-cli lib install Time |
@ethancheez thank you, it helped. Generate was successfully finished, but the next step (build) fails:
What am I missing now? And, by the way, there weren't in instruction this command "arduino-cli lib install Time" or I have missed something? |
The instructions for that are here. As for the build error, it is caused by When you run
What version is yours reporting? |
Thank you. I have used this one and it seems to be deprecated.
|
The suspicious is the following warning during build: |
Mine is also reporting GNU 12.3.0.
I am also getting this, but mine successfully builds. I will try some tests to see if I can reproduce your error. |
Okay. I will be waiting for your feedback. I'm ready to give necessary information for you to reproduce the problem. |
Can you show me your output of |
|
Try out fprime release v3.4.3. In the fprime directory, run Edit: If that doesn't work, try edit set(CMAKE_CXX_STANDARD 17) This is only temporary, trying to see if the Edit 2: You can also try running |
It seems that amount of errors decreased:
|
It seems to me that errors related to "1'000'000" disappeared after I modified settings.cmake. But it doesn't recognize toascii function |
I have made brute force fix of the problem by replacing isascii (c) == 0 with ((c) & ~0x7f) != 0 and toascii(c) with ((c) & 0x7f). |
@ethancheez what is you fprime-util version-check and arduino-cli version?
|
Operating System: Linux
CPU Architecture: x86_64
Platform: Linux-4.4.0-22621-Microsoft-x86_64-with-glibc2.35
Python version: 3.10.12
CMake version: 3.29.6
Pip version: 24.1.2
Pip packages:
fprime-tools==3.4.4
fprime-gds==3.4.3
fprime-fpp-*==2.1.0a3 arduino-cli Version: 1.0.2 Commit: 33dfa8e8 Date: 2024-07-02T12:53:01Z Let's try some things to avoid having to edit the RP2040 package files and fprime core files. In add_compile_options(-D_BOARD_RPIPICOW -DUSE_BASIC_TIMER -D_GNU_SOURCE) |
It seems to fix problem with isascii and toascii functions, but the problem with c++ standards remains(I have returned original value in
|
Can you try changing to this in the add_compile_options(-std=c++17 -std=gnu++17 -std=gnu17) # Force C++17 standard This will add a bunch of warnings saying something like Edit: Also try to remove all the flags except the add_compile_options(-std=c++17) # Force C++17 standard |
@ethancheez, neither the first approach, nor the second one helped. By the way, was you able to reproduce this issue on your side? Is this only on my side? |
I was not able to reproduce it. I tried a completely new Ubuntu VM and reinstalled everything and successfully builds. Do you mind listing the steps you took to create your project? These were my steps (the important parts). If you followed the tutorial step by step, you would run python -m venv ~/venv/fprime
. ~/venv/fprime/bin/activate
pip install fprime-bootstrap
fprime-bootstrap clone https://github.com/fprime-community/fprime-tutorial-arduino-blinker.git
cd fprime-tutorial-arduino-blinker
. ~/fprime-venv/bin/activate
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=$VIRTUAL_ENV/bin sh
pip install arduino-cli-cmake-wrapper
arduino-cli config init
arduino-cli config add board_manager.additional_urls https://www.pjrc.com/teensy/package_teensy_index.json
arduino-cli config add board_manager.additional_urls https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
arduino-cli config add board_manager.additional_urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
arduino-cli config add board_manager.additional_urls https://mcudude.github.io/MegaCore/package_MCUdude_MegaCore_index.json
arduino-cli config add board_manager.additional_urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
arduino-cli core update-index
arduino-cli core install teensy:avr
arduino-cli core install adafruit:samd
arduino-cli core install esp32:esp32
arduino-cli core install MegaCore:avr
arduino-cli core install rp2040:rp2040
arduino-cli lib install Time
fprime-util generate rpipicow
fprime-util build rpipicow -j8 |
Followed through your steps and faced with the same problem:
Note:
Here is my version of Python and Ubuntu:
@ethancheez what is your version of Ubuntu and Python? |
ethan@ethancheez:~$ python --version
Python 3.10.12
ethan@ethancheez:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy |
@ethancheez hi! Could you please add the following lines to your rpipicow.cmake:
Show me your logs for build of some object (let it be Fw_Logger.dir/Logger.cpp.obj) :
Suspicious moments:
|
Looks like my build is using C++17. I also get the |
@ethancheez have you any ideas, in what directions I should watch to debug this issue. |
I've followed through steps that you described on WSL1 with Ubuntu22.04 but result again the same. |
Something I noticed in your verbose output, take a look at the `'-v' '-v' '-std=c++17' '-std=gnu++17' '-D' '_BOARD_RPIPICOW' '-D' 'USE_BASIC_TIMER' '-D' '_GNU_SOURCE' '-std=c++11` The Here is my order: '-v' '-std=c++11' '-std=c++17' '-std=gnu++17' '-D' '_BOARD_RPIPICOW' '-D' 'USE_BASIC_TIMER' Now we just have to figure out why the Some random things to try:
|
@ethancheez update of Cmake helped! Everything seems to build without any issues now.
The order of flags now: @ethancheez thank you a lot for you help and work! |
Just to clarify does your project with activated verbose flags fully build?
Without verbose flags everything seems to work fine as I described above. |
Yeah I have been getting the same error with the verbose flag. Unsure why. Seems to only happen when you run |
Got it. Thank you. |
I believe the system requirements for F Prime itself is CMake 3.16 or newer, which you did have. It's just the RPi Pico Arduino package requires a newer CMake version. It might be possible to add it to the |
This could be added as a |
@ethancheez and @LeStarch thank you for your responses and suggested solutions.
|
Closing. Issue resolved, will add the |
Hello,
I've been trying to run the arduino led blinker tutorial on the RP2040. https://fprime-community.github.io/fprime-tutorial-arduino-blinker/
I'm getting stuck on the first
fprime-util generate
. I'm getting the error shown belowHere's my settings.ini file
Some observations:
pip install -U fprime-tools
Any ideas? Let me know if you need any more information
The text was updated successfully, but these errors were encountered: