{"id":21590966,"url":"https://github.com/spaceteam/rodosplayground","last_synced_at":"2025-06-24T01:07:52.719Z","repository":{"id":122271477,"uuid":"393964717","full_name":"SpaceTeam/RodosPlayground","owner":"SpaceTeam","description":"A project to play around with RODOS and all other tools and things we want to use for the COBC firmware.","archived":false,"fork":false,"pushed_at":"2022-09-05T21:52:10.000Z","size":502,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-24T01:07:50.754Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://spaceteam.github.io/RodosPlayground/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpaceTeam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-08T13:13:52.000Z","updated_at":"2025-01-29T21:00:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"9bd9916c-27bf-4376-867d-d2bdd25a02b5","html_url":"https://github.com/SpaceTeam/RodosPlayground","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/SpaceTeam/RodosPlayground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpaceTeam%2FRodosPlayground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpaceTeam%2FRodosPlayground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpaceTeam%2FRodosPlayground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpaceTeam%2FRodosPlayground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpaceTeam","download_url":"https://codeload.github.com/SpaceTeam/RodosPlayground/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpaceTeam%2FRodosPlayground/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261584217,"owners_count":23180673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T16:21:21.261Z","updated_at":"2025-06-24T01:07:52.676Z","avatar_url":"https://github.com/SpaceTeam.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RodosPlayground\n\nThis is the RodosPlayground project.\n\n## Hacking\n\nHere is some wisdom to help you build this project as a developer. It uses CMake, assumes that you\nare developing on Linux and that the required compilers and tools are installed. See [this wiki\npage](https://wiki.tust.at/books/sts1/page/setup-compilers-and-tools#bkmrk-gnu-arm-embedded-too) for\nmore information on the latter.\n\n### Dependencies\n\nThe following libraries are necessary to build RodosPlayground.\n\n- Rodos\n- ETL (Embedded Template Library)\n- type_safe\n\nQuick installation instructions for those can be found [here](https://wiki.tust.at/books/sts1/page/setup-libraries).\n\n### Toolchain files\n\nGenerally, toolchain files are specific to the target platforms as well as your environment and setup\nbut not to your project. Therefore they are not supplied with this repo and should be kept at some \"global\" directory (I, e.g., use `~/programming/cmake/`). A toolchain file for an STM32F411 can look something like the following:\n\n```cmake\n# ##################################################################################################\n# Cross compiler toolchain\n# ##################################################################################################\n\nset(CMAKE_SYSTEM_NAME Generic)\nset(CMAKE_SYSTEM_PROCESSOR ARM)\n\nset(TOOLCHAIN_PREFIX arm-none-eabi-)\n\n# Find path to the cross compiler toolchain\nexecute_process(\n    COMMAND which ${TOOLCHAIN_PREFIX}gcc\n    OUTPUT_VARIABLE BINUTILS_PATH\n    OUTPUT_STRIP_TRAILING_WHITESPACE\n)\n\n# Use newlib nano because it is smaller\nset(CMAKE_EXE_LINKER_FLAGS_INIT \"--specs=nano.specs\")\n\nset(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)\nset(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER})\nset(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)\n\nset(CMAKE_OBJCOPY\n    ${TOOLCHAIN_PREFIX}objcopy\n    CACHE INTERNAL \"objcopy tool\"\n)\nset(CMAKE_OBJDUMP\n    ${TOOLCHAIN_PREFIX}objdump\n    CACHE INTERNAL \"objdump tool\"\n)\nset(CMAKE_SIZE_UTIL\n    ${TOOLCHAIN_PREFIX}size\n    CACHE INTERNAL \"size tool\"\n)\n\nset(CMAKE_FIND_ROOT_PATH ${BINUTILS_PATH})\nset(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\nset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\nset(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\n# ##################################################################################################\n# Platform specific configuration\n# ##################################################################################################\n\n# Root folder containing platform specific stuff like libraries\nset(platform_root \"/usr/local/stm32f411\")\nlist(APPEND CMAKE_FIND_ROOT_PATH \"${platform_root}\")\n# For some reason the toolchain file always runs twice, so REMOVE_DUPLICATES is used to get rid of\n# the 2. platform_root that gets appended\nlist(REMOVE_DUPLICATES CMAKE_FIND_ROOT_PATH)\n\nset(linker_script \"${platform_root}/src/rodos/src/bare-metal/stm32f4/scripts/stm32f411xe_flash.ld\")\nmessage(\"Linker script used: ${linker_script}\")\n\n# TODO: Find out why if(NOT DEFINED HSE_VALUE) does not work as expected and fails the second time\n# the toolchain file is run\nmessage(\"HSE value used: ${HSE_VALUE}\")\nadd_compile_definitions(HSE_VALUE=${HSE_VALUE} HSE_STARTUP_TIMEOUT=10000000)\nadd_compile_definitions(USE_STDPERIPH_DRIVER STM32F411xE)\n\nset(compile_and_link_options -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp)\n\nadd_compile_options(${compile_and_link_options})\nadd_compile_options(-gdwarf-2 -mthumb -g3)\n\nadd_link_options(${compile_and_link_options})\nadd_link_options(-Wl,-T${linker_script})\nadd_link_options(\n    -nostartfiles -Xlinker --gc-sections -fno-unwind-tables -fno-asynchronous-unwind-tables\n)\n```\n\nYou must at least change the `platform_root` variable to point to the directory in which you install all your cross-compiled libraries for the target platform (=STM32F411).\n\n### Presets\n\nThis project makes use of [CMake\npresets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) to simplify the process of\nconfiguring the project. As a developer, you should create a `CMakeUserPresets.json` file at the\nroot of the project that looks something like the following:\n\n```json\n{\n  \"version\": 3,\n  \"cmakeMinimumRequired\": {\n    \"major\": 3,\n    \"minor\": 22,\n    \"patch\": 0\n  },\n  \"configurePresets\": [\n    {\n      \"name\": \"dev-common\",\n      \"hidden\": true,\n      \"inherits\": [\"dev-mode\", \"cppcheck\", \"clang-tidy\", \"unix-common\"],\n      \"generator\": \"Ninja\",\n      \"cacheVariables\": {\n        \"CMAKE_BUILD_TYPE\": \"Debug\",\n        \"CMAKE_EXPORT_COMPILE_COMMANDS\": \"ON\",\n        \"BUILD_MCSS_DOCS\": \"ON\"\n      }\n    },\n    {\n      \"name\": \"dev-linux-x86\",\n      \"binaryDir\": \"${sourceDir}/build/linux-x86\",\n      \"inherits\": \"dev-common\",\n      \"toolchainFile\": \"/usr/local/src/rodos/cmake/port/linux-x86.cmake\"\n    },\n    {\n      \"name\": \"dev-nucleo\",\n      \"binaryDir\": \"${sourceDir}/build/nucleo\",\n      \"inherits\": \"dev-common\",\n      \"toolchainFile\": \"~/programming/cmake/stm32f411.cmake\",\n      \"cacheVariables\": {\n        \"RODOS_PACKAGE_NAME\": \"rodos_discovery_f411\",\n        \"HSE_VALUE\": \"8000000\",\n        \"BOARD_FILE\": \"Nucleo.hpp\"\n      }\n    },\n    {\n      \"name\": \"dev-cobc\",\n      \"binaryDir\": \"${sourceDir}/build/cobc\",\n      \"inherits\": \"dev-common\",\n      \"toolchainFile\": \"~/programming/cmake/stm32f411.cmake\",\n      \"cacheVariables\": {\n        \"HSE_VALUE\": \"12000000\",\n        \"BOARD_FILE\": \"Nucleo.hpp\"\n      }\n    },\n    {\n      \"name\": \"dev-coverage\",\n      \"inherits\": [\"dev-mode\", \"coverage-unix\"],\n      \"toolchainFile\": \"/usr/local/src/rodos/cmake/port/linux-x86.cmake\"\n    }\n  ],\n  \"buildPresets\": [\n    {\n      \"name\": \"dev-linux-x86\",\n      \"configurePreset\": \"dev-linux-x86\",\n      \"configuration\": \"Debug\",\n      \"jobs\": 4\n    },\n    {\n      \"name\": \"dev-nucleo\",\n      \"configurePreset\": \"dev-nucleo\",\n      \"configuration\": \"Debug\",\n      \"jobs\": 4\n    },\n    {\n      \"name\": \"dev-cobc\",\n      \"configurePreset\": \"dev-cobc\",\n      \"configuration\": \"Debug\",\n      \"jobs\": 4\n    }\n  ],\n  \"testPresets\": [\n    {\n      \"name\": \"dev-linux-x86\",\n      \"configurePreset\": \"dev-linux-x86\",\n      \"configuration\": \"Debug\",\n      \"output\": {\n        \"outputOnFailure\": true\n      },\n      \"execution\": {\n        \"jobs\": 4\n      }\n    }\n  ]\n}\n```\n\nThe path to the toolchain files depend on your setup. The number of jobs given in the build and test\npresets must be adapted by you as well and should ideally be set to the number of threads available\non your CPU.\n\nIn general, `CMakeUserPresets.json` is the perfect place in which you can put all sorts of things\nthat you would otherwise want to pass to the configure command in the terminal.\n\n### Configure, build and test on Linux\n\nIf you followed the above instructions, then you can configure, build and test the project on\nLinux respectively with the following commands from the project root:\n\n```sh\ncmake --preset=dev-linux-x86\ncmake --build --preset=dev-linux-x86\nctest --preset=dev-linux-x86\n```\n\nTo run the HelloWorld example execute\n\n```sh\n./build/linux-x86/HelloWorld\n```\n\n### Configure and build for as well as flash onto Nucleo-F411RE board\n\nIf you followed the above instructions, then you can configure and build the project for the\nNucleo-F411RE board respectively with the following commands from the project root:\n\n```sh\ncmake --preset=dev-nucleo\ncmake --build --preset=dev-nucleo\n```\n\nTo flash the example binary `HelloWorld.bin` onto the Nucleo board, copy it from\n`build/nucleo` to the the storage device the board registers as when connected to a PC.\n\n# Licensing\n\nSee the [LICENSE](LICENSE.md) document.\n\u003c!--\nPlease go to https://choosealicense.com/ and choose a license that fits your needs. GNU GPLv3 is a\npretty nice option ;-)\n--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspaceteam%2Frodosplayground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspaceteam%2Frodosplayground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspaceteam%2Frodosplayground/lists"}