Add New Board to compilation output (#4215)

* adding my board

Signed-off-by: sbtoonz <sbtoonz@gmail.com>

* Add header file to finalize compilation of custom board..how are these hashes calculated?

Signed-off-by: sbtoonz <sbtoonz@gmail.com>

* This shouldn't exist in master

Signed-off-by: sbtoonz <sbtoonz@gmail.com>

* First refactor of yml

Signed-off-by: sbtoonz <sbtoonz@gmail.com>

* Cleanup board_configuration.cpp

Signed-off-by: sbtoonz <sbtoonz@gmail.com>

* yml refactor again based on @rusefi 's request

Signed-off-by: sbtoonz <sbtoonz@gmail.com>

* remove connector image temporarily while I populate yml with coordinates

Signed-off-by: sbtoonz <sbtoonz@gmail.com>
This commit is contained in:
sbtoonz 2022-05-30 13:48:15 -05:00 committed by GitHub
parent 6b9eff99d0
commit 526b4199e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 1307 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
# List of all the board related files.
BOARDCPPSRC = $(PROJECT_DIR)/config/boards/48way/board_configuration.cpp
BOARDINC = $(PROJECT_DIR)/config/boards/48way
# Override DEFAULT_ENGINE_TYPE
DDEFS += -DSHORT_BOARD_NAME=48way
DDEFS += -DFIRMWARE_ID=\"48way\"
DDEFS += -DDEFAULT_ENGINE_TYPE=MINIMAL_PINS

View File

@ -0,0 +1,101 @@
/**
* @file boards/48way/board_configuration.cpp
*
* @brief Configuration defaults for the 48way STM32 board
*
* @author Ben Brazdziunas, 2022
*/
#include "pch.h"
static void setInjectorPins() {
engineConfiguration->injectionPinMode = OM_DEFAULT;
engineConfiguration->injectionPins[0] = Gpio::E15;
engineConfiguration->injectionPins[1] = Gpio::E14;
engineConfiguration->injectionPins[2] = Gpio::E13;
engineConfiguration->injectionPins[3] = Gpio::E12;
engineConfiguration->injectionPins[4] = Gpio::E11;
engineConfiguration->injectionPins[5] = Gpio::E10;
engineConfiguration->injectionPins[6] = Gpio::E9;
engineConfiguration->injectionPins[7] = Gpio::E8;
}
static void setIgnitionPins() {
engineConfiguration->ignitionPinMode = OM_DEFAULT;
engineConfiguration->ignitionPins[0] = Gpio::D12;
engineConfiguration->ignitionPins[1] = Gpio::D13;
engineConfiguration->ignitionPins[2] = Gpio::B15;
engineConfiguration->ignitionPins[3] = Gpio::B14;
engineConfiguration->ignitionPins[4] = Gpio::D8;
engineConfiguration->ignitionPins[5] = Gpio::D9;
engineConfiguration->ignitionPins[6] = Gpio::D11;
engineConfiguration->ignitionPins[7] = Gpio::D10;
}
void setSdCardConfigurationOverrides(void) {
}
static void setEtbConfig() {
}
static void setupVbatt() {
// 5.6k high side/10k low side = 1.56 ratio divider
engineConfiguration->analogInputDividerCoefficient = 1.56f;
// 6.34k high side/ 1k low side
engineConfiguration->vbattDividerCoeff = (6.34 + 1) / 1;
// Battery sense on PA7
engineConfiguration->vbattAdcChannel = EFI_ADC_0;
engineConfiguration->adcVcc = 3.3f;
}
static void setStepperConfig() {
engineConfiguration->idle.stepperDirectionPin = Gpio::C9;
engineConfiguration->idle.stepperStepPin = Gpio::C8;
engineConfiguration->stepperEnablePin = Gpio::A8;
}
void setBoardConfigOverrides() {
setupVbatt();
//setEtbConfig();
setStepperConfig();
// PE3 is error LED, configured in board.mk
engineConfiguration->communicationLedPin = Gpio::Unassigned;
engineConfiguration->runningLedPin = Gpio::C10;
engineConfiguration->warningLedPin = Gpio::Unassigned;
engineConfiguration->clt.config.bias_resistor = 2490;
engineConfiguration->iat.config.bias_resistor = 2490;
//CAN 1 bus overwrites
engineConfiguration->canRxPin = Gpio::D0;
engineConfiguration->canTxPin = Gpio::D1;
//CAN 2 bus overwrites
engineConfiguration->can2RxPin = Gpio::B12;
engineConfiguration->can2TxPin = Gpio::B13;
}
static void setupDefaultSensorInputs() {
engineConfiguration->afr.hwChannel = EFI_ADC_4;
setEgoSensor(ES_14Point7_Free);
engineConfiguration->baroSensor.hwChannel = EFI_ADC_9;
}
void setBoardDefaultConfiguration(void) {
setInjectorPins();
setIgnitionPins();
engineConfiguration->isSdCardEnabled = false;
engineConfiguration->canBaudRate = B500KBPS;
engineConfiguration->can2BaudRate = B500KBPS;
}

View File

@ -0,0 +1,3 @@
@echo off
bash.exe compile_48way.sh

View File

@ -0,0 +1,3 @@
#!/bin/bash
bash ../common_make.sh 48way ARCH_STM32F4

View File

@ -0,0 +1,47 @@
// auto-generated by PinoutLogic.java
#include "pch.h"
const char * getBoardSpecificPinName(brain_pin_e brainPin) {
switch(brainPin) {
default: return nullptr;
case Gpio::E2: return "Fan Relay (E2)";
case Gpio::E3: return "Fuel Relay (E3)";
case Gpio::E4: return "Launch Control (E4)";
case Gpio::E5: return "Tachometer (E5)";
case Gpio::E6: return "Camshaft Input (E6)";
case Gpio::A0: return "Battery Reference Input (A0)";
case Gpio::A1: return "TPS Reference Input (A1)";
case Gpio::A2: return "CLT Reference Input (A2)";
case Gpio::A3: return "IAT Reference Input (A3)";
case Gpio::A4: return "O2 Reference Input (A4)";
case Gpio::C4: return "Fuel Pressure Reference Input (C4)";
case Gpio::C5: return "Oil Pressure Reference Input (C5)";
case Gpio::B0: return "MAP Pressure Reference Input (B0)";
case Gpio::B1: return "BARO Pressure Reference Input (B1)";
case Gpio::E8: return "Injector 8 Output (E8)";
case Gpio::E9: return "Injector 7 Output (E9)";
case Gpio::E10: return "Injector 6 Output (E10)";
case Gpio::E11: return "Injector 5 Output (E11)";
case Gpio::E12: return "Injector 4 Output (E12)";
case Gpio::E13: return "Injector 3 Output (E13)";
case Gpio::E14: return "Injector 2 Output (E14)";
case Gpio::E15: return "Injector 1 Output (E15)";
case Gpio::E1: return "Clutch Input (E1)";
case Gpio::C7: return "Boost Controller Output (C7)";
case Gpio::C6: return "IDLE Controller Output (C6)";
case Gpio::D15: return "HC1 Controller Output (D15)";
case Gpio::D14: return "HC2 Controller Output (D14)";
case Gpio::D13: return "Ignition 2 Output (D13)";
case Gpio::D12: return "Ignition 1 Output (D12)";
case Gpio::D11: return "Ignition 7 Output (D11)";
case Gpio::D10: return "Ignition 8 Output (D10)";
case Gpio::D9: return "Ignition 6 Output (D9)";
case Gpio::D8: return "Ignition 5 Output (D8)";
case Gpio::B15: return "Ignition 3 Output (B15)";
case Gpio::B14: return "Ignition 4 Output (B14)";
case Gpio::B13: return "CANTX Output (B13)";
case Gpio::B12: return "CANRX Output (B12)";
}
return nullptr;
}

View File

@ -0,0 +1,106 @@
pins:
- id: E2
class: outputs
ts_name: Fan Relay (E2)
- id: E3
class: outputs
ts_name: Fuel Relay (E3)
- id: E4
class: switch_inputs
ts_name: Launch Control (E4)
- id: E5
class: outputs
ts_name: Tachometer (E5)
- id: [E6, E6]
class: [switch_inputs, event_inputs]
ts_name: Camshaft Input (E6)
- id: EFI_ADC_0
class: analog_inputs
ts_name: Battery Reference Input (A0)
- id: [A1, EFI_ADC_1]
class: [switch_inputs, analog_inputs]
ts_name: TPS Reference Input (A1)
- id: EFI_ADC_2
class: analog_inputs
ts_name: CLT Reference Input (A2)
- id: EFI_ADC_3
class: analog_inputs
ts_name: IAT Reference Input (A3)
- id: EFI_ADC_4
class: analog_inputs
ts_name: O2 Reference Input (A4)
- id: EFI_ADC_14
class: analog_inputs
ts_name: Fuel Pressure Reference Input (C4)
- id: EFI_ADC_15
class: analog_inputs
ts_name: Oil Pressure Reference Input (C5)
- id: EFI_ADC_8
class: analog_inputs
ts_name: MAP Pressure Reference Input (B0)
- id: EFI_ADC_9
class: analog_inputs
ts_name: BARO Pressure Reference Input (B1)
- id: E8
class: outputs
ts_name: Injector 8 Output (E8)
- id: E9
class: outputs
ts_name: Injector 7 Output (E9)
- id: E10
class: outputs
ts_name: Injector 6 Output (E10)
- id: E11
class: outputs
ts_name: Injector 5 Output (E11)
- id: E12
class: outputs
ts_name: Injector 4 Output (E12)
- id: E13
class: outputs
ts_name: Injector 3 Output (E13)
- id: E14
class: outputs
ts_name: Injector 2 Output (E14)
- id: E15
class: outputs
ts_name: Injector 1 Output (E15)
- id: E1
class: analog_inputs
ts_name: Clutch Input (E1)
- id: C7
class: outputs
ts_name: Boost Controller Output (C7)
- id: C6:
class: outputs
ts_name: Idle1 Output (C6)
- id: D15
class: outputs
ts_name: HC1 Output (D15)
- id: D14
class: outputs
ts_name: HC2 Output (D14)
- id: D13
class: outputs
ts_name: Ignition 2 Output (D13)
- id: D12
class: outputs
ts_name: Ignition 1 Output (D12)
- id: D11
class: outputs
ts_name: Ignition 7 Output (D11)
- id: D10
class: outputs
ts_name: Ignition 8 Output (D10)
- id: D9
class: outputs
ts_name: Ignition 6 Output (D9)
- id: D8
class: outputs
ts_name: Ignition 5 Output (D8)
- id: B15
class: outputs
ts_name: Ignition 3 Output (B15)
- id: B14
class: outputs
ts_name: Ignition 4 Output (B14)

View File

@ -0,0 +1,13 @@
#define ts_show_hip9011 false
#define ts_show_cj125 false
#define ts_show_lcd false
#define ts_show_joystick false
#define ts_show_gps false
#define ts_show_software_knock true
#define show_test_presets true
#define show_microRusEFI_presets false
#define show_Frankenso_presets false
#define show_Hellen_presets false
#define show_Proteus_presets false

View File

@ -0,0 +1,6 @@
//
// was generated automatically by rusEFI tool ConfigDefinition.jar based on gen_config.sh null
//
#define SIGNATURE_HASH 1757397598
#define TS_SIGNATURE "rusEFI 2022.05.30.48way.1757397598"