From f5a0b3e8bdfad9c866fd43dd33d318a7d0c6d021 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 25 Feb 2025 00:33:05 -0800 Subject: [PATCH 1/3] Use Unix style path names in includes This works on Windows and fixes compilation on MacOS and Linux. --- main/bt_keyboard.cpp | 2 +- main/esp32-ps2dev.cpp | 2 +- main/main.cpp | 10 +++++----- main/serial_mouse.cpp | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/main/bt_keyboard.cpp b/main/bt_keyboard.cpp index 618237f..4193f99 100644 --- a/main/bt_keyboard.cpp +++ b/main/bt_keyboard.cpp @@ -21,7 +21,7 @@ // limitations under the License. #define __BT_KEYBOARD__ 1 -#include "..\include\bt_keyboard.hpp" +#include "../include/bt_keyboard.hpp" #include #include diff --git a/main/esp32-ps2dev.cpp b/main/esp32-ps2dev.cpp index 77e9837..506a18a 100644 --- a/main/esp32-ps2dev.cpp +++ b/main/esp32-ps2dev.cpp @@ -1,4 +1,4 @@ -#include "..\include\esp32-ps2dev.h" +#include "../include/esp32-ps2dev.h" #define NOP() asm volatile("nop") #define HIGH 0x1 #define LOW 0x0 diff --git a/main/main.cpp b/main/main.cpp index 9b5044f..8c7d5b3 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -8,15 +8,15 @@ Dedicated to all who love me and all who I love. Never stop dreaming. */ -#include "..\include\globals.hpp" +#include "../include/globals.hpp" #include "nvs_flash.h" #include "esp_system.h" -#include "driver\gpio.h" +#include "driver/gpio.h" #include #include -#include "..\include\bt_keyboard.hpp" // Interface with a BT/BLE peripheral device (Keyboard & Mouse) -#include "..\include\esp32-ps2dev.h" // Emulate a PS/2 device -#include "..\include\serial_mouse.h" // Emulate a serial mouse +#include "../include/bt_keyboard.hpp" // Interface with a BT/BLE peripheral device (Keyboard & Mouse) +#include "../include/esp32-ps2dev.h" // Emulate a PS/2 device +#include "../include/serial_mouse.h" // Emulate a serial mouse /////////////////////////////// USER ADJUSTABLE VARIABLES ////////////////////////////////////////////////// diff --git a/main/serial_mouse.cpp b/main/serial_mouse.cpp index 83bacb8..17d2052 100644 --- a/main/serial_mouse.cpp +++ b/main/serial_mouse.cpp @@ -1,8 +1,8 @@ // This module contains code from the PS/2 to Serial mouse project by Necroware // Adapted and modified by Hambert - HamCode - 2024 -#include "..\include\serial_mouse.h" -#include "..\include\esp32-ps2dev.h" +#include "../include/serial_mouse.h" +#include "../include/esp32-ps2dev.h" #define NOP() asm volatile("nop") static bool threeButtons = false; From 03acd4190919a08e8f82947f213d8abe52d3944a Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 25 Feb 2025 00:34:54 -0800 Subject: [PATCH 2/3] Add serial_mouse.cpp to SRCS Otherwise we get unresolved symbols during compilation. --- main/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 82e0a8d..c381c97 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -1,4 +1,4 @@ -idf_component_register(SRCS "main.cpp" "bt_keyboard.cpp" "esp32-ps2dev.cpp" "${app_sources}" +idf_component_register(SRCS "main.cpp" "bt_keyboard.cpp" "esp32-ps2dev.cpp" "serial_mouse.cpp" "${app_sources}" REQUIRES esp_hid nvs_flash driver) component_compile_options(-Wno-error=format= -Wno-format) \ No newline at end of file From c2e0f53bc7f50a651245097db98c4b1b689cd8dc Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 25 Feb 2025 00:38:38 -0800 Subject: [PATCH 3/3] Raise cmake minimum version A freshly set up idf 5.4 (stable) will refuse to compile unless the minimum cmake version is at minimum 3.10. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c798c4..2f1f56c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html # The following five lines of boilerplate have to be in your project's # CMakeLists in this exact order for cmake to work correctly -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(esp32-bt2ps2) \ No newline at end of file