{"id":17059178,"url":"https://github.com/flit/cortex_m_blocks","last_synced_at":"2025-03-23T07:25:26.682Z","repository":{"id":150949647,"uuid":"48927917","full_name":"flit/cortex_m_blocks","owner":"flit","description":"Blocks support for Cortex-M microcontrollers","archived":false,"fork":false,"pushed_at":"2016-02-22T22:51:46.000Z","size":566,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T14:16:20.629Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flit.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-02T23:51:47.000Z","updated_at":"2019-01-07T16:54:53.000Z","dependencies_parsed_at":"2023-05-06T18:27:45.566Z","dependency_job_id":null,"html_url":"https://github.com/flit/cortex_m_blocks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flit%2Fcortex_m_blocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flit%2Fcortex_m_blocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flit%2Fcortex_m_blocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flit%2Fcortex_m_blocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flit","download_url":"https://codeload.github.com/flit/cortex_m_blocks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245068727,"owners_count":20555812,"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-10-14T10:32:59.998Z","updated_at":"2025-03-23T07:25:26.644Z","avatar_url":"https://github.com/flit.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Blocks support for Cortex-M microcontrollers\n\n### Introduction\n\nThe Clang compiler has an extension called Blocks to support true closures for the C family of\nlanguages. The Clang compiler-rt library includes the sources for the required runtime support\nlibrary in the lib/BlocksRuntime directory. These files have been extracted and modified to simplify\nthe runtime and make it more suitable for small microcontrollers.\n\nThere's really nothing in particular that ties the runtime to Cortex-M devices, except the test code.\nIt should be usable on any microcontroller architecture supported by Clang.\n\n### Changes\n\nThe following changes have been made from the original compiler-rt BlocksRuntime, mostly in order to\nreduce code size.\n\n- Removed GC support.\n- Changed `_NSConcreteXBlock` globals to be a single byte each instead of 128 bytes each, saving 762 bytes of RAM.\n- Added `TARGET_BARE_METAL` macro to config.h. This is used in the runtime.c file.\n- Supplied a simple implementation of `OSAtomicCompareAndSwapInt()`.\n\nFurther optimizations are possible.\n\n\n### Test\n\nThe `test` directory contains a simple blocks test program. It builds for the NXP KL28T/Z device. There is a GNU ARM Eclipse project in the root of the repository.\n\n\n### Links\n\nBlocks documentation:\n- http://clang.llvm.org/docs/LanguageExtensions.html#blocks\n- http://clang.llvm.org/docs/BlockLanguageSpec.html\n- http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Blocks\n- http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Blocks/Blocks.pdf\n\nblocksruntime project on GitHub:\n- https://github.com/mackyle/blocksruntime\n\n\n### License\n\nBlocksRuntime is part of LLVM's compiler_rt project, which is dual licensed under both the University of Illinois\n\"BSD-Like\" license and the MIT license. See the blocksruntime/LICENSE.TXT file for the full license.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflit%2Fcortex_m_blocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflit%2Fcortex_m_blocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflit%2Fcortex_m_blocks/lists"}