This commit is contained in:
rusefi 2019-03-12 17:41:30 -04:00
parent 4313619b8b
commit 4d823c3692
3 changed files with 107 additions and 0 deletions

View File

@ -0,0 +1,17 @@
rem
rem STM32F767 version of the firmware for Nucleo-F767ZI board
rem
cd ../../..
set PROJECT_BOARD=ME7_PNP
set PROJECT_CPU=ST_STM32F7
set EXTRA_PARAMS=-DDUMMY -DSTM32F767xx ^
-DEFI_INJECTOR_PIN3=GPIO_UNASSIGNED ^
-DEFI_COMMUNICATION_PIN=GPIOA_2 ^
-DEFI_FATAL_ERROR_PIN=GPIOA_5 ^
-DEFI_ENABLE_ASSERTS=FALSE ^
-DCH_DBG_THREADS_PROFILING=FALSE
rem set DEBUG_LEVEL_OPT="-O2"
make -j4
rem TODO fix hex2dfu for F7
rem ..\misc\hex2dfu\HEX2DFU.exe build/rusefi.hex -out build/rusefi.dfu

View File

@ -0,0 +1,11 @@
# List of all the board related files.
BOARDSRC = $(PROJECT_DIR)/config/boards/NUCLEO_F767/board.c
BOARDSRC_CPP = $(PROJECT_DIR)/config/boards/ME7_PNP/board_configuration.cpp
# Required include directories
BOARDINC = $(PROJECT_DIR)/config/boards/NUCLEO_F767 $(PROJECT_DIR)/config/stm32f7ems
LDSCRIPT= $(PROJECT_DIR)/config/boards/NUCLEO_F767/STM32F76xxI.ld
# Override DEFAULT_ENGINE_TYPE
DDEFS += -DDEFAULT_ENGINE_TYPE=CUSTOM_ENGINE -DSTM32F767xx

View File

@ -0,0 +1,79 @@
/**
* @file boards/ME7_PNP/board_configuration.cpp
*
* @brief In this file we can override engine_configuration.cpp.
*
* @author Andrey Belomutskiy, (c) 2012-2019
*/
#include "global.h"
#include "engine.h"
#include "engine_math.h"
#include "allsensors.h"
#include "fsio_impl.h"
#include "engine_configuration.h"
EXTERN_ENGINE;
void setPinConfigurationOverrides(void) {
}
void setSerialConfigurationOverrides(void) {
boardConfiguration->useSerialPort = true;
engineConfiguration->binarySerialTxPin = GPIOD_8;
engineConfiguration->binarySerialRxPin = GPIOD_9;
engineConfiguration->consoleSerialTxPin = GPIOD_8;
engineConfiguration->consoleSerialRxPin = GPIOD_9;
// boardConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED;
// engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED;
}
void setSdCardConfigurationOverrides(void) {
}
/**
* @brief Board-specific configuration code overrides.
* @todo Add your board-specific code, if any.
*/
void setBoardConfigurationOverrides(void) {
setSerialConfigurationOverrides();
engineConfiguration->runningLedPin = GPIOB_0; //green LED
engineConfiguration->warninigLedPin = GPIO_UNASSIGNED;
engineConfiguration->configResetPin = GPIO_UNASSIGNED;
#if 0
engineConfiguration->vbattAdcChannel = EFI_ADC_13;
engineConfiguration->adcVcc = ADC_VCC;
#endif
engineConfiguration->baroSensor.hwChannel = EFI_ADC_NONE;
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_NONE;
// not used
engineConfiguration->dizzySparkOutputPin = GPIO_UNASSIGNED;
engineConfiguration->externalKnockSenseAdc = EFI_ADC_NONE;
engineConfiguration->displayMode = DM_NONE;
boardConfiguration->HD44780_rs = GPIO_UNASSIGNED;
boardConfiguration->HD44780_e = GPIO_UNASSIGNED;
boardConfiguration->HD44780_db4 = GPIO_UNASSIGNED;
boardConfiguration->HD44780_db5 = GPIO_UNASSIGNED;
boardConfiguration->HD44780_db6 = GPIO_UNASSIGNED;
boardConfiguration->HD44780_db7 = GPIO_UNASSIGNED;
for (int i = 0; i < DIGIPOT_COUNT ; i++) {
boardConfiguration->digitalPotentiometerChipSelect[i] = GPIO_UNASSIGNED;
}
boardConfiguration->triggerSimulatorPins[1] = GPIO_UNASSIGNED;
boardConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED;
boardConfiguration->triggerSimulatorPinModes[1] = OM_DEFAULT;
boardConfiguration->triggerSimulatorPinModes[2] = OM_DEFAULT;
boardConfiguration->vehicleSpeedSensorInputPin = GPIO_UNASSIGNED;
boardConfiguration->boardTestModeJumperPin = GPIO_UNASSIGNED;
boardConfiguration->acRelayPin = GPIO_UNASSIGNED;
boardConfiguration->digitalPotentiometerSpiDevice = SPI_NONE;
boardConfiguration->max31855spiDevice = SPI_NONE;
/////////////////////////////////////////////////////////
boardConfiguration->is_enabled_spi_1 = false;
boardConfiguration->is_enabled_spi_2 = false;
boardConfiguration->is_enabled_spi_3 = false;
}