Skip to content

Commit

Permalink
Downgrade GCC version to 8 for arduino, verbose and single threaded c…
Browse files Browse the repository at this point in the history
…ompilation for error debugging
  • Loading branch information
maxgerhardt committed Feb 3, 2024
1 parent ab4dafc commit 83666d5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:
pio pkg install --global --platform symlink://.
- name: Build examples
run: |
pio run -d ${{ matrix.example }}
pio run -d ${{ matrix.example }} -v -j1
12 changes: 9 additions & 3 deletions platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,19 @@ def get_boards(self, id_=None):
def configure_default_packages(self, variables, targets):
# until toolchain is not yet approved in PIO registry: redirect packages at will here
# (temporary)
selected_frameworks = variables.get("pioframework", [])
gcc_branch = "#gcc12"
if "arduino" in selected_frameworks:
# we downgrade the GCC version to just 8 because with 12, there are build errors.
gcc_branch = ""
if IS_LINUX:
self.packages["toolchain-riscv"]["version"] = "https://github.com/Community-PIO-CH32V/toolchain-riscv-linux.git#gcc12"
self.packages["toolchain-riscv"]["version"] = "https://github.com/Community-PIO-CH32V/toolchain-riscv-linux.git%s" % gcc_branch
elif IS_MAC:
self.packages["toolchain-riscv"]["version"] = "https://github.com/Community-PIO-CH32V/toolchain-riscv-mac.git#gcc12"
self.packages["toolchain-riscv"]["version"] = "https://github.com/Community-PIO-CH32V/toolchain-riscv-mac.git" % gcc_branch
else:
self.packages["toolchain-riscv"]["version"] = "https://github.com/Community-PIO-CH32V/toolchain-riscv-windows.git" % gcc_branch
if not variables.get("board"):
return super().configure_default_packages(variables, targets)
selected_frameworks = variables.get("pioframework", [])
# The FreeRTOS, Harmony LiteOS and RT-Thread package needs the
# NoneSDK as a base package
if any([framework in selected_frameworks for framework in ("freertos", "harmony-liteos", "rt-thread", "tencent-os")]):
Expand Down

0 comments on commit 83666d5

Please sign in to comment.