Skip to content

67 add embedded tests#68

Merged
punkto merged 4 commits intomainfrom
67-add-embedded-tests
May 14, 2025
Merged

67 add embedded tests#68
punkto merged 4 commits intomainfrom
67-add-embedded-tests

Conversation

@punkto
Copy link
Collaborator

@punkto punkto commented May 7, 2025

No description provided.

@punkto punkto requested a review from Copilot May 7, 2025 19:00
@punkto punkto linked an issue May 7, 2025 that may be closed by this pull request
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the firmware build and logging infrastructure for the embedded apps by replacing panic-halt with panic-probe, integrating defmt logging, and updating configuration files to use probe‑rs and flip‑link. It also removes obsolete OpenOCD and flashing scripts while updating Cargo profiles and documentation accordingly.

  • Replace panic-halt with panic-probe and add defmt logging calls in the logging functions.
  • Update Cargo.toml dependencies, build profiles, and .cargo config to use probe‑rs and flip‑link.
  • Remove obsolete OpenOCD and flash scripts and update README instructions.

Reviewed Changes

Copilot reviewed 52 out of 52 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
apps/line_follower/src/main.rs Updated panic handling and logging in log_event by adding defmt logging calls.
apps/line_follower/openocd_just_flash_and_run.gdb Removed obsolete OpenOCD script.
apps/line_follower/openocd_debug.gdb Removed obsolete debug configuration file.
apps/line_follower/openocd.cfg Removed OpenOCD configuration file.
apps/line_follower/flash_semihosting.sh Removed obsolete flashing script using OpenOCD with semihosting.
apps/line_follower/flash.sh Removed obsolete flashing script.
apps/line_follower/Cargo.toml Added defmt, defmt-rtt, and panic-probe dependencies.
apps/line_follower/.cargo/config.toml Updated runner configuration to use probe‑rs and flip‑link linker settings.
apps/hello_world/src/main.rs Added defmt println for debugging received bytes.
apps/hello_world/openocd_just_flash_and_run.gdb Removed obsolete OpenOCD script.
apps/hello_world/openocd_debug.gdb Removed obsolete debug configuration file.
apps/hello_world/openocd.cfg Removed obsolete OpenOCD configuration file.
apps/hello_world/flash_semihosting.sh Removed obsolete flashing script using OpenOCD with semihosting.
apps/hello_world/flash.sh Removed obsolete flashing script.
apps/hello_world/README.md Updated run instructions and documentation to reference the new tooling.
apps/hello_world/Cargo.toml Removed panic-halt dependency.
apps/hello_world/.cargo/config.toml Updated runner configuration to use probe‑rs and flip‑link linker settings.
Cargo.toml Updated global release and dev profiles with package-specific settings for BSC.
.github/workflows/rust.yml Updated test command to use cargo xtask test_native.

FSMEvent::Button1Pressed => logger.log(" - Button 1 pressed -\r\n"),
FSMEvent::Button2Pressed => logger.log(" - Button 2 pressed -\r\n"),
FSMEvent::BatteryIsLow => logger.log(" - Battery is low -\r\n"),
FSMEvent::NothingHappend => {
Copy link

Copilot AI May 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enum variant 'NothingHappend' appears to be misspelled. Consider renaming it to 'NothingHappened' for clarity and consistency.

Suggested change
FSMEvent::NothingHappend => {
FSMEvent::NothingHappened => {

Copilot uses AI. Check for mistakes.
@punkto punkto requested a review from Copilot May 14, 2025 16:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request updates the project configuration and code to support embedded tests while modernizing the build and debug setups. Key changes include:

  • Correcting a spelling error in the FSM event enum.
  • Removing legacy OpenOCD and flash scripts in favor of new probe‑rs based configurations.
  • Updating Cargo profiles and dependency settings along with revised README instructions.

Reviewed Changes

Copilot reviewed 56 out of 56 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
apps/line_follower/src/fsm.rs Fixed spelling of FSM event from “NothingHappend” to “NothingHappened”.
apps/line_follower/openocd_just_flash_and_run.gdb Removed legacy GDB configuration for flashing.
apps/line_follower/openocd_debug.gdb Removed legacy debugging GDB configuration.
apps/line_follower/openocd.cfg Removed obsolete OpenOCD configuration file.
apps/line_follower/flash_semihosting.sh Removed legacy flashing script.
apps/line_follower/flash.sh Removed legacy flashing script.
apps/line_follower/Cargo.toml Updated dependencies by removing panic‑halt and adding defmt libraries.
apps/line_follower/.cargo/config.toml Switched runner configuration to use probe‑rs.
apps/hello_world/src/main.rs Removed panic‑halt dependency and added defmt logging for received data.
apps/hello_world/openocd_just_flash_and_run.gdb Removed legacy GDB configuration for flashing.
apps/hello_world/openocd_debug.gdb Removed legacy debugging GDB configuration.
apps/hello_world/openocd.cfg Removed obsolete OpenOCD configuration file.
apps/hello_world/flash_semihosting.sh Removed legacy flashing script.
apps/hello_world/flash.sh Removed legacy flashing script.
apps/hello_world/README.md Updated application run instructions and logging options.
apps/hello_world/Cargo.toml Updated dependencies by removing panic‑halt.
apps/hello_world/.cargo/config.toml Switched runner configuration to use probe‑rs.
README.md Updated global documentation with dependency and build instructions.
Cargo.toml Added and updated Cargo profiles for the mightybuga_bsc package.
.github/workflows/rust.yml Changed test command to use “cargo xtask test_native”.

@punkto punkto merged commit 2546757 into main May 14, 2025
1 check passed
@punkto punkto deleted the 67-add-embedded-tests branch May 14, 2025 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add embedded tests

2 participants