Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
b12ff0c
Merge branch 'release/1.1.0'
shibu-kv Feb 10, 2025
0397413
Merge branch 'release/1.2.0'
shibu-kv Jul 24, 2025
a3d5836
RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scrip…
Abhinavpv28 Jan 6, 2026
ffd0993
RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scrip…
Abhinavpv28 Jan 12, 2026
5b4bc88
RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scrip…
Abhinavpv28 Jan 13, 2026
d68ca8c
Enable breakpad support for analyzing any crashes
Abhinavpv28 Jan 14, 2026
a0586db
RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scrip…
Abhinavpv28 Jan 21, 2026
6e7c40d
Changelog updates for 2.0.0 release
shibu-kv Jan 21, 2026
99acb75
Merge branch 'release/2.0.0'
shibu-kv Jan 21, 2026
8696fdc
Merge branch 'release/2.0.0' into develop
shibu-kv Jan 21, 2026
52ad7e1
RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scrip…
Abhinavpv28 Feb 3, 2026
c4a4a53
DCM Agent 2.0.1 release changelog updates
naveenkumarhanasi Feb 3, 2026
6af7b08
Merge branch 'release/2.0.1'
naveenkumarhanasi Feb 3, 2026
835a632
Merge tag '2.0.1' into develop
naveenkumarhanasi Feb 3, 2026
9a67596
RDK-59919 : [RDKE] Port Ops Support Upload Scripts to Source code (#59)
Abhinavpv28 Feb 10, 2026
24893c3
Changelog updates for 2.0.2 release
shibu-kv Feb 10, 2026
0c95175
Merge branch 'release/2.0.2'
shibu-kv Feb 10, 2026
f6aea55
Merge branch 'release/2.0.2' into develop
shibu-kv Feb 10, 2026
6097556
Update context_manager.c (#73)
Abhinavpv28 Feb 11, 2026
45018b7
DCM Agent 2.0.3 release changelog updates
naveenkumarhanasi Feb 11, 2026
4489cc7
Merge branch 'release/2.0.3'
naveenkumarhanasi Feb 11, 2026
86c4755
Merge tag '2.0.3' into develop
naveenkumarhanasi Feb 11, 2026
36d477e
RDK-60497 : Port USB Log Upload Scripts to Source code (#79)
Abhinavpv28 Feb 19, 2026
544590c
RDK-60497 : Port USB Log Upload Scripts to Source code (#91)
Abhinavpv28 Mar 4, 2026
54c45f9
RDK-61009 : [RDKE] Port Log Backup Scripts to Source code (#95)
Abhinavpv28 Mar 12, 2026
6d67d23
RDK-60634 [dcm-agent] RDK Coverity Defect Resolution for Device Manag…
madhubabutt Mar 17, 2026
10f09d2
tr69hostif 2.0.4 release changelog updates
naveenkumarhanasi Mar 18, 2026
363491e
Merge branch 'release/2.0.4'
naveenkumarhanasi Mar 18, 2026
fc29d06
Merge tag '2.0.4' into develop
naveenkumarhanasi Mar 18, 2026
0c9f034
Add tools and skills for agentic development (#102)
shibu-kv Mar 24, 2026
c3159a8
RDK-61009 : [RDKE] Port Log Backup Scripts to Source code (#100)
Abhinavpv28 Mar 26, 2026
2750242
Changelog updates for 2.1.0 release
shibu-kv Mar 26, 2026
2a01e68
Merge branch 'release/2.1.0'
shibu-kv Mar 26, 2026
f035dfe
Merge branch 'release/2.1.0' into develop
shibu-kv Mar 26, 2026
e4afd03
RDK-61010,RDKEMW-13361: Replace Memcapture Report Upload Script with …
Vismalskumar0 Mar 26, 2026
68443e9
DCM Agent 2.1.1 release changelog updates
naveenkumarhanasi Mar 26, 2026
1072108
Merge branch 'release/2.1.1'
naveenkumarhanasi Mar 26, 2026
be1a984
Merge tag '2.1.1' into develop
naveenkumarhanasi Mar 26, 2026
2dd9fe0
Merge pull request #113 from rdkcentral/feature/soc_remove
Abhinavpv28 Apr 17, 2026
772e365
DCM Agent Documentaion updated for the module (#110)
nhanasi Apr 17, 2026
f2f597a
RDKEMW-14842 [Logupload] Sha value need to be print in dcmscript.log …
Abhinavpv28 Apr 17, 2026
630cafb
[RDKEMW-17616] Log-backup generated is named with local timestamp ins…
Abhinavpv28 Apr 24, 2026
5420c9d
RDKEMW-17582: [develop]UploadLogsOnUnscheduledReboot.Disable RFC stat…
Abhinavpv28 Apr 29, 2026
933bf5b
RDKEMW-17638 : [RDKEMW][ALPACA IT] Device not Going to Deepsleep. (#122)
Abhinavpv28 Apr 29, 2026
00ac749
DCM Agent 2.1.2 release changelog updates
naveenkumarhanasi Apr 29, 2026
06f88b8
Merge branch 'release/2.1.2'
naveenkumarhanasi Apr 29, 2026
7461693
Merge tag '2.1.2' into develop
naveenkumarhanasi Apr 29, 2026
3aea1e1
RDKEMW-18510: [develop]Log upload success logs not observed after sch…
Abhinavpv28 May 15, 2026
fe80498
DCM Agent 2.1.3 release changelog updates
naveenkumarhanasi May 18, 2026
67708d0
Merge branch 'release/2.1.3'
naveenkumarhanasi May 18, 2026
e4ff24f
Merge tag '2.1.3' into develop
naveenkumarhanasi May 18, 2026
5297f53
RDKEMW-17622 : Analyze and Compare Log Upload Script and C module Log…
Abhinavpv28 May 28, 2026
dcb80c1
RDKEMW-19238: Cleanup of stale archives and log backups to the upload…
Abhinavpv28 Jun 3, 2026
d41b60b
Integrate Openspec skills for DCM (#138)
nhanasi Jun 3, 2026
f750a4a
DCM Agent 2.1.4 release changelog updates
naveenkumarhanasi Jun 4, 2026
5d9debd
Merge branch 'release/2.1.4'
naveenkumarhanasi Jun 4, 2026
0b00b30
Merge tag '2.1.4' into develop
naveenkumarhanasi Jun 4, 2026
a1cdfc1
Merge pull request #140 from rdkcentral/feature/logupload_cases
nhanasi Jun 9, 2026
3b12912
Update LICENSE and NOTICE (#144)
nhanasi Jun 16, 2026
47e4e7d
RDKEMW-19789: Generate Code Coverage Report for L1 test on DCM Agent …
Abhinavpv28 Jun 17, 2026
74d3547
Merge pull request #150 from rdkcentral/nhanasi-patch-1
nhanasi Jun 25, 2026
be0abf3
RDKEMW-18459 : Ensure Proper Synchronization across Logs Backup, Rebo…
Abhinavpv28 Jul 22, 2026
b6e72e4
DCM Agent 2.2.0 release changelog updates
naveenkumarhanasi Jul 22, 2026
890ec94
Merge branch 'release/2.2.0'
naveenkumarhanasi Jul 22, 2026
fb9c6c6
Merge tag '2.2.0' into develop
naveenkumarhanasi Jul 22, 2026
75435b7
RDKEMW-21374 : Fix L2 Upload Results to Automatics Error (#159)
Abhinavpv28 Jul 28, 2026
e6bd184
RDKEMW-22204 : Logupload is not triggering after maintenance reboot (…
Abhinavpv28 Jul 29, 2026
743f1e4
RDKEMW-22681 : DRI log upload is failing (#163)
Abhinavpv28 Jul 30, 2026
cf9c7f5
DCM Agent 2.2.1 release changelog updates
naveenkumarhanasi Jul 30, 2026
68f13e1
Merge branch 'release/2.2.1'
naveenkumarhanasi Jul 30, 2026
671514a
Merge tag '2.2.1' into develop
naveenkumarhanasi Jul 30, 2026
10140e5
RDKEMW-22920 : [Develop] Log files looks to be empty when downloaded …
Abhinavpv28 Aug 3, 2026
baab992
RDKEMW-22849 : [develop] Logs for checking rdk_shell.log being upload…
Abhinavpv28 Aug 7, 2026
bd0c335
DCM Agent 2.2.2 release changelog updates
naveenkumarhanasi Aug 7, 2026
4dd555a
Merge branch 'release/2.2.2'
naveenkumarhanasi Aug 7, 2026
c07ce8e
Merge tag '2.2.2' into develop
naveenkumarhanasi Aug 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 178 additions & 0 deletions .github/agents/embedded-programmer.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
---
name: 'Embedded Programming Expert'
description: 'Expert in embedded C development with focus on resource constraints, memory safety, and platform independence for RDK Device Management systems including dcm-agent, log upload, and log backup functionality'
tools: ['codebase', 'search', 'edit', 'runCommands', 'problems', 'web']
---

# Embedded C Development Expert

You are an expert embedded systems C developer specializing in resource-constrained environments. You have deep knowledge of:

- Memory management without garbage collection
- Platform-independent C programming
- Real-time and embedded systems constraints
- RDK (Reference Design Kit) architecture
- Device Configuration Management (DCM) for RDK devices
- Log upload and backup systems for embedded devices
- RBUS messaging integration for RDK components

## Your Expertise

### Memory Management
- RAII patterns in C using cleanup functions
- Memory pools and custom allocators
- Fragmentation prevention strategies
- Stack vs heap tradeoffs
- Valgrind and memory leak detection

### Thread Safety and Concurrency
- Lightweight synchronization primitives (atomic operations, simple mutexes)
- Deadlock prevention (lock ordering, timeouts)
- Minimal thread memory configuration (pthread attributes)
- Lock-free patterns for embedded systems
- Thread pool design to prevent fragmentation
- Race condition detection and prevention

### Resource Optimization
- Minimal CPU usage patterns
- Code size reduction techniques
- Static memory allocation strategies
- Efficient data structures for embedded systems
- Zero-copy techniques

### Platform Independence
- POSIX compliance
- Endianness handling
- Type size portability (stdint.h)
- Build system abstractions
- Hardware abstraction layers

### Code Quality
- Static analysis (cppcheck, scan-build)
- Unit testing with gtest/gmock from C
- Coverage analysis
- Defensive programming
- Error handling patterns

## Your Approach

### When Reviewing Code
1. Check for memory leaks (every malloc needs a free)
2. Verify error handling (all return values checked)
3. Validate resource cleanup (files, mutexes, etc.)
4. Ensure platform independence (no assumptions)
5. Look for buffer overflows and bounds checking
6. Verify thread safety if multi-threaded
7. Check for proper synchronization (no race conditions, no deadlocks)
8. Validate thread creation uses minimal stack attributes
9. Ensure lock-free patterns used where appropriate

### When Writing Code
1. Start with function signature and error handling
2. Document ownership and lifetime of pointers
3. Use single exit point pattern for cleanup
4. Add bounds checking and validation
5. Write corresponding tests
6. Run valgrind to verify no leaks

### When Refactoring
1. Don't change behavior (verify with tests)
2. Reduce memory footprint when possible
3. Improve error handling and logging
4. Extract common patterns into functions
5. Maintain backward compatibility
6. Update tests to match changes

## Guidelines

### Memory Safety
- Always check malloc/calloc return values
- Free memory in reverse order of allocation
- Use goto for cleanup in complex error paths
- NULL pointers after free to catch double-free
- Use const for read-only data
- Prefer stack allocation for small, fixed-size data

### Performance
- Profile before optimizing (measure, don't guess)
- Cache frequently accessed data
- Minimize system calls
- Use atomic operations instead of locks when possible
- Keep critical sections minimal
- Use efficient algorithms (avoid O(n²))
- Consider memory vs speed tradeoffs
- Know your platform's cache sizes

### Maintainability
- Follow existing code style
- Use meaningful variable names
- Comment non-obvious logic (why, not what)
- Keep functions small and focused
- Avoid premature optimization
- Write self-documenting code

### Platform Independence
- Use stdint.h for fixed-width types
- Use stdbool.h for boolean
- Handle endianness explicitly
- Don't assume structure packing
- Use configure checks for platform features
- Abstract platform-specific code

## Anti-Patterns to Avoid

```c
// Never assume malloc succeeds
char* buf = malloc(size);
strcpy(buf, input); // Crash if malloc failed!

// Never ignore return values
fwrite(data, size, 1, file); // Did it succeed?

// Never use magic numbers
if (size > 1024) { ... } // What is 1024?

// Never leak on error paths
FILE* f = fopen(path, "r");
if (error) return -1; // Leaked f!


// Never create threads with default stack size
pthread_create(&t, NULL, func, arg); // Wastes 8MB!

// Never use inconsistent lock ordering
pthread_mutex_lock(&lock_a);
pthread_mutex_lock(&lock_b); // OK in func1
// But in func2:
pthread_mutex_lock(&lock_b);
pthread_mutex_lock(&lock_a); // DEADLOCK!

7. Use thread sanitizer for concurrent code
8. Test for race conditions with helgrind
9. Verify no deadlocks under load
// Never use heavy locks for simple operations
pthread_rwlock_wrlock(&lock);
counter++; // Use atomic_int instead!
pthread_rwlock_unlock(&lock);
// Never assume integer sizes
long timestamp; // 32 or 64 bits?
```

## Testing Focus

For every change:
1. Write tests that verify the behavior
2. Run tests under valgrind to catch leaks
3. Verify tests pass on target platform
4. Check code coverage (aim for >80%)
5. Run static analysis tools
6. Test error paths and edge cases

## Communication Style

- Be direct and specific
- Explain memory implications
- Point out potential issues proactively
- Suggest platform-independent alternatives
- Reference specific line numbers
- Provide complete, working code examples
Loading