chore: add embedded-systems agent skill#57
Open
mohamedx2 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an embedded-systems agent skill with firmware-focused guidance and reference material for microcontrollers, RTOS usage, communication protocols, memory optimization, and power management.
Changes:
- Adds the embedded-systems skill metadata and workflow instructions.
- Adds reference documentation for RTOS patterns, MCU programming, communication protocols, memory, and power.
- Adds a skills lock entry for the new skill source.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
skills-lock.json |
Registers the embedded-systems skill source and hash. |
.agents/skills/embedded-systems/SKILL.md |
Defines the skill metadata, workflow, constraints, and templates. |
.agents/skills/embedded-systems/references/rtos-patterns.md |
Adds FreeRTOS task, queue, semaphore, timer, and notification guidance. |
.agents/skills/embedded-systems/references/power-optimization.md |
Adds low-power mode, clock scaling, peripheral power, battery, and RTC guidance. |
.agents/skills/embedded-systems/references/microcontroller-programming.md |
Adds STM32 GPIO, timer, ADC, UART, clock, watchdog, and low-power examples. |
.agents/skills/embedded-systems/references/memory-optimization.md |
Adds code size, RAM, flash, stack, structure, and linker optimization guidance. |
.agents/skills/embedded-systems/references/communication-protocols.md |
Adds I2C, SPI, UART, and CAN implementation examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| PWR->CR |= PWR_CR_CWUF; | ||
|
|
||
| // Set SLEEPDEEP bit | ||
| SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk; |
| // Enter stop mode with regulator in low-power mode | ||
| PWR->CR |= PWR_CR_LPDS; | ||
| PWR->CR &= ~PWR_CR_PDDS; | ||
| SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk; |
| NVIC_EnableIRQ(CAN1_RX0_IRQn); | ||
| } | ||
|
|
||
| bool CAN_Transmit(uint32_t id, uint8_t *data, uint8_t len) { |
Comment on lines
+313
to
+315
| // BRP=6, TS1=13, TS2=2 -> 42MHz/(6*(1+13+2)) = 437.5kbps | ||
| CAN1->BTR = (1 << CAN_BTR_SJW_Pos) | // SJW = 2 | ||
| (13 << CAN_BTR_TS1_Pos) | // TS1 = 14 |
Comment on lines
+87
to
+89
| // Clear ADDR flag | ||
| (void)I2C1->SR1; | ||
| (void)I2C1->SR2; |
Comment on lines
+161
to
+166
|
|
||
| HAL_FLASH_Unlock(); | ||
| HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD, addr, *(uint32_t*)&new_record); | ||
| HAL_FLASH_Lock(); | ||
|
|
||
| return true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the
embedded-systemsagent skill to the project, providing instructions and reference documentation to assist with hardware and embedded systems level development.Included context covers microcontrollers, RTOS patterns, communication protocols, memory, and power optimizations.