Skip to content

Commit

Permalink
bricks/ev3dev: Goodbye.
Browse files Browse the repository at this point in the history
Thank you, David!

Pybricks for ev3dev will continue to be alive and kicking in its original 2.0 form. Since updating to 3.0 and 4.0 is not considered feasible, we are dropping this build to streamline the addition of the upcoming bare metal EV3 port.
  • Loading branch information
laurensvalk committed Jan 15, 2025
1 parent f3895c9 commit f7758da
Show file tree
Hide file tree
Showing 101 changed files with 2 additions and 8,267 deletions.
88 changes: 0 additions & 88 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,94 +83,6 @@ jobs:
if: failure()
run: micropython/tests/run-tests.py --print-failures

ev3dev_stretch:
name: ev3dev-stretch
runs-on: ubuntu-22.04
steps:
- name: Docker login
uses: azure/docker-login@v1
with:
login-server: docker.pkg.github.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install QEMU
run: |
sudo apt-get update
sudo apt-get install qemu-user-static
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Create docker container
run: bricks/ev3dev/docker/setup.sh armel
- name: Build
run: |
docker exec --tty pybricks-ev3dev_armel make -C ../../micropython/mpy-cross CROSS_COMPILE=
docker exec --tty pybricks-ev3dev_armel make
- name: Test
if: ${{ success() }}
run: |
docker exec --tty pybricks-ev3dev_armel make test-ev3dev
- name: List failed tests
if: failure()
run: micropython/tests/run-tests.py --print-failures
- name: Short hash
id: vars
run: echo "short_sha=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_OUTPUT
- name: Upload pybricks-micropython
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: pybricks-micropython-build-${{ github.run_number }}-git${{ steps.vars.outputs.short_sha }}
path: bricks/ev3dev/build-armel/pybricks-micropython

ev3dev_ubuntu_lts:
name: ev3dev-ubuntu-lts
needs: mpy_cross
runs-on: ubuntu-22.04
env:
CROSS_COMPILE: ""
steps:
- name: Install rerequisites
run: |
sudo apt-add-repository --update --yes ppa:ev3dev/tools
sudo apt-get install --no-install-recommends --yes \
alsa-utils \
espeak \
ev3dev-media \
ev3dev-mocks \
libasound2-plugin-ev3dev \
libffi-dev \
libgrx-3.0-dev \
libi2c-dev \
libudev-dev \
libumockdev0 \
pkg-config \
uthash-dev \
xfonts-100dpi
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: true
- name: Download mpy-cross
uses: actions/download-artifact@v4
with:
name: mpy-cross
path: micropython/mpy-cross/build
- name: Fix file permission
run: chmod +x micropython/mpy-cross/build/mpy-cross
- name: Build
run: make $MAKEOPTS -C bricks/ev3dev
- name: Test
if: ${{ success() }}
run: |
make $MAKEOPTS -C bricks/ev3dev test
make $MAKEOPTS -C bricks/ev3dev test-ev3dev
- name: List failed tests
if: failure()
run: micropython/tests/run-tests.py --print-failures

firmware:
name: firmware
strategy:
Expand Down
31 changes: 0 additions & 31 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,37 +333,6 @@
"cStandard": "c11",
"intelliSenseMode": "gcc-arm"
},
{
"name": "ev3dev",
"includePath": [
"/usr/lib/x86_64-linux-gnu/glib-2.0/include",
"/usr/include/glib-2.0",
"${workspaceFolder}/bricks/ev3dev",
"${workspaceFolder}/bricks/ev3dev/build",
"${workspaceFolder}/lib/contiki-core",
"${workspaceFolder}/lib/ev3dev/include",
"${workspaceFolder}/lib/lego",
"${workspaceFolder}/lib/lwrb/src/include",
"${workspaceFolder}/lib/pbio",
"${workspaceFolder}/lib/pbio/include",
"${workspaceFolder}/lib/pbio/platform/ev3dev_stretch",
"${workspaceFolder}/micropython/ports/unix",
"${workspaceFolder}/micropython",
"${workspaceFolder}"
],
"defines": [
"UNIX",
"MICROPY_USE_READLINE=1",
"MICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool",
"MICROPY_MODULE_FROZEN_MPY",
"MPZ_DIG_SIZE=16",
"MICROPY_MODULE_FROZEN_STR"

],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"intelliSenseMode": "gcc-x64"
},
{
"name": "virtualhub",
"includePath": [
Expand Down
61 changes: 0 additions & 61 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@
"args": ["${file}", "--show"],
"console": "integratedTerminal"
},
{
"name": "Motor Test EV3",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/tests/motors/run_test.py",
"args": ["${file}", "--target", "ev3dev", "--address", "192.168.133.244", "--show"],
"console": "integratedTerminal"
},
{
"name": "Run via USB REPL",
"type": "python",
Expand All @@ -61,44 +53,6 @@
"args": [],
"console": "integratedTerminal"
},
{
"name": "ev3dev-test",
"type": "cppdbg",
"request": "launch",
"cwd": "${workspaceFolder}/micropython/tests",
"program": "${workspaceFolder}/bricks/ev3dev/build-test/pybricks-micropython",
"args": [
"../../tests/ev3dev/brick/battery.py"
],
"stopAtEntry": false,
"environment": [
{"name": "GRX_PLUGIN_PATH", "value": "../../bricks/ev3dev/build-test"},
{"name": "GRX_DRIVER", "value": "test"}
],
"externalConsole": true,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "ignore SIGUSR1",
"text": "handle SIGUSR1 noprint pass"
},
{
"description": "ignore SIGUSR2",
"text": "handle SIGUSR2 noprint pass"
},
{
"description": "ignore SIGRT39",
"text": "handle SIGUSR2 noprint pass"
}
],
"logging": { "engineLogging": true, "trace": true, "traceResponse": true },
"preLaunchTask": "build ev3dev-test"
},
{
"name": "virtualhub",
"type": "cppdbg",
Expand Down Expand Up @@ -182,21 +136,6 @@
"searchDir": [
"${workspaceRoot}/bricks/debug"
]
},
{
"name": "(gdb) Attach",
"type": "cppdbg",
"request": "attach",
"program": "${workspaceFolder}/bricks/ev3dev/built-test/pybricks-micropython",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
],
"inputs": [
Expand Down
10 changes: 0 additions & 10 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build ev3dev-test",
"type": "shell",
"command": "poetry run make -C bricks/ev3dev build-test/pybricks-micropython build-test/libgrx-3.0-vdriver-test.so DEBUG=1 COPT=-O0 BUILD=build-test CROSS_COMPILE= -j"
},
{
"label": "build ev3dev deploy",
"type": "shell",
"command": "make ev3dev-armel -j && cp bricks/ev3dev/build-armel/pybricks-micropython /run/user/1000/gvfs/sftp:host=*/home/robot"
},
{
"label": "build movehub",
"type": "shell",
Expand Down
32 changes: 0 additions & 32 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,38 +32,6 @@ all: movehub cityhub technichub primehub essentialhub virtualhub nxt debug ev3 d

clean-all: clean-movehub clean-cityhub clean-technichub clean-primehub clean-essentialhub clean-virtualhub clean-nxt clean-debug clean-ev3 clean-doc

ifeq ($(HOST_OS),Linux)

ev3dev-host: mpy-cross
@$(MAKE) -C bricks/ev3dev CROSS_COMPILE=

clean-ev3dev-host: clean-mpy-cross
@$(MAKE) -C bricks/ev3dev clean CROSS_COMPILE=

else

ev3dev-host:
$(error Building ev3dev for host OS only works on Linux)

clean-ev3dev-host: ev3dev-host

endif

ev3dev-armel:
@if [ ! -d bricks/ev3dev/build-armel/ports ]; then \
bricks/ev3dev/docker/setup.sh armel; \
fi
@docker start pybricks-ev3dev_armel
@docker exec --tty pybricks-ev3dev_armel make -C ../../micropython/mpy-cross CROSS_COMPILE= -j`nproc`
@docker exec --tty pybricks-ev3dev_armel make -j`nproc`

clean-ev3dev-armel:
@if [ -d bricks/ev3dev/build-armel/ports ]; then \
@docker start pybricks-ev3dev_armel; \
docker exec --tty pybricks-ev3dev_armel make -C ../../micropython/mpy-cross clean CROSS_COMPILE=; \
docker exec --tty pybricks-ev3dev_armel make clean; \
fi

ev3: mpy-cross
@$(MAKE) -C bricks/ev3

Expand Down
2 changes: 1 addition & 1 deletion bricks/_common/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

// REVISIT: This file is still largely focused on embedded MicroPython ports.
// Further generalization and possibly a higher option set are needed to use
// this with unix-based ports like the virtual hub or ev3dev.
// this with unix-based ports like the virtual hub.

#include <stdint.h>
#include <pbdrv/config.h>
Expand Down
5 changes: 0 additions & 5 deletions bricks/_common/sources.mk
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ PYBRICKS_PYBRICKS_SRC_C = $(addprefix pybricks/,\
hubs/pb_type_virtualhub.c \
iodevices/pb_module_iodevices.c \
iodevices/pb_type_iodevices_analogsensor.c \
iodevices/pb_type_iodevices_ev3devsensor.c \
iodevices/pb_type_iodevices_i2cdevice.c \
iodevices/pb_type_iodevices_lwp3device.c \
iodevices/pb_type_iodevices_pupdevice.c \
Expand Down Expand Up @@ -107,7 +106,6 @@ PYBRICKS_PYBRICKS_SRC_C = $(addprefix pybricks/,\
util_pb/pb_color_map.c \
util_pb/pb_conversions.c \
util_pb/pb_error.c \
util_pb/pb_serial_ev3dev.c \
)

# Pybricks I/O library
Expand Down Expand Up @@ -146,7 +144,6 @@ PBIO_SRC_C = $(addprefix lib/pbio/,\
drv/clock/clock_tiam1808.c \
drv/clock/clock_virtual.c \
drv/core.c \
drv/counter/counter_ev3dev_stretch_iio.c \
drv/counter/counter_stm32f0_gpio_quad_enc.c \
drv/counter/counter_virtual_cpython.c \
drv/gpio/gpio_stm32f0.c \
Expand All @@ -161,14 +158,12 @@ PBIO_SRC_C = $(addprefix lib/pbio/,\
drv/led/led_dual.c \
drv/led/led_pwm.c \
drv/led/led_virtual.c \
drv/legodev/legodev_ev3dev.c \
drv/legodev/legodev_nxt.c \
drv/legodev/legodev_pup.c \
drv/legodev/legodev_pup_uart.c \
drv/legodev/legodev_spec.c \
drv/legodev/legodev_test.c \
drv/legodev/legodev_virtual.c \
drv/motor_driver/motor_driver_ev3dev_stretch.c \
drv/motor_driver/motor_driver_hbridge_pwm.c \
drv/motor_driver/motor_driver_nxt.c \
drv/motor_driver/motor_driver_virtual_cpython.c \
Expand Down
1 change: 0 additions & 1 deletion bricks/cityhub/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#define PYBRICKS_PY_IODEVICES (1)
#define PYBRICKS_PY_IODEVICES_XBOX_CONTROLLER (0)
#define PYBRICKS_PY_MEDIA (0)
#define PYBRICKS_PY_MEDIA_EV3DEV (0)
#define PYBRICKS_PY_NXTDEVICES (0)
#define PYBRICKS_PY_PARAMETERS (1)
#define PYBRICKS_PY_PARAMETERS_BUTTON (1)
Expand Down
1 change: 0 additions & 1 deletion bricks/debug/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#define PYBRICKS_PY_HUBS (0)
#define PYBRICKS_PY_IODEVICES (0)
#define PYBRICKS_PY_MEDIA (0)
#define PYBRICKS_PY_MEDIA_EV3DEV (0)
#define PYBRICKS_PY_NXTDEVICES (0)
#define PYBRICKS_PY_PARAMETERS (1)
#define PYBRICKS_PY_PARAMETERS_BUTTON (1)
Expand Down
1 change: 0 additions & 1 deletion bricks/essentialhub/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#define PYBRICKS_PY_IODEVICES (1)
#define PYBRICKS_PY_IODEVICES_XBOX_CONTROLLER (1)
#define PYBRICKS_PY_MEDIA (0)
#define PYBRICKS_PY_MEDIA_EV3DEV (0)
#define PYBRICKS_PY_NXTDEVICES (0)
#define PYBRICKS_PY_PARAMETERS (1)
#define PYBRICKS_PY_PARAMETERS_BUTTON (1)
Expand Down
1 change: 0 additions & 1 deletion bricks/ev3/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#define PYBRICKS_PY_HUBS (1)
#define PYBRICKS_PY_IODEVICES (0)
#define PYBRICKS_PY_MEDIA (0)
#define PYBRICKS_PY_MEDIA_EV3DEV (0)
#define PYBRICKS_PY_NXTDEVICES (1)
#define PYBRICKS_PY_PARAMETERS (1)
#define PYBRICKS_PY_PARAMETERS_BUTTON (1)
Expand Down
1 change: 0 additions & 1 deletion bricks/ev3dev/.gitignore

This file was deleted.

Loading

0 comments on commit f7758da

Please sign in to comment.