Skip to content

Commit 3e0ccae

Browse files
btashtonxiaoxiang781216
authored andcommitted
Add support for building avr targets
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
1 parent 03707e5 commit 3e0ccae

File tree

4 files changed

+25
-5
lines changed

4 files changed

+25
-5
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
strategy:
2525
matrix:
26-
boards: [arm-01, arm-02, arm-03, arm-04, arm-05, arm-06, arm-07, arm-08, arm-09, arm-10, arm-11, arm-12, arm-13, mips-riscv-x86-xtensa, sim]
26+
boards: [arm-01, arm-02, arm-03, arm-04, arm-05, arm-06, arm-07, arm-08, arm-09, arm-10, arm-11, arm-12, arm-13, avr-mips-riscv-x86-xtensa, sim]
2727
steps:
2828
- name: Checkout nuttx repo
2929
uses: actions/checkout@v2
@@ -79,7 +79,7 @@ jobs:
7979

8080
strategy:
8181
matrix:
82-
boards: [arm-12, mips-riscv-x86-xtensa, sim]
82+
boards: [arm-12, avr-mips-riscv-x86-xtensa, sim]
8383

8484
steps:
8585
- name: Checkout nuttx repo

cibuild.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ EXTRA_PATH=
3636

3737
case $os in
3838
Darwin)
39-
install="python-tools u-boot-tools discoteq-flock elf-toolchain gen-romfs kconfig-frontends arm-gcc-toolchain riscv-gcc-toolchain xtensa-esp32-gcc-toolchain"
39+
install="python-tools u-boot-tools discoteq-flock elf-toolchain gen-romfs kconfig-frontends arm-gcc-toolchain riscv-gcc-toolchain xtensa-esp32-gcc-toolchain avr-gcc-toolchain"
4040
mkdir -p ${prebuilt}/homebrew
4141
export HOMEBREW_CACHE=${prebuilt}/homebrew
4242
;;
@@ -214,6 +214,17 @@ function xtensa-esp32-gcc-toolchain {
214214
pip3 install esptool
215215
}
216216

217+
function avr-gcc-toolchain {
218+
if ! type avr-gcc > /dev/null; then
219+
case $os in
220+
Darwin)
221+
brew tap osx-cross/avr
222+
brew install avr-gcc
223+
;;
224+
esac
225+
fi
226+
}
227+
217228
function c-cache {
218229
add_path $prebuilt/ccache/bin
219230

docker/linux/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# License for the specific language governing permissions and limitations
1414
# under the License.
1515

16-
FROM ubuntu:19.04 AS builder-base
16+
FROM ubuntu:19.10 AS builder-base
1717
# NOTE WE ARE NOT REMOVEING APT CACHE.
1818
# This should only be used for temp build images that artifacts will be copied from
1919
RUN apt-get update -qq && apt-get install -y -qq \
@@ -122,7 +122,7 @@ RUN cp /tools/esp-idf/examples/get-started/hello_world/build/partition_table/par
122122
# Final Docker image used for running CI system. This includes all toolchains
123123
# supported by the CI system.
124124
###############################################################################
125-
FROM ubuntu:19.04
125+
FROM ubuntu:19.10
126126
LABEL maintainer="dev@nuttx.apache.org"
127127

128128
RUN dpkg --add-architecture i386
@@ -132,6 +132,8 @@ RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
132132
build-essential \
133133
gcc \
134134
gcc-multilib \
135+
gcc-avr \
136+
avr-libc \
135137
wget \
136138
libx11-dev \
137139
libxext-dev \
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# We do not have a toolchain for avr32 outside of Microchip login wall.
2+
# The work was never upstreamed to GCC.
3+
4+
/avr
5+
-avr32dev1:nsh
6+
-avr32dev1:ostest
7+
18
# PINGUINOL toolchain doesn't provide macOS binaries
29
# with the same name
310
# /mips,CONFIG_MIPS32_TOOLCHAIN_PINGUINOL

0 commit comments

Comments
 (0)