Skip to content

Please update the Raspberry compiler toolchain #990

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

Closed
github-rkaiser opened this issue Apr 14, 2025 · 3 comments
Closed

Please update the Raspberry compiler toolchain #990

github-rkaiser opened this issue Apr 14, 2025 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@github-rkaiser
Copy link

Please update the compiler toolchains for the boards. For Raspberry gcc version 14 is available for some time.

For Raspberry Pico gcc is currently on Version 7.2.1,
For Raspberry Pico W beta gcc is currently on Version 10.3.0,

Thanks
Richard

@github-rkaiser github-rkaiser added the enhancement New feature or request label Apr 14, 2025
@urish urish self-assigned this Apr 21, 2025
@urish
Copy link
Contributor

urish commented Apr 21, 2025

Updated the community Arduino core to the latest version, 4.5.2.

You can see an example here: https://wokwi.com/projects/428871464465633281

@urish urish closed this as completed Apr 21, 2025
@github-rkaiser
Copy link
Author

Hi Urish,

thanks for your blog post.
However, I still get the gcc version 7.2.1 when executing

#include <string>
#include <iostream>

void show_gcc_version()
{ 
  Serial1.println("Examples: Various ways to print the GCC Version ");
  Serial1.print("1. Serial.println GCC Version: ");
  Serial1.print(__GNUC__); Serial.print(".");
  Serial1.print(__GNUC_MINOR__); Serial.print(".");
  Serial1.println(__GNUC_PATCHLEVEL__);

  std::string vs = "std::string GCC Version: " +
    std::to_string(__GNUC__) +
    "." + std::to_string(__GNUC_MINOR__) +
    "." + std::to_string(__GNUC_PATCHLEVEL__);
  printf("%s\n", ("4. printf " + vs).c_str()); // printf in the C++ way
  Serial.println(("5. Serial.println " + vs).c_str());
  // 5. Serial.println accepts char* arguments, but not std::string 
                                                     // arguments 
}

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
  Serial1.begin(115200);
  Serial1.println("Hello, Raspberry Pi Pico!");  
  // Serial1.println("Core version: " + String(ARDUINO_PICO_VERSION_STR));
  // Serial1.println("SDK version: " + String(PICO_SDK_VERSION_STRING));
  show_gcc_version();
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(500);
  digitalWrite(LED_BUILTIN, LOW);
  delay(500);
}

What I need is a current version of the gcc compiler, as I get it for ESP32 or STM32 projects.

Thanks
Richard

@urish
Copy link
Contributor

urish commented Apr 22, 2025

Hi Richard,

The toolchain is not directly maintained by us - it's part of the Raspberry Pi Pico Arduino core. I updated my demo project to print the GCC version, in a similar fashion to your example code, and it says 14.2.0:

https://wokwi.com/projects/428871464465633281

Note that for the Pi Pico, you need to set the "env" attribute in diagram.json to "arduino-community" to build with the up to date core, as in the following example:

  "parts": [
    {
      "type": "wokwi-pi-pico",
      "id": "pico",
      "top": 0,
      "left": 0,
      "attrs": { "env": "arduino-community" }
    }
  ],

This is now the default for all new projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants