diff --git a/.github/workflows/0.0.2.yml b/.github/workflows/0.0.2.yml new file mode 100644 index 0000000..70750ff --- /dev/null +++ b/.github/workflows/0.0.2.yml @@ -0,0 +1,11 @@ +name: 🚀 Release 0.0.2 + +on: + workflow_dispatch: + +jobs: + deploy: + uses: ./.github/workflows/deploy-version.yml + with: + version: 0.0.2 + secrets: inherit diff --git a/conanfile.py b/conanfile.py index 408eb42..c3d28d3 100644 --- a/conanfile.py +++ b/conanfile.py @@ -27,12 +27,10 @@ class libhal_stm32f4_conan(ConanFile): homepage = "https://libhal.github.io/libhal-stm32f4" description = ("A collection of drivers and libraries for the stm32f4 " "series microcontrollers.") - topics = ("arm", "microcontroller", "stm32f4",) + topics = ("arm", "microcontroller", "stm32f4") settings = "compiler", "build_type", "os", "arch" - exports_sources = ("include/*", "linker_scripts/*", "tests/*", "LICENSE", - "CMakeLists.txt", "src/*") - - python_requires = "libhal-bootstrap/[^0.0.4]" + + python_requires = "libhal-bootstrap/[^1.0.0]" python_requires_extend = "libhal-bootstrap.library" options = { @@ -50,18 +48,14 @@ def package_id(self): def _use_linker_script(self): return (self.options.platform == "stm32f411re") - @property - def _bare_metal(self): - return self.settings.os == "baremetal" - def requirements(self): - self.requires("libhal-armcortex/[^3.0.0]") + self.requires("libhal-armcortex/[^3.0.2]", transitive_headers=True) def package_info(self): self.cpp_info.libs = ["libhal-stm32f4"] self.cpp_info.set_property("cmake_target_name", "libhal::stm32f4") - if self._bare_metal and self._use_linker_script: + if self.settings.os == "baremetal" and self._use_linker_script: linker_path = os.path.join(self.package_folder, "linker_scripts") link_script = "-Tlibhal-stm32f4/" + \ str(self.options.platform) + ".ld" diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt index 7b45b06..5699cf0 100644 --- a/demos/CMakeLists.txt +++ b/demos/CMakeLists.txt @@ -23,9 +23,7 @@ libhal_build_demos( PACKAGES libhal-stm32f4 - libhal-exceptions - + LINK_LIBRARIES libhal::stm32f4 - libhal::exceptions ) diff --git a/demos/applications/blinker.cpp b/demos/applications/blinker.cpp index b25b602..0d02253 100644 --- a/demos/applications/blinker.cpp +++ b/demos/applications/blinker.cpp @@ -17,12 +17,18 @@ #include #include -void delay_by_cycles(int cycles); +void delay_by_cycles(int p_cycles) +{ + volatile int i = 0; + while (i < p_cycles) { + i = i + 1; + } +} + void application() { - using namespace hal::literals; hal::stm32f4::output_pin led(hal::stm32f4::peripheral::gpio_a, 5); - led.level(true); + while (true) { led.level(false); delay_by_cycles(1000000); @@ -30,11 +36,3 @@ void application() delay_by_cycles(1000000); } } - -void delay_by_cycles(int cycles) -{ - volatile int i = 0; - while (i < cycles) { - i = i + 1; - } -} \ No newline at end of file diff --git a/demos/conanfile.py b/demos/conanfile.py index acf6c80..84963b3 100644 --- a/demos/conanfile.py +++ b/demos/conanfile.py @@ -19,14 +19,11 @@ class demos(ConanFile): settings = "compiler", "build_type", "os", "arch", "libc" - options = {"platform": ["ANY"]} - default_options = {"platform": "unspecified"} - python_requires = "libhal-bootstrap/[^0.0.4]" + python_requires = "libhal-bootstrap/[^1.0.0]" python_requires_extend = "libhal-bootstrap.demo" def requirements(self): bootstrap = self.python_requires["libhal-bootstrap"] bootstrap.module.add_demo_requirements(self, is_platform=True) - self.requires("libhal-exceptions/[^0.0.1]") self.requires("libhal-stm32f4/[>=0.0.1]") diff --git a/demos/main.cpp b/demos/main.cpp index d6f6dd1..4663907 100644 --- a/demos/main.cpp +++ b/demos/main.cpp @@ -12,13 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include -#include // Application function must be implemented by one of the compilation units // (.cpp) files. extern void application(); + int main() { try { @@ -28,13 +27,3 @@ int main() } return 0; } - -extern "C" -{ - struct _reent* _impure_ptr = nullptr; // NOLINT - - void _exit([[maybe_unused]] int rc) // NOLINT - { - std::terminate(); - } -} \ No newline at end of file diff --git a/test_package/conanfile.py b/test_package/conanfile.py index 78e3120..ba02a89 100644 --- a/test_package/conanfile.py +++ b/test_package/conanfile.py @@ -17,8 +17,8 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - - python_requires = "libhal-bootstrap/[^0.0.4]" + + python_requires = "libhal-bootstrap/[^1.0.0]" python_requires_extend = "libhal-bootstrap.library_test_package" def requirements(self):