Skip to content

Commit 71cefe4

Browse files
authored
chore: remove old stuff (#641)
1 parent 3c15688 commit 71cefe4

File tree

3 files changed

+2
-116
lines changed

3 files changed

+2
-116
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ jobs:
1717
build:
1818
strategy:
1919
matrix:
20-
os: [ubuntu-22.04, macos-13]
20+
os: [ubuntu-22.04]
2121
arch: [amd64, arm64]
2222
include:
2323
- os: ubuntu-22.04
2424
platform-name: linux
25-
- os: macos-13
26-
platform-name: macos
2725

2826
runs-on: ${{ matrix.os }}
2927

@@ -57,12 +55,7 @@ jobs:
5755
env:
5856
GOARCH: ${{ matrix.arch }}
5957
run: |
60-
if [[ "${{ matrix.platform-name }}" == "macos" ]]; then
61-
export CGO_ENABLED=1
62-
export MACOSX_DEPLOYMENT_TARGET=10.15
63-
else
64-
export CGO_ENABLED=0
65-
fi
58+
export CGO_ENABLED=0
6659
6760
mkdir -p build
6861
go build -v -ldflags "-s -w -X 'main.Version=${TAG_VERSION}'" -o ./build/${{ env.PROJECT_NAME }} ./cmd/arduino-app-cli

README.md

Lines changed: 0 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -273,101 +273,3 @@ If this is not done, you might get errors in the orchestrator, in the form of:
273273
```
274274
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
275275
```
276-
277-
## Board setup
278-
279-
**requiremests on the host machine:**
280-
281-
- adb
282-
- task
283-
- docker
284-
285-
First setup the wifi with the command:
286-
287-
```sh
288-
SSID=name PASSWORD=pass ./debian/scripts/set-wifi.sh
289-
```
290-
291-
You can can setup docker and compile the latest version of the orchestrator with the command:
292-
293-
```sh
294-
task board:init
295-
```
296-
297-
### Jomla microcontroller
298-
299-
Jomla is a development microcontroller board that can be attached to the RB1.
300-
301-
Linux and Jomla share a set of GPIOs a serial port at `/dev/ttyHS1`, and a SPI bus (not yet configured).
302-
303-
The important GPIOs are:
304-
305-
- GPIO 71: Jomla board enable
306-
- 0: Jomla board enabled
307-
- 1: Jomla board disabled
308-
309-
- GPIO 40: Jomla reset
310-
- 0: Jomla reset
311-
- 1: Jomla normal operation
312-
313-
The board starts with the microcontroller disabled by default, and it is also recommended to toggle the reset pin before flashing the firmware or the sketch.
314-
315-
On the board, you can do it with the following commands:
316-
317-
```sh
318-
gpioset -c /dev/gpiochip1 -t0 71=0 # Enable Jomla board
319-
gpioset -c /dev/gpiochip1 -t0 40=0 # Reset Jomla board
320-
gpioset -c /dev/gpiochip1 -t0 40=1 # Set Jomla board to normal operation
321-
```
322-
323-
The flashing is done with a custom version of OpenOCD, that uses the gpiod to flash either the Zephyr firmware or the sketch. OpenOCD is needed only on the board and the `task board:init` command will install it in `/opt/openocd/bin/openocd`. There are also a set of configuration files also installed in `/opt/openocd/`.
324-
325-
As a reference the flash commands are:
326-
327-
1. flash zephyr firmware
328-
329-
```
330-
/opt/openocd/bin/openocd -d2 -s /opt/openocd/ -s /opt/openocd/share/openocd/scripts -f openocd_gpiod.cfg -c "reset_config srst_only srst_push_pull; init; reset; halt; flash info 0; flash write_image erase /tmp/zephyr-b_u585i_iot02a_stm32u585xx.elf; reset; shutdown"
331-
```
332-
333-
2. flash your compiled sketch
334-
335-
```
336-
/opt/openocd/bin/openocd -d2 -s /opt/openocd/ -s /opt/openocd/share/openocd/scripts -f openocd_gpiod.cfg -c "reset_config srst_only srst_push_pull; init; reset; halt; flash info 0; flash write_image erase /tmp/jomla-test.ino.elf-zsk.bin 0x80F0000 bin; reset; shutdown"
337-
```
338-
339-
Although the `cmd/uploader` go command is wrapping those command and handling the flashing of the sketch and it is working either in the board or in the host. It required libusb1 installed on the host.
340-
341-
#### Set up the Zephyr platform
342-
343-
In order to compile a sketch for Jomla you need the Zephyr platform installed. There is a private developed version with the branch jomla with everything needed, i.e., https://github.com/bcmi-labs/ArduinoCore-zephyr/tree/jomla.
344-
345-
The setup of the platform could be complicated so for quick development you can use the archive at `./debian/jomla/ArduinoCore-zephyr.tar.xz` and extract in the arduino folder as a custom platform.
346-
347-
For example if you are on a MacOS you can do
348-
349-
```sh
350-
tar -xJf ./debian/jomla/ArduinoCore-zephyr.tar.xz -C ~/Documents/Arduino/hardware/dev
351-
```
352-
353-
Remember to also install all the tools needed by the platform with `arduino-cli core install arduino:zephyr --additional-urls https://downloads.arduino.cc/packages/package_zephyr_index.json`
354-
355-
You can now build a sketch by using the `Jomla` platform, for example:
356-
357-
```sh
358-
arduino-cli compile --fqbn dev:ArduinoCore-zephyr:jomla --build-path=build/ /path/to/sketch
359-
```
360-
361-
The `--build-path` is needed to avoid the `arduino-cli` to use the default path so that we can manually invoke the uploader. For instance you flash the sketch with the command:
362-
363-
```sh
364-
go run ./cmd/uploader build/sketch.ino.elf-zsk.bin
365-
```
366-
367-
Before doing that, you also need to flash the zephyr firmware on the Jomla board, which is done with the command:
368-
369-
```sh
370-
go run ./cmd/uploader ~/Documents/Arduino/hardware/dev/ArduinoCore-zephyr/firmwares/zephyr-b_u585i_iot02a_stm32u585xx.elf
371-
```
372-
373-
##

internal/orchestrator/orchestrator.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"os"
1212
"os/user"
1313
"path/filepath"
14-
"runtime"
1514
"slices"
1615
"strconv"
1716
"strings"
@@ -928,10 +927,6 @@ func editAppDefaults(userApp *app.ArduinoApp, isDefault bool, cfg config.Configu
928927
}
929928

930929
func getCurrentUser() string {
931-
// MacOS and Windows uses a VM so we don't need to map the user.
932-
if runtime.GOOS == "darwin" || runtime.GOOS == "windows" {
933-
return ""
934-
}
935930
// Map user to avoid permission issues.
936931
user, err := user.Current()
937932
if err != nil {
@@ -949,10 +944,6 @@ type deviceResult struct {
949944

950945
func getDevices() deviceResult {
951946
res := deviceResult{}
952-
// Ignore devices on Windows
953-
if runtime.GOOS == "windows" {
954-
return res
955-
}
956947

957948
deviceList, err := paths.New("/dev").ReadDir()
958949
if err != nil {

0 commit comments

Comments
 (0)