Skip to content

chore: add embedded-systems agent skill#57

Open
mohamedx2 wants to merge 1 commit into
adam-maj:masterfrom
mohamedx2:add-agent-skills
Open

chore: add embedded-systems agent skill#57
mohamedx2 wants to merge 1 commit into
adam-maj:masterfrom
mohamedx2:add-agent-skills

Conversation

@mohamedx2
Copy link
Copy Markdown

This PR adds the embedded-systems agent 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.

Copilot AI review requested due to automatic review settings May 15, 2026 16:48
Copy link
Copy Markdown

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 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;
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.

2 participants