atanisoft / ESP32CommandStation

An ESP32 based DCC Command Station with integrated OpenLCB (LCC) --- NOTE: this project is not under active development.
https://atanisoft.github.io/ESP32CommandStation/
GNU General Public License v3.0
90 stars 34 forks source link

Compile failed with CONFIG_OPS_RAILCOM_BRAKE_PIN undeclared #45

Closed TrainzLuvr closed 4 years ago

TrainzLuvr commented 4 years ago

[929/992] Building CXX object esp-idf/DCCSignalGenerator/CMakeFiles/__idf_DCCSignalGenerator.dir/DCCSignalVFS.cpp.obj FAILED: esp-idf/DCCSignalGenerator/CMakeFiles/__idf_DCCSignalGenerator.dir/DCCSignalVFS.cpp.obj /home/user/esp/espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -Iconfig <SNIPPED LONG SECTION> -I/home/user/esp/esp-idf/components/sdmmc/include -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -nostdlib -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -fstack-protector -std=c++14 -D_GNU_SOURCE -DIDF_VER=\"v4.0.1-412-g820621687\" -DGCC_NOT_5_2_0 -DESP_PLATFORM -D_GLIBCXX_USE_C99 -DESP32 -DLOCKED_LOGGING -Wno-ignored-qualifiers -MD -MT esp-idf/DCCSignalGenerator/CMakeFiles/__idf_DCCSignalGenerator.dir/DCCSignalVFS.cpp.obj -MF esp-idf/DCCSignalGenerator/CMakeFiles/__idf_DCCSignalGenerator.dir/DCCSignalVFS.cpp.obj.d -o esp-idf/DCCSignalGenerator/CMakeFiles/__idf_DCCSignalGenerator.dir/DCCSignalVFS.cpp.obj -c ../components/DCCSignalGenerator/DCCSignalVFS.cpp In file included from ../components/DCCSignalGenerator/DCCSignalVFS.cpp:32: ../components/DCCSignalGenerator/DCCSignalVFS.cpp:66:49: error: 'CONFIG_OPS_RAILCOM_BRAKE_PIN' was not declared in this scope GPIO_PIN(OPS_HBRIDGE_BRAKE, GpioOutputSafeHigh, CONFIG_OPS_RAILCOM_BRAKE_PIN); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../components/OpenMRNLite/src/freertos_drivers/esp32/Esp32Gpio.hxx:413:55: note: in definition of macro 'GPIO_PIN' static const gpio_num_t PIN_NUM = (gpio_num_t)NUM; \ ^~~ ../components/DCCSignalGenerator/DCCSignalVFS.cpp:66:49: note: suggested alternative: 'CONFIG_OPS_RAILCOM_ENABLE_PIN' GPIO_PIN(OPS_HBRIDGE_BRAKE, GpioOutputSafeHigh, CONFIG_OPS_RAILCOM_BRAKE_PIN); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../components/OpenMRNLite/src/freertos_drivers/esp32/Esp32Gpio.hxx:413:55: note: in definition of macro 'GPIO_PIN' static const gpio_num_t PIN_NUM = (gpio_num_t)NUM; \ ^~~ In file included from ../components/DCCSignalGenerator/DCCSignalVFS.cpp:32: ../components/OpenMRNLite/src/freertos_drivers/esp32/Esp32Gpio.hxx: In instantiation of 'struct GpioOutputPin<esp32cs::OPS_HBRIDGE_BRAKEDefs, true, false>': ../components/OpenMRNLite/src/freertos_drivers/esp32/Esp32Gpio.hxx:241:8: required from 'struct GpioOutputSafeHigh<esp32cs::OPS_HBRIDGE_BRAKEDefs>' ../components/DCCSignalGenerator/DCCSignalVFS.cpp:101:13: required from here ../components/OpenMRNLite/src/freertos_drivers/esp32/Esp32Gpio.hxx:163:27: error: non-constant condition for static assertion static_assert(PIN_NUM < 34, "Pins 34 and above can not be used as output."); ~~~~~~~~^~~~

There is no OPS_RAILCOM_BRAKE pin - this should be OPS_BRAKE (pin 26 in ESP32CS schematic) and only when using LMD18200T for OPS output. In all other cases, this pin should be free for other uses as it is only used by LMD18200T.

atanisoft commented 4 years ago

@TrainzLuvr can you post the sdkconfig.h entries that have "RAILCOM" in the name? It sounds like menuconfig did not define all entries correctly as you noted in https://github.com/atanisoft/ESP32CommandStation/issues/43.