Skip to content

Commit cad09a1

Browse files
committed
initial
1 parent ad812f4 commit cad09a1

59 files changed

Lines changed: 1928 additions & 69808 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# syntax=docker/dockerfile:1
2+
# base image from ggrouv: https://github.com/ggurov/rusefibuildcontainer
3+
FROM ubuntu:mantic
4+
RUN sed -i 's|http://ports.ubuntu.com/ubuntu-ports|http://old-releases.ubuntu.com/ubuntu|g' /etc/apt/sources.list && \
5+
apt-get update
6+
RUN apt-get -y install make automake autoconf gcc-12-arm-linux-gnueabi gcc-12-arm-linux-gnueabi-base gcc-arm-none-eabi binutils-arm-none-eabi git nano openjdk-21-jdk-headless mtools dosfstools xxd
7+
RUN apt-get -y install openssh-server cmake rsync gdb-multiarch build-essential
8+
# used for remote non-devcontainer use ex: (https://blog.jetbrains.com/clion/2020/01/using-docker-with-clion/) [also on vscode: https://code.visualstudio.com/remote/advancedcontainers/develop-remote-host]
9+
RUN useradd -m rusefi && yes password | passwd rusefi
10+
11+
CMD service ssh start && /bin/bash

.devcontainer/devcontainer.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
{
3+
"name": "rusEFI-devcontainer",
4+
"build": {
5+
// Path is relative to the devcontainer.json file.
6+
"dockerfile": "Dockerfile"
7+
},
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
// "features": {},
10+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
11+
"forwardPorts": [
12+
2222, // ssh on container
13+
29002 // simulator
14+
],
15+
// Use 'postCreateCommand' to run commands after the container is created.
16+
"postCreateCommand": "git submodule update --init",
17+
// Configure tool-specific properties.
18+
"customizations": {
19+
"vscode": {
20+
"extensions": [
21+
"eamodio.gitlens",
22+
"marus25.cortex-debug",
23+
"Gruntfuggly.todo-tree",
24+
"ms-vscode.cpptools",
25+
"vadimcn.vscode-lldb"
26+
],
27+
"settings": {
28+
"editor.tabSize": 4,
29+
"terminal.integrated.defaultProfile.linux": "zsh",
30+
"terminal.integrated.profiles.linux": {
31+
"bash": {
32+
"path": "bash",
33+
"icon": "terminal-bash"
34+
},
35+
"zsh": {
36+
"path": "zsh"
37+
}
38+
}
39+
}
40+
}
41+
}
42+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
43+
// "remoteUser": "root"
44+
}

.devcontainer/devcontainer.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## devcontainer 101
2+
3+
#### why use this?:
4+
A development container is a Docker container that vsCode, through an extension [(Visual Studio Code Dev Containers)](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers), uses to set up a development environment isolated from the host.
5+
6+
A more nerdy explanation is available at: https://code.visualstudio.com/docs/devcontainers/containers
7+
8+
In the case of rusefi, it is used to set up the relatively complicated toolset as an alternative to [setup_linux_environment.sh](https://github.com/rusefi/rusefi/blob/master/firmware/setup_linux_environment.sh),Since the script, in addition to only working on Linux, only works for installations that use APT as a package manager (ie any Debian/Ubuntu derivative), and would only work to build the firmware (a couple of extra dependencies are used for tests and the simulator)
9+
10+
11+
#### System requirements:
12+
13+
Linux:
14+
- Docker CE with Docker Compose, also vscode
15+
16+
macOS:
17+
- Docker Desktop 2.0+.
18+
19+
Windows:
20+
- Docker Desktop 2.0 and up
21+
- WSL 2
22+
23+
for WSL 2:
24+
- Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11
25+
26+
howto install WSL2: https://learn.microsoft.com/en-us/windows/wsl/install
27+
28+
29+
30+
in case of a error similar to:
31+
32+
| Unable to detect if server is already installed: Error: Failed to probe if server is already installed: code: Failed to probe if server is already installed: code: 4294967295, , Unsupported console settings. In order to use this feature, the legacy console must be disabled.
33+
34+
https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#error-0x80040306-on-installation
35+
> This has to do with the fact that we do not support legacy console. To turn off legacy console:
36+
>
37+
> Open cmd.exe
38+
> Right click title bar -> Properties -> Uncheck Use legacy console
39+
> Click OK
40+
41+
In addition, on Windows you have to clone the repository inside WSL, otherwise you will have performance problems since the container will have a longer bind (having to go from the docker container to WSL and from WSL to Windows)
42+
43+
Once the container creation is complete, you will be able to compile the firmware or the simulator or the tests.
44+
For the firmware you will want to use (firmware/bin/compile.sh) instead of make to be able to select the variant of your board.
45+
46+
note:
47+
This still needs a little testing and feedback to see if this same readme or the docker image needs to be improved. If you have any questions, ask the Discord server or personally to @derek_boom (Diego)

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"postman.settings.dotenv-detection-notification-visibility": false
3+
}

board.mk

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ BOARDINC += $(BOARD_DIR)/generated/controllers/generated
66
# defines SHORT_BOARD_NAME
77
include $(BOARD_DIR)/meta-info.env
88

9-
# this would save some flash while being unable to update WBO controller firmware
10-
DDEFS += -DEFI_WIDEBAND_FIRMWARE_UPDATE=FALSE
9+
# reduce memory usage monitoring
10+
DDEFS += -DRAM_UNUSED_SIZE=100
1111

12-
# assign critical LED to a non-existent pin if you do not have it on your board
13-
# good old PD14 is still the default value
14-
# DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::I15
12+
# assign critical LED to a non-existent pin
13+
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::I15
14+
15+
16+
# we do not have much Lua RAM, let's drop some fancy functions
17+
DDEFS += -DWITH_LUA_CONSUMPTION=FALSE
18+
DDEFS += -DWITH_LUA_PID=FALSE
19+
DDEFS += -DWITH_LUA_STOP_ENGINE=FALSE

board_commands.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
; todo: fix parsing?
2+
3+
;cmd_set_board_04 = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_BOARD_ACTION_16_hex@@\x00"
4+
;cmd_set_board_ua4c = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_BOARD_ACTION_16_hex@@\x01"
5+
6+
cmd_set_board_04 = "Z\\x00\\x1d\\x00\\x00"
7+
cmd_set_board_ua4c = "Z\\x00\\x1d\\x00\\x01"

board_configuration.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ void setBoardDefaultConfiguration() {
2828

2929

3030
// 5.6k high side/10k low side = 1.56 ratio divider
31-
// engineConfiguration->analogInputDividerCoefficient = 1.56f;
31+
engineConfiguration->analogInputDividerCoefficient = 1.47f;
3232

3333
// 6.34k high side/ 1k low side
3434
// engineConfiguration->vbattDividerCoeff = (6.34 + 1) / 1;
3535

36-
// engineConfiguration->adcVcc = 3.3f;
36+
engineConfiguration->adcVcc = 3.3f;
3737

3838
// engineConfiguration->clt.config.bias_resistor = 2490;
3939
// engineConfiguration->iat.config.bias_resistor = 2490;
4040

4141

4242
// Battery sense on PA0
4343
// engineConfiguration->vbattAdcChannel = EFI_ADC_0;
44-
}
44+
}

board_popular_vehicles.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
commandButton = "0.4 board", cmd_set_board_04
2+
commandButton = "ua4c board", cmd_set_board_ua4c

connectors/generated_board_pin_names.h

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)