[package] name = "hopter" version = "0.2.5" edition = "2021" license = "MIT" description = "A Rust-based embedded operating system designed to enable memory safe, memory efficient, reliable, and responsive applications." repository = "https://github.com/hopter-project/hopter" readme = "README.md" categories = ["embedded", "no-std"] [features] default = ["unwind"] # Enable unwinding to clean up panicked tasks. unwind = ["dep:gimli", "dep:fallible-iterator"] # Print the program counter (PC) of each function in the unwound stack. unwind_print_trace = ["unwind"] # Verbose stack unwinder execution log message. unwind_debug = ["unwind"] # Supported boards in STM32F4 family. stm32f401 = ["hopter_proc_macro/stm32f401", "stm32f4xx-hal/stm32f401"] stm32f405 = ["hopter_proc_macro/stm32f405", "stm32f4xx-hal/stm32f405"] stm32f407 = ["hopter_proc_macro/stm32f407", "stm32f4xx-hal/stm32f407"] stm32f410 = ["hopter_proc_macro/stm32f410", "stm32f4xx-hal/stm32f410"] stm32f411 = ["hopter_proc_macro/stm32f411", "stm32f4xx-hal/stm32f411"] stm32f412 = ["hopter_proc_macro/stm32f412", "stm32f4xx-hal/stm32f412"] stm32f413 = ["hopter_proc_macro/stm32f413", "stm32f4xx-hal/stm32f413"] stm32f427 = ["hopter_proc_macro/stm32f427", "stm32f4xx-hal/stm32f427"] stm32f429 = ["hopter_proc_macro/stm32f429", "stm32f4xx-hal/stm32f429"] stm32f446 = ["hopter_proc_macro/stm32f446", "stm32f4xx-hal/stm32f446"] stm32f469 = ["hopter_proc_macro/stm32f469", "stm32f4xx-hal/stm32f469"] # Used for testing with GitHub workflow and locally with QEMU. qemu = ["stm32f405"] [dependencies] static_assertions = "1.1" heapless = "0.8" spin = "0.9" int-enum = "1.1" cortex-m-semihosting = "0.5" concat-idents = "1.0" paste = "1.0" [dependencies.stable_deref_trait] version = "1.2.0" default-features = false features = ["alloc"] [dependencies.hopter_proc_macro] version = "0.2.2" [dependencies.hopter_conf_params] version = "0.2.0" [dependencies.cortex-m] version = "0.7" features = ["inline-asm"] [dependencies.crossbeam] version = "0.8" default-features = false [dependencies.gimli] version = "0.29" default-features = false features = ["read"] optional = true [dependencies.fallible-iterator] version = "0.3" default-features = false optional = true [dependencies.intrusive-collections] version = "0.9" features = ["nightly"] [dev-dependencies] nb = "1.1" [dev-dependencies.stm32f4xx-hal] version = "0.21.0" default-features = false [package.metadata.docs.rs] targets = ["thumbv7em-none-eabihf"] # *** Tests for sync - mailbox *** [[example]] name = "test-sync-mailbox-notify_by_task" path = "examples/tests/sync/mailbox/notify_by_task.rs" [[example]] name = "test-sync-mailbox-notify_in_advance" path = "examples/tests/sync/mailbox/notify_in_advance.rs" [[example]] name = "test-sync-mailbox-task_timeout" path = "examples/tests/sync/mailbox/task_timeout.rs" [[example]] name = "test-sync-mailbox-task_not_timeout" path = "examples/tests/sync/mailbox/task_not_timeout.rs" [[example]] name = "test-sync-mailbox-notify_in_advance_after_timeout" path = "examples/tests/sync/mailbox/notify_in_advance_after_timeout.rs" [[example]] name = "test-sync-mailbox-notify_from_isr" path = "examples/tests/sync/mailbox/notify_from_isr.rs" # *** Tests for sync - semaphore *** [[example]] name = "test-sync-semaphore-down_0_then_try_down" path = "examples/tests/sync/semaphore/down_0_then_try_down.rs" [[example]] name = "test-sync-semaphore-up_max_then_try_up" path = "examples/tests/sync/semaphore/up_max_then_try_up.rs" [[example]] name = "test-sync-semaphore-init_0_blocking_down" path = "examples/tests/sync/semaphore/init_0_blocking_down.rs" [[example]] name = "test-sync-semaphore-4_tasks_down_contend_init_3" path = "examples/tests/sync/semaphore/4_tasks_down_contend_init_3.rs" [[example]] name = "test-sync-semaphore-try_up_ok_then_err" path = "examples/tests/sync/semaphore/try_up_ok_then_err.rs" [[example]] name = "test-sync-semaphore-try_down_ok_then_err" path = "examples/tests/sync/semaphore/try_down_ok_then_err.rs" [[example]] name = "test-sync-semaphore-2_tasks_5_down_5_up" path = "examples/tests/sync/semaphore/2_tasks_5_down_5_up.rs" [[example]] name = "test-sync-semaphore-10_tasks_100_up_down" path = "examples/tests/sync/semaphore/10_tasks_100_up_down.rs" [[example]] name = "test-sync-semaphore-initialization" path = "examples/tests/sync/semaphore/initialization.rs" [[example]] name = "test-sync-semaphore-down_priority_scheduling" path = "examples/tests/sync/semaphore/down_priority_scheduling.rs" [[example]] name = "test-sync-semaphore-up_priority_scheduling" path = "examples/tests/sync/semaphore/up_priority_scheduling.rs" [[example]] name = "test-sync-semaphore-try_up_from_isr" path = "examples/tests/sync/semaphore/try_up_from_isr.rs" [[example]] name = "test-sync-semaphore-try_down_from_isr" path = "examples/tests/sync/semaphore/try_down_from_isr.rs" # *** Tests for sync - mutex *** [[example]] name = "test-sync-mutex-basic" path = "examples/tests/sync/mutex/basic.rs" [[example]] name = "test-sync-mutex-stress" path = "examples/tests/sync/mutex/stress.rs" [[example]] name = "test-sync-mutex-priority" path = "examples/tests/sync/mutex/priority.rs" [[example]] name = "test-sync-mutex-poison" path = "examples/tests/sync/mutex/poison.rs" [[example]] name = "test-sync-mutex-priority_inversion" path = "examples/tests/sync/mutex/priority_inversion.rs" # *** Tests for sync - channel *** [[example]] name = "test-sync-channel-try_produce_from_task" path = "examples/tests/sync/channel/try_produce_from_task.rs" [[example]] name = "test-sync-channel-try_consume_from_task" path = "examples/tests/sync/channel/try_consume_from_task.rs" [[example]] name = "test-sync-channel-multiple_producers" path = "examples/tests/sync/channel/multiple_producers.rs" [[example]] name = "test-sync-channel-concurrency_and_stress" path = "examples/tests/sync/channel/concurrency_and_stress.rs" [[example]] name = "test-sync-channel-multiple_consumers" path = "examples/tests/sync/channel/multiple_consumers.rs" [[example]] name = "test-sync-channel-produce_consume_single_task" path = "examples/tests/sync/channel/produce_consume_single_task.rs" [[example]] name = "test-sync-channel-try_consume_from_isr" path = "examples/tests/sync/channel/try_consume_from_isr.rs" [[example]] name = "test-sync-channel-try_produce_from_isr" path = "examples/tests/sync/channel/try_produce_from_isr.rs" # *** Tests for task - priority *** [[example]] name = "test-task-priority-reduce_priority" path = "examples/tests/task/priority/reduce_priority.rs" [[example]] name = "test-task-priority-unwind_priority" path = "examples/tests/task/priority/unwind_priority.rs" # *** Tests for task - unwind *** [[example]] name = "test-task-unwind-diverted" path = "examples/tests/task/unwind/diverted.rs" [[example]] name = "test-task-unwind-deferred_direct_drop" path = "examples/tests/task/unwind/deferred_direct_drop.rs" [[example]] name = "test-task-unwind-deferred_indirect_drop" path = "examples/tests/task/unwind/deferred_indirect_drop.rs" [[example]] name = "test-task-unwind-deferred_nested_drop" path = "examples/tests/task/unwind/deferred_nested_drop.rs" [[example]] name = "test-task-unwind-concurrent_restart" path = "examples/tests/task/unwind/concurrent_restart.rs" [[example]] name = "test-task-unwind-failed_concurrent_restart" path = "examples/tests/task/unwind/failed_concurrent_restart.rs" [[example]] name = "test-task-unwind-block_while_sched_suspend" path = "examples/tests/task/unwind/block_while_sched_suspend.rs" # *** Tests for task - segmented stack *** [[example]] name = "test-task-segmented_stack-function_arguments" path = "examples/tests/task/segmented_stack/function_arguments.rs" [[example]] name = "test-task-segmented_stack-return_values" path = "examples/tests/task/segmented_stack/return_values.rs" # *** Tests for task - context switch *** [[example]] name = "test-task-context_switch-gp_registers" path = "examples/tests/task/context_switch/gp_registers.rs" [[example]] name = "test-task-context_switch-fp_registers" path = "examples/tests/task/context_switch/fp_registers.rs" # *** Tests for interrupt - unwind *** [[example]] name = "test-interrupt-unwind-simple" path = "examples/tests/interrupt/unwind/simple.rs" [[example]] name = "test-interrupt-unwind-panic_upon_blocking" path = "examples/tests/interrupt/unwind/panic_upon_blocking.rs" # *** Tests for debug - cpu load *** [[example]] name = "test-debug-cpu_load-load_40_percent" path = "examples/tests/debug/cpu_load/load_40_percent.rs"