diff --git a/.github/workflows/minihil_desktop_cc_checker.yml b/.github/workflows/minihil_desktop_cc_checker.yml deleted file mode 100755 index c2100b5..0000000 --- a/.github/workflows/minihil_desktop_cc_checker.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: minihil-desktop CC checker -on: - push: - branches: [ master ] - paths: - - 'sw/minihil-desktop/**' - pull_request: - branches: [ master ] - paths: - - 'sw/minihil-desktop/**' -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Check length of line in modules - id: long_line_checker - run: | - echo Checking length of line in modules - modules_ok=0 - modules=($(find sw/ -type f -name '*.cc' -exec echo '{}' \;)) - for mod in "${modules[@]}"; do line_length=$(wc -L < "${mod}"); [[ $line_length -gt 80 ]] && modules_ok=1; done - [[ $modules_ok -eq 0 ]] && echo ::set-output name=status::success || echo ::set-output name=status::failure - - name: Check number of lines in modules - id: num_line_checker - run: | - echo Checking number of lines in modules - modules_ok=0 - modules=($(find sw/ -type f -name '*.cc' -exec echo '{}' \;)) - for mod in "${modules[@]}"; do line_numbers=$(wc -l < "${mod}"); [[ $line_numbers -gt 300 ]] && modules_ok=1; done - [[ $modules_ok -eq 0 ]] && echo ::set-output name=status::success || echo ::set-output name=status::failure - - name: Check on failures - if: steps.long_line_checker.outputs.status == 'failure' || steps.num_line_checker.outputs.status == 'failure' - run: exit 1 diff --git a/.github/workflows/minihil_desktop_cc_checker_build.yml b/.github/workflows/minihil_desktop_cc_checker_build.yml deleted file mode 100644 index 7bd9b98..0000000 --- a/.github/workflows/minihil_desktop_cc_checker_build.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: minihil-desktop C++ CI -on: - push: - branches: [ master ] - paths: - - 'sw/minihil-desktop/**' - pull_request: - branches: [ master ] - paths: - - 'sw/minihil-desktop/**' -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: install GTK-- - id: install_gtkmm - run: | - sudo apt-get update - sudo apt-get install jq - sudo apt-get install libgtkmm-3.0-dev - - name: make all - id: gnu_make_all - run: | - cd sw/minihil-desktop/build - make all - - name: make clean - id: gnu_make_clean - run: | - cd sw/minihil-desktop/build - make clean diff --git a/.github/workflows/minihil_device_c_checker.yml b/.github/workflows/minihil_device_c_checker.yml deleted file mode 100755 index 1306ccb..0000000 --- a/.github/workflows/minihil_device_c_checker.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: minihil-device C checker -on: - push: - branches: [ master ] - paths: - - 'sw/minihil-device0/**' - pull_request: - branches: [ master ] - paths: - - 'sw/minihil-device1/**' -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Check length of line in modules - id: long_line_checker - run: | - echo Checking length of line in modules - modules_ok=0 - modules=($(find sw/ -type f -name '*.c' -exec echo '{}' \;)) - for mod in "${modules[@]}"; do line_length=$(wc -L < "${mod}"); [[ $line_length -gt 80 ]] && modules_ok=1; done - [[ $modules_ok -eq 0 ]] && echo ::set-output name=status::success || echo ::set-output name=status::failure - - name: Check number of lines in modules - id: num_line_checker - run: | - echo Checking number of lines in modules - modules_ok=0 - modules=($(find sw/ -type f -name '*.c' -exec echo '{}' \;)) - for mod in "${modules[@]}"; do line_numbers=$(wc -l < "${mod}"); [[ $line_numbers -gt 300 ]] && modules_ok=1; done - [[ $modules_ok -eq 0 ]] && echo ::set-output name=status::success || echo ::set-output name=status::failure - - name: Check on failures - if: steps.long_line_checker.outputs.status == 'failure' || steps.num_line_checker.outputs.status == 'failure' - run: exit 1 diff --git a/.github/workflows/minihil_toc.yml b/.github/workflows/minihil_toc.yml index d15e837..0fac175 100755 --- a/.github/workflows/minihil_toc.yml +++ b/.github/workflows/minihil_toc.yml @@ -1,11 +1,25 @@ name: minihil toc + on: push: + branches: [ master ] paths: - '**.md' + pull_request: + branches: [ master ] + paths: + - '**.md' + +permissions: + contents: write + jobs: generateTOC: - name: TOC Generator + name: minihil toc runs-on: ubuntu-latest steps: - - uses: technote-space/toc-generator@v2 + - uses: actions/checkout@v4 + - name: Generate TOC + uses: technote-space/toc-generator@v4 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 7ab8c68..89cd5b2 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ -# miniHIL - **minihil** is development device which can be used for **[HWIL](https://en.wikipedia.org/wiki/Hardware-in-the-loop_simulation)**. The README is used to introduce the tool and provide instructions on @@ -58,5 +56,4 @@ Lets help and support Raspberry PI && GNOME. RPi GNOME - - + \ No newline at end of file diff --git a/hw/pcb/.editorconfig b/hw/pcb/.editorconfig deleted file mode 100755 index 72716a4..0000000 --- a/hw/pcb/.editorconfig +++ /dev/null @@ -1,3 +0,0 @@ -[**.*] -indent_style = tab -tab_width = 4 diff --git a/sw/minihil-desktop/.editorconfig b/sw/minihil-desktop/.editorconfig deleted file mode 100644 index 72716a4..0000000 --- a/sw/minihil-desktop/.editorconfig +++ /dev/null @@ -1,3 +0,0 @@ -[**.*] -indent_style = tab -tab_width = 4 diff --git a/sw/minihil-desktop/build/.editorconfig b/sw/minihil-desktop/build/.editorconfig deleted file mode 100644 index 72716a4..0000000 --- a/sw/minihil-desktop/build/.editorconfig +++ /dev/null @@ -1,3 +0,0 @@ -[**.*] -indent_style = tab -tab_width = 4 diff --git a/sw/minihil-desktop/build/Makefile b/sw/minihil-desktop/build/Makefile deleted file mode 100644 index 3a9e7b3..0000000 --- a/sw/minihil-desktop/build/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -# -# @brief minihil-desktop -# @version 1.0.0 -# @date Fri 26 Nov 2021 11:10:21 PM CET -# @company None, free software to use 2021 -# @author Vladimir Roncevic -# - -CC=g++ -RM=rm - -include ccflags.mk -include ldflags.mk -include sources.mk -include objects.mk - -EXECUTABLE=minihil-desktop - -all: $(SOURCES) $(EXECUTABLE) - -$(EXECUTABLE): $(OBJECTS) - $(CC) $(LDFLAGS) $(OBJECTS) -o $@ `pkg-config gtkmm-3.0 --libs` - -.cc.o: - $(CC) $(CFLAGS) $< -o $@ `pkg-config gtkmm-3.0 --cflags` - -clean: - $(RM) -rf ../*.o $(EXECUTABLE) diff --git a/sw/minihil-desktop/build/ccflags.mk b/sw/minihil-desktop/build/ccflags.mk deleted file mode 100644 index 6462b0f..0000000 --- a/sw/minihil-desktop/build/ccflags.mk +++ /dev/null @@ -1,9 +0,0 @@ -# -# @brief minihil-desktop -# @version 1.0.0 -# @date Fri 26 Nov 2021 11:10:21 PM CET -# @company None, free software to use 2021 -# @author Vladimir Roncevic -# - -CFLAGS=-c -Wall diff --git a/sw/minihil-desktop/build/ldflags.mk b/sw/minihil-desktop/build/ldflags.mk deleted file mode 100644 index de5d2cc..0000000 --- a/sw/minihil-desktop/build/ldflags.mk +++ /dev/null @@ -1,9 +0,0 @@ -# -# @brief minihil-desktop -# @version 1.0.0 -# @date Fri 26 Nov 2021 11:10:21 PM CET -# @company None, free software to use 2021 -# @author Vladimir Roncevic -# - -LDFLAGS= diff --git a/sw/minihil-desktop/build/objects.mk b/sw/minihil-desktop/build/objects.mk deleted file mode 100644 index 7cf611d..0000000 --- a/sw/minihil-desktop/build/objects.mk +++ /dev/null @@ -1,9 +0,0 @@ -# -# @brief minihil-desktop -# @version 1.0.0 -# @date Fri 26 Nov 2021 11:10:21 PM CET -# @company None, free software to use 2021 -# @author Vladimir Roncevic -# - -OBJECTS=$(SOURCES:.cc=.o) diff --git a/sw/minihil-desktop/build/sources.mk b/sw/minihil-desktop/build/sources.mk deleted file mode 100644 index 519bc4e..0000000 --- a/sw/minihil-desktop/build/sources.mk +++ /dev/null @@ -1,9 +0,0 @@ -# -# @brief minihil-desktop -# @version 1.0.0 -# @date Fri 26 Nov 2021 11:10:21 PM CET -# @company None, free software to use 2021 -# @author Vladimir Roncevic -# - -SOURCES=../minihil_desktop.cc ../main.cc diff --git a/sw/minihil-desktop/main.cc b/sw/minihil-desktop/main.cc deleted file mode 100644 index dc851fe..0000000 --- a/sw/minihil-desktop/main.cc +++ /dev/null @@ -1,27 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ -/* - * main.cc - * Copyright (C) 2021 Vladimir Roncevic - * - * minihil is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * minihil is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ -#include "minihil_desktop.h" -#include - -int main(int argc, char *argv[]) -{ - auto app = Gtk::Application::create(argc, argv, "org.gtkmm.miniHIL"); - MiniHIL window_instance; - return app->run(window_instance); -} diff --git a/sw/minihil-desktop/minihil_desktop.cc b/sw/minihil-desktop/minihil_desktop.cc deleted file mode 100644 index 9647748..0000000 --- a/sw/minihil-desktop/minihil_desktop.cc +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ -/* - * minihil_desktop.cc - * Copyright (C) 2021 Vladimir Roncevic - * - * minihil is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * minihil is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ -#include -#include "minihil_desktop.h" - -MiniHIL::MiniHIL() -{ - this->set_title(MINIHIL_TITLE); - this->set_border_width(MINIHIL_BORDER_WIDTH); - this->add(this->main_grid); -} - -MiniHIL::~MiniHIL() -{ - std::cout << "Clean up code/data" << std::endl; -} diff --git a/sw/minihil-desktop/minihil_desktop.h b/sw/minihil-desktop/minihil_desktop.h deleted file mode 100644 index 4e497d9..0000000 --- a/sw/minihil-desktop/minihil_desktop.h +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ -/* - * minihil_desktop.h - * Copyright (C) 2021 Vladimir Roncevic - * - * minihil is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * minihil is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef MINIHIL_DEKSTOP_H -#define MINIHIL_DEKSTOP_H - -#include -#include - -#define MINIHIL_TITLE "miniHIL" -#define MINIHIL_VERSION "1.0.0" -#define MINIHIL_BORDER_WIDTH 10 - -class MiniHIL : public Gtk::Window -{ -public: - MiniHIL(); - ~MiniHIL(); - -protected: - Gtk::Grid main_grid; -}; - -#endif diff --git a/sw/minihil-device0/.editorconfig b/sw/minihil-device0/.editorconfig deleted file mode 100644 index 72716a4..0000000 --- a/sw/minihil-device0/.editorconfig +++ /dev/null @@ -1,3 +0,0 @@ -[**.*] -indent_style = tab -tab_width = 4 diff --git a/sw/minihil-device0/CMakeLists.txt b/sw/minihil-device0/CMakeLists.txt deleted file mode 100644 index 9d67f6e..0000000 --- a/sw/minihil-device0/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -# -# @brief minihil main entry point for build process -# @version v1.0.3 -# @date 2021-12-15 -# @author Vladimir Roncevic -# - -# Setup CMake version and RPI Pico SDK import -cmake_minimum_required(VERSION 3.12) -include(pico_sdk_import.cmake) - -# Setup project info -project(minihil-device0 C CXX ASM) -set(CMAKE_PROJECT_VERSION 1.0.0) -set(CMAKE_C_STANDARD 11) -set(CMAKE_CXX_STANDARD 17) -set(PRO_PATH ${PROJECT_SOURCE_DIR}) - -# Initialize the SDK -pico_sdk_init() - -# Setup project url -include(pro_auto_set_url.cmake) - -# Add source directory -add_subdirectory(src) - diff --git a/sw/minihil-device0/build/.editorconfig b/sw/minihil-device0/build/.editorconfig deleted file mode 100644 index 72716a4..0000000 --- a/sw/minihil-device0/build/.editorconfig +++ /dev/null @@ -1,3 +0,0 @@ -[**.*] -indent_style = tab -tab_width = 4 diff --git a/sw/minihil-device0/pico_sdk_import.cmake b/sw/minihil-device0/pico_sdk_import.cmake deleted file mode 100644 index 3595091..0000000 --- a/sw/minihil-device0/pico_sdk_import.cmake +++ /dev/null @@ -1,97 +0,0 @@ -# -# @brief minihil RPI Pico SDK import -# @version v1.0.3 -# @date 2021-12-15 -# @author Vladimir Roncevic -# - -# Checking SDK path -if (DEFINED ENV{PICO_SDK_PATH} AND (NOT PICO_SDK_PATH)) - set(PICO_SDK_PATH $ENV{PICO_SDK_PATH}) - message("Using PICO_SDK_PATH from environment ('${PICO_SDK_PATH}')") -endif () - -# Checking SDK path fetched from GIT -if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT} AND (NOT PICO_SDK_FETCH_FROM_GIT)) - set(PICO_SDK_FETCH_FROM_GIT $ENV{PICO_SDK_FETCH_FROM_GIT}) - message( - "Using PICO_SDK_FETCH_FROM_GIT" - "from environment ('${PICO_SDK_FETCH_FROM_GIT}')" - ) -endif () - -if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT_PATH} AND (NOT PICO_SDK_FETCH_FROM_GIT_PATH)) - set(PICO_SDK_FETCH_FROM_GIT_PATH $ENV{PICO_SDK_FETCH_FROM_GIT_PATH}) - message( - "Using PICO_SDK_FETCH_FROM_GIT_PATH" - "from environment ('${PICO_SDK_FETCH_FROM_GIT_PATH}')" - ) -endif () - -# Setup RPI PICO SDK path -set( - PICO_SDK_PATH "${PICO_SDK_PATH}" CACHE PATH "Path to the RPI Pi Pico SDK" -) -set( - PICO_SDK_FETCH_FROM_GIT "${PICO_SDK_FETCH_FROM_GIT}" - CACHE BOOL - "Set to ON to fetch copy of SDK from git if not otherwise locatable" -) -set( - PICO_SDK_FETCH_FROM_GIT_PATH "${PICO_SDK_FETCH_FROM_GIT_PATH}" - CACHE FILEPATH "location to download SDK" -) - -# Fetch RPI PI SDK from GitHub -if (NOT PICO_SDK_PATH) - if (PICO_SDK_FETCH_FROM_GIT) - include(FetchContent) - set(FETCHCONTENT_BASE_DIR_SAVE ${FETCHCONTENT_BASE_DIR}) - if (PICO_SDK_FETCH_FROM_GIT_PATH) - get_filename_component( - FETCHCONTENT_BASE_DIR "${PICO_SDK_FETCH_FROM_GIT_PATH}" - REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}" - ) - endif () - FetchContent_Declare( - pico_sdk - GIT_REPOSITORY https://github.com/RPIpi/pico-sdk - GIT_TAG master - ) - if (NOT pico_sdk) - message("Downloading RPI Pi Pico SDK") - FetchContent_Populate(pico_sdk) - set(PICO_SDK_PATH ${pico_sdk_SOURCE_DIR}) - endif () - set(FETCHCONTENT_BASE_DIR ${FETCHCONTENT_BASE_DIR_SAVE}) - else () - message( - FATAL_ERROR - "SDK location was not specified." - "Please set PICO_SDK_PATH or set PICO_SDK_FETCH_FROM_GIT." - ) - endif () -endif () - -get_filename_component( - PICO_SDK_PATH "${PICO_SDK_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}" -) -if (NOT EXISTS ${PICO_SDK_PATH}) - message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' not found") -endif () - -set(PICO_SDK_INIT_CMAKE_FILE ${PICO_SDK_PATH}/pico_sdk_init.cmake) - -# Check RPI PI SDK init configuration -if (NOT EXISTS ${PICO_SDK_INIT_CMAKE_FILE}) - message( - FATAL_ERROR - "Dir '${PICO_SDK_PATH}' does not appear to contain RPI Pi Pico SDK" - ) -endif () - -set( - PICO_SDK_PATH ${PICO_SDK_PATH} CACHE PATH "Path to RPI Pi Pico SDK" FORCE -) - -include(${PICO_SDK_INIT_CMAKE_FILE}) diff --git a/sw/minihil-device0/pro_auto_set_url.cmake b/sw/minihil-device0/pro_auto_set_url.cmake deleted file mode 100644 index d288585..0000000 --- a/sw/minihil-device0/pro_auto_set_url.cmake +++ /dev/null @@ -1,15 +0,0 @@ -# -# @brief minihil setup project url -# @version v1.0.3 -# @date 2021-12-15 -# @author Vladimir Roncevic -# - -# Macro for setup project url -macro(pro_auto_set_url TARGET) - file( - RELATIVE_PATH URL_REL_PATH "${PRO_PATH}" "${CMAKE_CURRENT_LIST_DIR}" - ) - pico_set_program_url(${TARGET} "${URL_REL_PATH}") -endmacro() - diff --git a/sw/minihil-device0/src/.editorconfig b/sw/minihil-device0/src/.editorconfig deleted file mode 100644 index 72716a4..0000000 --- a/sw/minihil-device0/src/.editorconfig +++ /dev/null @@ -1,3 +0,0 @@ -[**.*] -indent_style = tab -tab_width = 4 diff --git a/sw/minihil-device0/src/CMakeLists.txt b/sw/minihil-device0/src/CMakeLists.txt deleted file mode 100644 index 4afb98b..0000000 --- a/sw/minihil-device0/src/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -# -# @brief minihil setup output files -# @version v1.0.3 -# @date 2021-12-15 -# @author Vladimir Roncevic -# - -# Create executable -add_executable("${CMAKE_PROJECT_NAME}" main.c) - -# Pull in our pico_stdlib which pulls in commonly used features -target_link_libraries("${CMAKE_PROJECT_NAME}" pico_stdlib) - -# Create extra output files map/bin/hex -pico_add_extra_outputs("${CMAKE_PROJECT_NAME}") - -# Add url via pico_set_program_url -pro_auto_set_url("${CMAKE_PROJECT_NAME}") - diff --git a/sw/minihil-device0/src/main.c b/sw/minihil-device0/src/main.c deleted file mode 100644 index b396f12..0000000 --- a/sw/minihil-device0/src/main.c +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ -/* - * main.c - * Copyright (C) 2021 Vladimir Roncevic - * - * minihil is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * minihil is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program_name. If not, see . - */ - -#include "pico/stdlib.h" - -int main() { -#ifndef PICO_DEFAULT_LED_PIN -#warning blink example requires a board with a regular LED -#else - const uint LED_PIN = PICO_DEFAULT_LED_PIN; - gpio_init(LED_PIN); - gpio_set_dir(LED_PIN, GPIO_OUT); - while (true) { - gpio_put(LED_PIN, 1); - sleep_ms(250); - gpio_put(LED_PIN, 0); - sleep_ms(250); - } -#endif -} - diff --git a/sw/minihil-device1/.editorconfig b/sw/minihil-device1/.editorconfig deleted file mode 100644 index 72716a4..0000000 --- a/sw/minihil-device1/.editorconfig +++ /dev/null @@ -1,3 +0,0 @@ -[**.*] -indent_style = tab -tab_width = 4 diff --git a/sw/minihil-device1/CMakeLists.txt b/sw/minihil-device1/CMakeLists.txt deleted file mode 100644 index d4e10e9..0000000 --- a/sw/minihil-device1/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -# -# @brief minihil main entry point for build process -# @version v1.0.3 -# @date 2021-12-15 -# @author Vladimir Roncevic -# - -# Setup CMake version and RPI Pico SDK import -cmake_minimum_required(VERSION 3.12) -include(pico_sdk_import.cmake) - -# Setup project info -project(minihil-device1 C CXX ASM) -set(CMAKE_PROJECT_VERSION 1.0.0) -set(CMAKE_C_STANDARD 11) -set(CMAKE_CXX_STANDARD 17) -set(PRO_PATH ${PROJECT_SOURCE_DIR}) - -# Initialize the SDK -pico_sdk_init() - -# Setup project url -include(pro_auto_set_url.cmake) - -# Add source directory -add_subdirectory(src) - diff --git a/sw/minihil-device1/build/.editorconfig b/sw/minihil-device1/build/.editorconfig deleted file mode 100644 index 72716a4..0000000 --- a/sw/minihil-device1/build/.editorconfig +++ /dev/null @@ -1,3 +0,0 @@ -[**.*] -indent_style = tab -tab_width = 4 diff --git a/sw/minihil-device1/pico_sdk_import.cmake b/sw/minihil-device1/pico_sdk_import.cmake deleted file mode 100644 index 3595091..0000000 --- a/sw/minihil-device1/pico_sdk_import.cmake +++ /dev/null @@ -1,97 +0,0 @@ -# -# @brief minihil RPI Pico SDK import -# @version v1.0.3 -# @date 2021-12-15 -# @author Vladimir Roncevic -# - -# Checking SDK path -if (DEFINED ENV{PICO_SDK_PATH} AND (NOT PICO_SDK_PATH)) - set(PICO_SDK_PATH $ENV{PICO_SDK_PATH}) - message("Using PICO_SDK_PATH from environment ('${PICO_SDK_PATH}')") -endif () - -# Checking SDK path fetched from GIT -if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT} AND (NOT PICO_SDK_FETCH_FROM_GIT)) - set(PICO_SDK_FETCH_FROM_GIT $ENV{PICO_SDK_FETCH_FROM_GIT}) - message( - "Using PICO_SDK_FETCH_FROM_GIT" - "from environment ('${PICO_SDK_FETCH_FROM_GIT}')" - ) -endif () - -if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT_PATH} AND (NOT PICO_SDK_FETCH_FROM_GIT_PATH)) - set(PICO_SDK_FETCH_FROM_GIT_PATH $ENV{PICO_SDK_FETCH_FROM_GIT_PATH}) - message( - "Using PICO_SDK_FETCH_FROM_GIT_PATH" - "from environment ('${PICO_SDK_FETCH_FROM_GIT_PATH}')" - ) -endif () - -# Setup RPI PICO SDK path -set( - PICO_SDK_PATH "${PICO_SDK_PATH}" CACHE PATH "Path to the RPI Pi Pico SDK" -) -set( - PICO_SDK_FETCH_FROM_GIT "${PICO_SDK_FETCH_FROM_GIT}" - CACHE BOOL - "Set to ON to fetch copy of SDK from git if not otherwise locatable" -) -set( - PICO_SDK_FETCH_FROM_GIT_PATH "${PICO_SDK_FETCH_FROM_GIT_PATH}" - CACHE FILEPATH "location to download SDK" -) - -# Fetch RPI PI SDK from GitHub -if (NOT PICO_SDK_PATH) - if (PICO_SDK_FETCH_FROM_GIT) - include(FetchContent) - set(FETCHCONTENT_BASE_DIR_SAVE ${FETCHCONTENT_BASE_DIR}) - if (PICO_SDK_FETCH_FROM_GIT_PATH) - get_filename_component( - FETCHCONTENT_BASE_DIR "${PICO_SDK_FETCH_FROM_GIT_PATH}" - REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}" - ) - endif () - FetchContent_Declare( - pico_sdk - GIT_REPOSITORY https://github.com/RPIpi/pico-sdk - GIT_TAG master - ) - if (NOT pico_sdk) - message("Downloading RPI Pi Pico SDK") - FetchContent_Populate(pico_sdk) - set(PICO_SDK_PATH ${pico_sdk_SOURCE_DIR}) - endif () - set(FETCHCONTENT_BASE_DIR ${FETCHCONTENT_BASE_DIR_SAVE}) - else () - message( - FATAL_ERROR - "SDK location was not specified." - "Please set PICO_SDK_PATH or set PICO_SDK_FETCH_FROM_GIT." - ) - endif () -endif () - -get_filename_component( - PICO_SDK_PATH "${PICO_SDK_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}" -) -if (NOT EXISTS ${PICO_SDK_PATH}) - message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' not found") -endif () - -set(PICO_SDK_INIT_CMAKE_FILE ${PICO_SDK_PATH}/pico_sdk_init.cmake) - -# Check RPI PI SDK init configuration -if (NOT EXISTS ${PICO_SDK_INIT_CMAKE_FILE}) - message( - FATAL_ERROR - "Dir '${PICO_SDK_PATH}' does not appear to contain RPI Pi Pico SDK" - ) -endif () - -set( - PICO_SDK_PATH ${PICO_SDK_PATH} CACHE PATH "Path to RPI Pi Pico SDK" FORCE -) - -include(${PICO_SDK_INIT_CMAKE_FILE}) diff --git a/sw/minihil-device1/pro_auto_set_url.cmake b/sw/minihil-device1/pro_auto_set_url.cmake deleted file mode 100644 index d288585..0000000 --- a/sw/minihil-device1/pro_auto_set_url.cmake +++ /dev/null @@ -1,15 +0,0 @@ -# -# @brief minihil setup project url -# @version v1.0.3 -# @date 2021-12-15 -# @author Vladimir Roncevic -# - -# Macro for setup project url -macro(pro_auto_set_url TARGET) - file( - RELATIVE_PATH URL_REL_PATH "${PRO_PATH}" "${CMAKE_CURRENT_LIST_DIR}" - ) - pico_set_program_url(${TARGET} "${URL_REL_PATH}") -endmacro() - diff --git a/sw/minihil-device1/src/.editorconfig b/sw/minihil-device1/src/.editorconfig deleted file mode 100644 index 72716a4..0000000 --- a/sw/minihil-device1/src/.editorconfig +++ /dev/null @@ -1,3 +0,0 @@ -[**.*] -indent_style = tab -tab_width = 4 diff --git a/sw/minihil-device1/src/CMakeLists.txt b/sw/minihil-device1/src/CMakeLists.txt deleted file mode 100644 index 4afb98b..0000000 --- a/sw/minihil-device1/src/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -# -# @brief minihil setup output files -# @version v1.0.3 -# @date 2021-12-15 -# @author Vladimir Roncevic -# - -# Create executable -add_executable("${CMAKE_PROJECT_NAME}" main.c) - -# Pull in our pico_stdlib which pulls in commonly used features -target_link_libraries("${CMAKE_PROJECT_NAME}" pico_stdlib) - -# Create extra output files map/bin/hex -pico_add_extra_outputs("${CMAKE_PROJECT_NAME}") - -# Add url via pico_set_program_url -pro_auto_set_url("${CMAKE_PROJECT_NAME}") - diff --git a/sw/minihil-device1/src/main.c b/sw/minihil-device1/src/main.c deleted file mode 100644 index b396f12..0000000 --- a/sw/minihil-device1/src/main.c +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ -/* - * main.c - * Copyright (C) 2021 Vladimir Roncevic - * - * minihil is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * minihil is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program_name. If not, see . - */ - -#include "pico/stdlib.h" - -int main() { -#ifndef PICO_DEFAULT_LED_PIN -#warning blink example requires a board with a regular LED -#else - const uint LED_PIN = PICO_DEFAULT_LED_PIN; - gpio_init(LED_PIN); - gpio_set_dir(LED_PIN, GPIO_OUT); - while (true) { - gpio_put(LED_PIN, 1); - sleep_ms(250); - gpio_put(LED_PIN, 0); - sleep_ms(250); - } -#endif -} -