Skip to content

Commit

Permalink
Better build env (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou authored Aug 12, 2024
1 parent adaa4ee commit 886a025
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 32 deletions.
14 changes: 3 additions & 11 deletions examples/platformio/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ monitor_port = /dev/ttyACM1
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
lib_deps =
; devmode: with this disabled make a symlink in platformio/lib to the PsychicHttp directory
;hoeken/PsychicHttp
bblanchon/ArduinoJson
; hoeken/PsychicHttp
; PIO is not able to consider installed project in CI
../..
board_build.filesystem = littlefs
build_flags =
-Wall
Expand Down Expand Up @@ -62,11 +62,3 @@ lib_deps = ${env.lib_deps}
build_flags =
-D PSY_ENABLE_SDCARD
-D WAVESHARE_43_TOUCH

[env:dev]
lib_deps = ${env.lib_deps}
bblanchon/ArduinoTrace@^1.2.0
build_flags =
${env.build_flags}
-D CORE_DEBUG_LEVEL=5
-D PSY_DEVMODE
7 changes: 1 addition & 6 deletions library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "PsychicHttp",
"version": "1.2.0",
"version": "2.0.0",
"description": "Arduino style wrapper around ESP-IDF HTTP library. HTTP server with SSL + websockets. Works on esp32 and probably esp8266",
"keywords": "network,http,https,tcp,ssl,tls,websocket,espasyncwebserver",
"repository": {
Expand Down Expand Up @@ -32,11 +32,6 @@
"name": "ArduinoJson",
"version": "^7.0.4"
},
{
"owner": "bblanchon",
"name": "ArduinoTrace",
"version": "^1.2.0"
},
{
"owner": "plageoj",
"name": "UrlEncode",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=PsychicHttp
version=1.2.0
version=2.0.0
author=Zach Hoeken <[email protected]>
maintainer=Zach Hoeken <[email protected]>
sentence=PsychicHttp is a robust webserver that supports http/https + websockets.
Expand Down
75 changes: 75 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
lib_dir = .
src_dir = examples/platformio
; src_dir = examples/arduino

[env]
platform = espressif32
framework = arduino
board = esp32-s3-devkitc-1
upload_port = /dev/ttyACM0
monitor_port = /dev/ttyACM1
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
lib_deps =
plageoj/UrlEncode@^1.0.1
bblanchon/ArduinoJson@^7.0.4
bblanchon/ArduinoTrace@^1.2.0
board_build.filesystem = littlefs
build_flags =
-Wall
-Wextra

[env:arduino2]
platform = [email protected]

[env:arduino2-ssl]
platform = [email protected]
build_flags = -D PSY_ENABLE_SSL

[env:arduino2-regex]
platform = [email protected]
build_flags = -D PSY_ENABLE_REGEX

[env:arduino3]
platform = espressif32
platform_packages=
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.4
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.4/esp32-arduino-libs-3.0.4.zip

[env:arduino3-ssl]
platform = espressif32
platform_packages=
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.4
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.4/esp32-arduino-libs-3.0.4.zip
build_flags = -D PSY_ENABLE_SSL

[env:arduino3-regex]
platform = espressif32
platform_packages=
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.4
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.4/esp32-arduino-libs-3.0.4.zip
build_flags = -D PSY_ENABLE_REGEX

[env:waveshare-4-3-touchscreen]
lib_deps = ${env.lib_deps}
https://github.com/esp-arduino-libs/ESP32_IO_Expander
build_flags =
-D PSY_ENABLE_SDCARD
-D WAVESHARE_43_TOUCH

[env:dev]
build_flags =
${env.build_flags}
-D CORE_DEBUG_LEVEL=5
-D PSY_DEVMODE
19 changes: 5 additions & 14 deletions src/PsychicVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@

#pragma once

#ifdef __cplusplus
extern "C"
{
#endif

/** Major version number (X.x.x) */
#define PSYCHIC_VERSION_MAJOR 2
/** Minor version number (x.X.x) */
Expand All @@ -43,14 +38,10 @@ extern "C"
/**
* Current PsychicHttp version, as string
*/
#ifndef df2xstr
#define df2xstr(s) #s
#ifndef PSYCHIC_df2xstr
#define PSYCHIC_df2xstr(s) #s
#endif
#ifndef df2str
#define df2str(s) df2xstr(s)
#ifndef PSYCHIC_df2str
#define PSYCHIC_df2str(s) PSYCHIC_df2xstr(s)
#endif
#define PSYCHIC_VERSION_STR df2str(PSYCHIC_VERSION_MAJOR) "." df2str(PSYCHIC_VERSION_MINOR) "." df2str(PSYCHIC_VERSION_PATCH)

#ifdef __cplusplus
}
#endif
#define PSYCHIC_VERSION_STR PSYCHIC_df2str(PSYCHIC_VERSION_MAJOR) "." PSYCHIC_df2str(PSYCHIC_VERSION_MINOR) "." PSYCHIC_df2str(PSYCHIC_VERSION_PATCH)

0 comments on commit 886a025

Please sign in to comment.