Commit Graph
28 Commits
Author SHA1 Message Date
andrey b6b7a27dcc cmake: make PIP_HAS_DYNLIB depend on PIP_HAS_FILESYSTEM, drop redundant guards in piplugin 2026-08-31 19:02:48 +03:00
andrey 69b22bf95a feat: complete PIP_HAS_* feature guards in code and auto-generate flag summary
Guard PIConnection, thread primitives, PICodeParser and other feature
code behind PIP_HAS_THREADS/PIP_HAS_FILESYSTEM. In CMake generate the
feature flags summary from the single PIP_HAS_FLAGS list (used by the
add_definitions loop as well), default ICU to OFF and make introspection
also require PIP_HAS_SOCKET. Build system/thread test suites only when
the corresponding feature flags are enabled.
2026-08-25 11:14:25 +03:00
andrey 32066e3a8c fix: make PIP buildable for no-threads and no-filesystem flag combinations
Found while verifying -DPIP_HAS_THREADS=OFF / -DPIP_HAS_FILESYSTEM=OFF
smoke builds (pre-existing gaps of the branch):

- piinit.cpp: full implementation now requires PIP_HAS_THREADS as well
  (the PIInit class is declared in piinit.h only with threads; without
  threads PIInit is absent altogether, stub/absent branches unchanged)
- PIWaitEvent: drop the PIP_HAS_THREADS guard - it is a plain
  pipe/select/WaitForMultipleObjects wrapper with no thread usage
  (master had no guard), restores unistd.h include for PICAN etc.
- PIEthernet: guard server_thread_ member, server_func(), threaded
  listen/stop parts and writeThreaded() calls by PIP_HAS_THREADS
- PIPeer: guard class/impl by PIP_HAS_THREADS (uses PIThread/PITimer/
  PIDiagnostics), openDevice() /etc/pip.conf read by PIP_HAS_FILESYSTEM
- PIBinaryLog::restart(): guard threaded-read restart by PIP_HAS_THREADS
- PIIODevice::configure(config_file,...), PIConnection::configureFromConfig,
  PIConfig include resolution: guard path-based bodies by PIP_HAS_FILESYSTEM
- PISerial::availableDevicesInfo(): guard /dev and /proc/tty scan by
  PIP_HAS_FILESYSTEM
- PIHIDevice impl: requires filesystem (sysfs scan) in addition to threads
- PIPluginLoader::pluginsDirectories/findLibrary: guard PIFile/PIDir use
  by PIP_HAS_FILESYSTEM (fallback: empty list / path as-is)
2026-08-22 14:33:34 +03:00
andrey 077ac9887b refactor: rename PIP_NO_\* to PIP_HAS_\* with inverted logic
All feature flags now use positive naming (enabled by default):
- PIP_HAS_FILESYSTEM, PIP_HAS_THREADS, PIP_HAS_SOCKET
- PIP_HAS_PROCESS, PIP_HAS_DYNLIB, PIP_HAS_FFT, PIP_HAS_SERIAL

Preprocessor guards inverted:
- #ifndef PIP_NO_X → #ifdef PIP_HAS_X
- #ifdef PIP_NO_X → #ifndef PIP_HAS_X

CMake options default ON instead of OFF.
Platform blocks set flags OFF to disable features.

85 files transformed via Python script + 2 manual fixes.
2026-08-11 19:51:42 +03:00
andrey 4d8b743075 refactor: migrate MICRO_PIP to fine-grained feature flags
Replace monolithic MICRO_PIP/PIP_MICRO with granular flags:

Feature flags (CMake options + platform auto-detection):
- PIP_NO_FILESYSTEM, PIP_NO_THREADS, PIP_NO_SOCKET
- PIP_NO_PROCESS, PIP_NO_DYNLIB, PIP_NO_FFT, PIP_NO_SERIAL

Embedded optimization flag:
- PIP_EMBEDDED (auto-set for Pico SDK and FreeRTOS)
  Controls buffer sizes, time stubs, terminal fallback, init stubs

Platform blocks in CMakeLists.txt:
- Pico SDK: auto-disables FS, PROCESS, DYNLIB, FFT, SERIAL;
  conditionally disables THREADS (no FreeRTOS) and SOCKET (no LWIP)
- FreeRTOS: auto-disables FS, PROCESS, DYNLIB, FFT, SERIAL;
  conditionally disables SOCKET (no LWIP)
- Android: auto-disables PROCESS, DYNLIB, FFT

Updated 96 files across libs/, utils/, tests/, and CMakeLists.txt.
Builds verified for Linux (547 tests pass) and Pico SDK (100%).
Removed all MICRO_PIP and PIP_MICRO references (0 remaining).
2026-08-11 14:34:59 +03:00
peri4 caa7880cc4 get rid of piForeach
apply some code analyzer recommendations
ICU flag now check if libicu exists
prepare for more accurate growth of containers (limited PoT, then constantly increase size)
2024-11-20 20:01:47 +03:00
peri4 c2b8a8d6da code format 2022-12-14 14:13:52 +03:00
peri4 1b04d7ecce version 2.93 ready to master
remove PIString << operators
2022-06-24 12:10:57 +03:00
peri4 0b3ee4bb6a doc ru 2022-05-05 22:31:59 +03:00
peri4 8d5730f715 PIPluginLoader +1 error 2022-04-30 16:07:30 +03:00
peri4 7a458c5cbe doc ru 2022-04-23 00:44:52 +03:00
peri4 39e4d9a73c doc ru 2022-04-22 21:19:12 +03:00
peri4 54b5372356 doxygen @ tags replaced to \ 2022-03-14 21:19:31 +03:00
Andrey a7df53fbfe platformio_pre.py 2022-01-14 18:15:56 +03:00
andrey 25def958a1 rename doc macros 2021-08-04 16:31:32 +03:00
andrey 0c7ce272e6 fix some warnings, add some doc 2021-08-04 14:31:36 +03:00
peri4 016c2e3141 PIPluginLoader::pluginsDirectories fix 2021-04-18 17:58:48 +03:00
peri4 fd7eae14c6 PIPluginLoader::pluginsDirectories() 2021-04-18 17:40:40 +03:00
andrey 7bbbd09f42 Revert "version 2.16.0, PIPluginLoader changes"
This reverts commit f367ef00f7.
2021-03-05 17:29:04 +03:00
peri4 f367ef00f7 version 2.16.0, PIPluginLoader changes 2021-02-15 16:02:24 +03:00
andrey 587d90f269 fix plugin path in picout 2020-12-23 16:52:27 +03:00
peri4 2794d866fd PIPluginLoader fix 2020-10-18 19:51:59 +03:00
peri4 5078269d0f PIPluginLoader patch for several plugins 2020-10-18 19:50:07 +03:00
andrey 6d7da02de6 PIPluginLoader lib lastError 2020-10-18 12:00:52 +03:00
peri4 0004d2696f PIString::fromAscii() new overload 2020-10-07 23:29:18 +03:00
peri4 bf1808f1c4 version 2.10.1
Documentation of PIPluginLoader
Remove PIVariantSimple ability to assign any type, leave only assignable
2020-10-06 00:53:37 +03:00
peri4 b7aef483b7 PIVariantSimple now has no error when assign to non-copyable typeName
patch pip_cmg according to last PIByteArray changes
plugin system fix
2020-10-03 13:32:43 +03:00
peri4 7421f8c9a0 first try 2020-10-02 14:23:05 +03:00