-
Notifications
You must be signed in to change notification settings - Fork 23
Fix: Change files for the prototype #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideThis PR reconfigures the build and hardware abstraction for the prototype by switching the target MCU variant to STM32H563RITx (updating linker scripts and CMake settings), simplifying the LED subsystem to a single user LED on PB12, and adjusting the blink logic in application code. Class diagram for updated LED subsystemclassDiagram
class LED_LL_ID {
<<enum>>
LED_LL_GREEN = 0
LED_LL_COUNT
}
class LEDConfig {
GPIO_TypeDef *gpio_group
uint16_t gpio_pin
}
class LED_LL {
+void LED_LL_init()
+void LED_LL_on(LED_LL_ID led_id)
+void LED_LL_off(LED_LL_ID led_id)
+void LED_LL_toggle(LED_LL_ID led_id)
}
LED_LL_ID <.. LED_LL
LEDConfig <.. LED_LL
class LED_ID {
<<enum>>
LED_GREEN
LED_COUNT
}
class LED {
+void LED_init()
+void LED_on(LED_ID led_id)
+void LED_off(LED_ID led_id)
+void LED_toggle(LED_ID led_id)
}
LED_ID <.. LED
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- Now that only one LED is supported, consider refactoring led_ll.c, led_ll.h, and related abstractions to remove the array indirection and unused enum entries to simplify the API.
- The linker script changes are duplicated under both boot/ and src/platform; consolidating them into a shared template or including a single source file could reduce duplication and maintenance overhead.
- The blink_period magic number in application/main.c could be extracted into a named constant or configuration macro to improve readability and make future tuning easier.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Now that only one LED is supported, consider refactoring led_ll.c, led_ll.h, and related abstractions to remove the array indirection and unused enum entries to simplify the API.
- The linker script changes are duplicated under both boot/ and src/platform; consolidating them into a shared template or including a single source file could reduce duplication and maintenance overhead.
- The blink_period magic number in application/main.c could be extracted into a named constant or configuration macro to improve readability and make future tuning easier.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This PR changes the files to work on the prototype.
I have changed the FLASH.ld file from STM32ZIT6 to STM32RIT6, both in the bootloader and firmware.
Also changed this in the cmake files.
I have also changed the user LED pin from
PB0 -> PB12, as used on the prototype board.
Summary by Sourcery
Configure project for prototype board by switching target MCU variant and updating LED pin assignment
Enhancements:
Summary by Sourcery
Configure project for the prototype board by switching the MCU variant, updating linker scripts and build settings, consolidating to a single green LED on PB12, and adjusting blink behavior
Enhancements:
Build: