From 14078ffda062088484e8c1a561f7bc177751a74d Mon Sep 17 00:00:00 2001 From: Ulysse Cura Date: Sun, 20 Sep 2026 19:56:36 +0200 Subject: [PATCH] Moved folders. --- {GCC_Project => C}/.ccls | 0 {GCC_Project => C}/.gitignore | 0 {GCC_Project => C}/.vscode/tasks.json | 0 {GCC_Project => C}/Makefile | 2 +- {GCC_Project => C}/README.md | 0 {GCC_Project => C}/src/main.c | 0 C_PicoSDK/.gitignore | 2 + C_PicoSDK/.vscode/tasks.json | 57 ++++++++++++++++++ C_PicoSDK/CMakeLists.txt | 35 +++++++++++ C_PicoSDK/compile_commands.json | 1 + C_PicoSDK/src/main.c | 59 +++++++++++++++++++ {ESP32_Project => C_PlatformIO}/.gitignore | 0 .../.vscode/c_cpp_properties.json | 0 .../.vscode/tasks.json | 0 .../CMakeLists.txt | 0 {ESP32_Project => C_PlatformIO}/README.md | 0 .../platformio.ini | 0 .../sdkconfig.esp32thing | 0 .../src/CMakeLists.txt | 0 {ESP32_Project => C_PlatformIO}/src/main.c | 0 Python/README.md | 0 Python/src/main.py | 0 22 files changed, 155 insertions(+), 1 deletion(-) rename {GCC_Project => C}/.ccls (100%) rename {GCC_Project => C}/.gitignore (100%) rename {GCC_Project => C}/.vscode/tasks.json (100%) rename {GCC_Project => C}/Makefile (98%) rename {GCC_Project => C}/README.md (100%) rename {GCC_Project => C}/src/main.c (100%) create mode 100644 C_PicoSDK/.gitignore create mode 100644 C_PicoSDK/.vscode/tasks.json create mode 100644 C_PicoSDK/CMakeLists.txt create mode 120000 C_PicoSDK/compile_commands.json create mode 100644 C_PicoSDK/src/main.c rename {ESP32_Project => C_PlatformIO}/.gitignore (100%) rename {ESP32_Project => C_PlatformIO}/.vscode/c_cpp_properties.json (100%) rename {ESP32_Project => C_PlatformIO}/.vscode/tasks.json (100%) rename {ESP32_Project => C_PlatformIO}/CMakeLists.txt (100%) rename {ESP32_Project => C_PlatformIO}/README.md (100%) rename {ESP32_Project => C_PlatformIO}/platformio.ini (100%) rename {ESP32_Project => C_PlatformIO}/sdkconfig.esp32thing (100%) rename {ESP32_Project => C_PlatformIO}/src/CMakeLists.txt (100%) rename {ESP32_Project => C_PlatformIO}/src/main.c (100%) create mode 100644 Python/README.md create mode 100644 Python/src/main.py diff --git a/GCC_Project/.ccls b/C/.ccls similarity index 100% rename from GCC_Project/.ccls rename to C/.ccls diff --git a/GCC_Project/.gitignore b/C/.gitignore similarity index 100% rename from GCC_Project/.gitignore rename to C/.gitignore diff --git a/GCC_Project/.vscode/tasks.json b/C/.vscode/tasks.json similarity index 100% rename from GCC_Project/.vscode/tasks.json rename to C/.vscode/tasks.json diff --git a/GCC_Project/Makefile b/C/Makefile similarity index 98% rename from GCC_Project/Makefile rename to C/Makefile index 551e41a..0f48d4d 100644 --- a/GCC_Project/Makefile +++ b/C/Makefile @@ -6,7 +6,7 @@ SOURCES := \ src/main.c # Output target name -OUTPUT := GCC_Project +OUTPUT := C # Compiler and flags CC = gcc diff --git a/GCC_Project/README.md b/C/README.md similarity index 100% rename from GCC_Project/README.md rename to C/README.md diff --git a/GCC_Project/src/main.c b/C/src/main.c similarity index 100% rename from GCC_Project/src/main.c rename to C/src/main.c diff --git a/C_PicoSDK/.gitignore b/C_PicoSDK/.gitignore new file mode 100644 index 0000000..d0bc435 --- /dev/null +++ b/C_PicoSDK/.gitignore @@ -0,0 +1,2 @@ +build +.vscode/ccls-cache \ No newline at end of file diff --git a/C_PicoSDK/.vscode/tasks.json b/C_PicoSDK/.vscode/tasks.json new file mode 100644 index 0000000..2b45c2a --- /dev/null +++ b/C_PicoSDK/.vscode/tasks.json @@ -0,0 +1,57 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Build", + "detail": "Build project", + "type": "shell", + "command": "cmake -H. -Bbuild -DCMAKE_EXPORT_COMPILE_COMMANDS=YES && make -j$(nproc) -C build", + "args": [ + ], + "group": "build", + "presentation": { + "echo": true, + "reveal": "always", + "focus": true, + "panel": "shared", + "showReuseMessage": true, + "clear": true + } + }, + { + "label": "Clean", + "detail": "Clean build directory and executable", + "type": "shell", + "command": "rm -rf build", + "args": [ + ], + "group": "build", + "presentation": { + "echo": false, + "reveal": "never", + "focus": false, + "panel": "shared", + "showReuseMessage": false, + "clear": true + } + }, + { + "label": "Flash", + "detail": "Flash executable", + "type": "shell", + "dependsOn": "Build", + "command": "cd build && make Flash", + "args": [ + ], + "group": "build", + "presentation": { + "echo": true, + "reveal": "always", + "focus": true, + "panel": "shared", + "showReuseMessage": true, + "clear": true + } + } + ] +} \ No newline at end of file diff --git a/C_PicoSDK/CMakeLists.txt b/C_PicoSDK/CMakeLists.txt new file mode 100644 index 0000000..911e135 --- /dev/null +++ b/C_PicoSDK/CMakeLists.txt @@ -0,0 +1,35 @@ +cmake_minimum_required(VERSION 3.13) + +# Explicitely define board. +set(PICO_BOARD pico) +if(NOT DEFINED PICO_BOARD) + add_definitions(-DPICO_BOARD=${PICO_BOARD}) +endif() + +# Need to include pico-sdk cmake support. Must happen before project. +include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake) + +project(PicoW_UDP_Tests C CXX ASM) +set(CMAKE_C_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) + +pico_sdk_init() + +add_executable(PicoW_UDP_Tests + src/main.c +) + +target_link_libraries(PicoW_UDP_Tests + pico_stdlib +) + +# Stdio configuration +pico_enable_stdio_usb(PicoW_UDP_Tests 1) +pico_enable_stdio_uart(PicoW_UDP_Tests 1) + +pico_add_extra_outputs(PicoW_UDP_Tests) + +add_custom_target(Flash + DEPENDS PicoW_UDP_Tests + COMMAND picotool load -f ${PROJECT_BINARY_DIR}/PicoW_UDP_Tests.uf2 +) diff --git a/C_PicoSDK/compile_commands.json b/C_PicoSDK/compile_commands.json new file mode 120000 index 0000000..25eb4b2 --- /dev/null +++ b/C_PicoSDK/compile_commands.json @@ -0,0 +1 @@ +build/compile_commands.json \ No newline at end of file diff --git a/C_PicoSDK/src/main.c b/C_PicoSDK/src/main.c new file mode 100644 index 0000000..84634e8 --- /dev/null +++ b/C_PicoSDK/src/main.c @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include + +#ifdef CYW43_WL_GPIO_LED_PIN +// Pico W devices use a GPIO on the WIFI chip for the LED, +// so when building for Pico W, CYW43_WL_GPIO_LED_PIN will be defined +#include +#endif + +#ifndef LED_DELAY_MS +#define LED_DELAY_MS 250 +#endif + +// Perform initialisation +int pico_led_init(void) +{ +#if defined(PICO_DEFAULT_LED_PIN) + // A device like Pico that uses a GPIO for the LED will define PICO_DEFAULT_LED_PIN + // so we can use normal GPIO functionality to turn the led on and off + gpio_init(PICO_DEFAULT_LED_PIN); + gpio_set_dir(PICO_DEFAULT_LED_PIN, GPIO_OUT); + return PICO_OK; +#elif defined(CYW43_WL_GPIO_LED_PIN) + // For Pico W devices we need to initialise the driver etc + return cyw43_arch_init(); +#endif +} + +// Turn the led on or off +void pico_set_led(bool led_on) +{ +#if defined(PICO_DEFAULT_LED_PIN) + // Just set the GPIO on or off + gpio_put(PICO_DEFAULT_LED_PIN, led_on); +#elif defined(CYW43_WL_GPIO_LED_PIN) + // Ask the wifi "driver" to set the GPIO on or off + cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, led_on); +#endif +} + +int main() +{ + stdio_init_all(); + + hard_assert(pico_led_init() == PICO_OK); + + while(true) + { + pico_set_led(true); + sleep_ms(LED_DELAY_MS); + pico_set_led(false); + sleep_ms(LED_DELAY_MS); + } +} \ No newline at end of file diff --git a/ESP32_Project/.gitignore b/C_PlatformIO/.gitignore similarity index 100% rename from ESP32_Project/.gitignore rename to C_PlatformIO/.gitignore diff --git a/ESP32_Project/.vscode/c_cpp_properties.json b/C_PlatformIO/.vscode/c_cpp_properties.json similarity index 100% rename from ESP32_Project/.vscode/c_cpp_properties.json rename to C_PlatformIO/.vscode/c_cpp_properties.json diff --git a/ESP32_Project/.vscode/tasks.json b/C_PlatformIO/.vscode/tasks.json similarity index 100% rename from ESP32_Project/.vscode/tasks.json rename to C_PlatformIO/.vscode/tasks.json diff --git a/ESP32_Project/CMakeLists.txt b/C_PlatformIO/CMakeLists.txt similarity index 100% rename from ESP32_Project/CMakeLists.txt rename to C_PlatformIO/CMakeLists.txt diff --git a/ESP32_Project/README.md b/C_PlatformIO/README.md similarity index 100% rename from ESP32_Project/README.md rename to C_PlatformIO/README.md diff --git a/ESP32_Project/platformio.ini b/C_PlatformIO/platformio.ini similarity index 100% rename from ESP32_Project/platformio.ini rename to C_PlatformIO/platformio.ini diff --git a/ESP32_Project/sdkconfig.esp32thing b/C_PlatformIO/sdkconfig.esp32thing similarity index 100% rename from ESP32_Project/sdkconfig.esp32thing rename to C_PlatformIO/sdkconfig.esp32thing diff --git a/ESP32_Project/src/CMakeLists.txt b/C_PlatformIO/src/CMakeLists.txt similarity index 100% rename from ESP32_Project/src/CMakeLists.txt rename to C_PlatformIO/src/CMakeLists.txt diff --git a/ESP32_Project/src/main.c b/C_PlatformIO/src/main.c similarity index 100% rename from ESP32_Project/src/main.c rename to C_PlatformIO/src/main.c diff --git a/Python/README.md b/Python/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Python/src/main.py b/Python/src/main.py new file mode 100644 index 0000000..e69de29