You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**List all targets** (CMake/Ninja): `ninja -t targets`
75
+
39
76
### Unit Testing
40
77
- Install Ceedling: `sudo gem install ceedling`
41
-
- Run all unit tests: `cd test/unit-test && ceedling` -- takes 4 seconds. NEVER CANCEL. Set timeout to 10+ minutes.
78
+
- Run all unit tests: `cd test/unit-test && ceedling` or `cd test/unit-test && ceedling test:all` -- takes 4 seconds. NEVER CANCEL. Set timeout to 10+ minutes.
79
+
- Run specific test: `cd test/unit-test && ceedling test:test_fifo`
42
80
- Tests use Unity framework with CMock for mocking
- Check `hw/bsp/` for complete list and `docs/reference/boards.rst` for details
132
170
171
+
## Code Style Guidelines
172
+
173
+
### General Coding Standards
174
+
- Use C99 standard
175
+
- Memory-safe: no dynamic allocation
176
+
- Thread-safe: defer all interrupt events to non-ISR task functions
177
+
- 2-space indentation, no tabs
178
+
- Use snake_case for variables/functions
179
+
- Use UPPER_CASE for macros and constants
180
+
- Follow existing variable naming patterns in files you're modifying
181
+
- Include proper header comments with MIT license
182
+
- Add descriptive comments for non-obvious functions
183
+
184
+
### Best Practices
185
+
- When including headers, group in order: C stdlib, tusb common, drivers, classes
186
+
- Always check return values from functions that can fail
187
+
- Use TU_ASSERT() for error checking with return statements
188
+
- Follow the existing code patterns in the files you're modifying
189
+
133
190
Remember: TinyUSB is designed for embedded systems - builds are fast, tests are focused, and the codebase is optimized for resource-constrained environments.
0 commit comments