Skip to content

Commit

Permalink
add instructions how to get suitable toolchain (fix gcc-13 Werror)
Browse files Browse the repository at this point in the history
Signed-off-by: Josua Mayer <[email protected]>
  • Loading branch information
Josua-SR committed Jun 23, 2024
1 parent 1d4cce1 commit 3f13952
Show file tree
Hide file tree
Showing 9 changed files with 147 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@


Note:
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one
Expand Down Expand Up @@ -49,6 +52,38 @@ Supported Products:
Either:

- Install natively according to [mynewt documentation](https://mynewt.apache.org/latest/get_started/index.html).
Note: Download links and version numbers in mynewt documentation are outdated. Please instead follow the steps below:

1. Download "newt" tool v1.11:

```
wget https://archive.apache.org/dist/mynewt/apache-mynewt-1.11.0/apache-mynewt-newt-bin-linux-1.11.0.tgz
tar --strip-components=1 -xvf apache-mynewt-newt-bin-linux-1.11.0.tgz apache-mynewt-newt-bin-linux-1.11.0/newt
./newt version
sudo install -v -m755 -o root -g root newt /usr/local/bin/
rm newt
```
2. Download a native compiler targeting your host PC
- On Debian / Ubuntu the native distro-compilers can be used:
sudo apt-get update && sudo apt-get install build-essential
- On openSUSE/SLE the native distro-compilers can be used:
sudo zypper install -t pattern devel_C_C++
3. Download a Cross-Compiler targeting ARM MCUs:
```
wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
tar -xvf arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
export PATH="$PWD/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin:$PATH"
```
Note: The cross-compiler path should be exported each time a new terminal is opened for development purposes.
- Install with docker as a shortcut
sudo apt install docker.io
Expand Down
14 changes: 14 additions & 0 deletions targets/imx8mqsom-nina-b1_blehci/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,17 @@ pkg.type: target
pkg.description:
pkg.author:
pkg.homepage:

pkg.cflags:
# newt 1.11: GCC 13.2 complains about error below, downgrade error to warning
# Error: repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c: In function 'hal_timer_stop':
# repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c:933:17: error: 'entry' may be used uninitialized [-Werror=maybe-uninitialized]
# 933 | nrf_timer_set_ocmp((struct nrf52_hal_timer *)entry->bsp_timer,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 934 | entry->expiry);
# | ~~~~~~~~~~~~~~
# repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c:911:23: note: 'entry' was declared here
# 911 | struct hal_timer *entry;
# | ^~~~~
# cc1: all warnings being treated as errors
- "-Wno-maybe-uninitialized"
14 changes: 14 additions & 0 deletions targets/imx8mqsom-nina-b1_boot/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,17 @@ pkg.type: target
pkg.description:
pkg.author:
pkg.homepage:

pkg.cflags:
# newt 1.11: GCC 13.2 complains about error below, downgrade error to warning
# Error: repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c: In function 'hal_timer_stop':
# repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c:933:17: error: 'entry' may be used uninitialized [-Werror=maybe-uninitialized]
# 933 | nrf_timer_set_ocmp((struct nrf52_hal_timer *)entry->bsp_timer,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 934 | entry->expiry);
# | ~~~~~~~~~~~~~~
# repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c:911:23: note: 'entry' was declared here
# 911 | struct hal_timer *entry;
# | ^~~~~
# cc1: all warnings being treated as errors
- "-Wno-maybe-uninitialized"
14 changes: 14 additions & 0 deletions targets/ssn6-fwm7blz22_blehci/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,17 @@ pkg.type: target
pkg.description:
pkg.author:
pkg.homepage:

pkg.cflags:
# newt 1.11: GCC 13.2 complains about error below, downgrade error to warning
# Error: repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c: In function 'hal_timer_stop':
# repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c:933:17: error: 'entry' may be used uninitialized [-Werror=maybe-uninitialized]
# 933 | nrf_timer_set_ocmp((struct nrf52_hal_timer *)entry->bsp_timer,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 934 | entry->expiry);
# | ~~~~~~~~~~~~~~
# repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c:911:23: note: 'entry' was declared here
# 911 | struct hal_timer *entry;
# | ^~~~~
# cc1: all warnings being treated as errors
- "-Wno-maybe-uninitialized"
14 changes: 14 additions & 0 deletions targets/ssn6-fwm7blz22_boot/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,17 @@ pkg.type: target
pkg.description:
pkg.author:
pkg.homepage:

pkg.cflags:
# newt 1.11: GCC 13.2 complains about error below, downgrade error to warning
# Error: repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c: In function 'hal_timer_stop':
# repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c:933:17: error: 'entry' may be used uninitialized [-Werror=maybe-uninitialized]
# 933 | nrf_timer_set_ocmp((struct nrf52_hal_timer *)entry->bsp_timer,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 934 | entry->expiry);
# | ~~~~~~~~~~~~~~
# repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c:911:23: note: 'entry' was declared here
# 911 | struct hal_timer *entry;
# | ^~~~~
# cc1: all warnings being treated as errors
- "-Wno-maybe-uninitialized"
14 changes: 14 additions & 0 deletions targets/ssn6-nina-b111_blehci/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,17 @@ pkg.type: target
pkg.description:
pkg.author:
pkg.homepage:

pkg.cflags:
# newt 1.11: GCC 13.2 complains about error below, downgrade error to warning
# Error: repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c: In function 'hal_timer_stop':
# repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c:933:17: error: 'entry' may be used uninitialized [-Werror=maybe-uninitialized]
# 933 | nrf_timer_set_ocmp((struct nrf52_hal_timer *)entry->bsp_timer,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 934 | entry->expiry);
# | ~~~~~~~~~~~~~~
# repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c:911:23: note: 'entry' was declared here
# 911 | struct hal_timer *entry;
# | ^~~~~
# cc1: all warnings being treated as errors
- "-Wno-maybe-uninitialized"
14 changes: 14 additions & 0 deletions targets/ssn6-nina-b111_boot/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,17 @@ pkg.type: target
pkg.description:
pkg.author:
pkg.homepage:

pkg.cflags:
# newt 1.11: GCC 13.2 complains about error below, downgrade error to warning
# Error: repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c: In function 'hal_timer_stop':
# repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c:933:17: error: 'entry' may be used uninitialized [-Werror=maybe-uninitialized]
# 933 | nrf_timer_set_ocmp((struct nrf52_hal_timer *)entry->bsp_timer,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 934 | entry->expiry);
# | ~~~~~~~~~~~~~~
# repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c:911:23: note: 'entry' was declared here
# 911 | struct hal_timer *entry;
# | ^~~~~
# cc1: all warnings being treated as errors
- "-Wno-maybe-uninitialized"
14 changes: 14 additions & 0 deletions targets/ssn6-nina-b301_blehci/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,17 @@ pkg.type: target
pkg.description:
pkg.author:
pkg.homepage:

pkg.cflags:
# newt 1.11: GCC 13.2 complains about error below, downgrade error to warning
# Error: repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c: In function 'hal_timer_stop':
# repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c:933:17: error: 'entry' may be used uninitialized [-Werror=maybe-uninitialized]
# 933 | nrf_timer_set_ocmp((struct nrf52_hal_timer *)entry->bsp_timer,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 934 | entry->expiry);
# | ~~~~~~~~~~~~~~
# repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c:911:23: note: 'entry' was declared here
# 911 | struct hal_timer *entry;
# | ^~~~~
# cc1: all warnings being treated as errors
- "-Wno-maybe-uninitialized"
14 changes: 14 additions & 0 deletions targets/ssn6-nina-b301_boot/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,17 @@ pkg.type: target
pkg.description:
pkg.author:
pkg.homepage:

pkg.cflags:
# newt 1.11: GCC 13.2 complains about error below, downgrade error to warning
# Error: repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c: In function 'hal_timer_stop':
# repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c:933:17: error: 'entry' may be used uninitialized [-Werror=maybe-uninitialized]
# 933 | nrf_timer_set_ocmp((struct nrf52_hal_timer *)entry->bsp_timer,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 934 | entry->expiry);
# | ~~~~~~~~~~~~~~
# repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_timer.c:911:23: note: 'entry' was declared here
# 911 | struct hal_timer *entry;
# | ^~~~~
# cc1: all warnings being treated as errors
- "-Wno-maybe-uninitialized"

0 comments on commit 3f13952

Please sign in to comment.