Adeeb Shihadeh
ad377ced81
single header for all drivers ( #2335 )
...
* drivers.h, claude's try
* include from root
* fix mac
* organize a lil more
2026-02-15 16:33:58 -08:00
downquark7
e42367df97
Adjust gitversion handling to include null terminator in length calculations. ( #2309 )
...
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com >
2025-12-28 12:53:02 -08:00
Adeeb Shihadeh
1ce986f75c
bye bye f4 ( #2259 )
...
* bye bye f4
* lil more
* fix mac build
* update health idx
2025-08-26 12:37:36 -07:00
Adeeb Shihadeh
5ac6305a95
quick garbage collection pass ( #2231 )
...
* remove DPANDA
* -22
* lil more
* canfd
* lil more
* update cppcheck
* uart cleanup
* always harness
* sbu sense
* lil more
* enable spi
* rm ENABLE_SPI
2025-07-19 21:05:12 -07:00
Aubrey Wahl
0af9744ede
Add guards around platform-specific code ( #2189 )
...
* guard platform specific code
* more simple
* less dumb guard
* stragglers
* blankspace
* blankspace2
* crc.h
* keep condition
* good call
* consistency
* another one
---------
Co-authored-by: Robbe Derks <robbe.derks@gmail.com >
2025-04-17 15:24:59 +02:00
Robbe Derks
998ac9d5d8
Init cleanup: global LED driver ( #2170 )
...
* wip
* fix init
* fix libpanda
* cleanup
---------
Co-authored-by: Comma Device <device@comma.ai >
2025-03-14 18:01:45 +01:00
Maxime Desroches
144846e4ce
misra2.5: safety modes + stm32* ( #2032 )
...
partial
2024-09-20 15:14:44 -07:00
Adeeb Shihadeh
6eed036473
(almost) enable cppcheck unusedFunction ( #1875 )
...
* remove some unused
* more
* kinda works
* rest are false positives
* disable for now
* add back exhaustive
2024-02-17 14:16:15 -08:00
Adeeb Shihadeh
c076a9f2f6
remove pedal fw ( #1872 )
...
* remove pedal fw
* little more
* one more
* and tests
* rest of it
* little more
* fix linter
* more fix
2024-02-16 22:58:01 -08:00
Ruben Medina
40671436ee
enable misra-constParameterPointer ( #1826 )
2024-01-20 21:50:42 -08:00
Adeeb Shihadeh
b6e37f25b6
Remove flash logging ( #1674 )
...
* Revert "Disable flash logging (#1667 )"
This reverts commit 62db60595b .
* Revert "Faster log retrieval (#1484 )"
This reverts commit 694aae9c26 .
* Revert "Flash bounds checking outside of bootstub (#1459 )"
This reverts commit 054344de6b .
* Revert "Logging (#1445 )"
This reverts commit 0cc91a7f7b .
* cleanup
* cleanup
2023-09-30 12:49:46 -07:00
Igor Biletskyy
b47b8259ef
unify CAN/FDCAN odjects naming ( #1596 )
...
* init
* happy MISRA
2023-08-21 16:09:31 -07:00
Robbe Derks
0cc91a7f7b
Logging ( #1445 )
...
* try 1
* some fixes
* fix some misra
* first poc working
* more things
* more misra fixes
* fix misra
* add rate limiting
* fix misra
* add some unit tests through libpanda
* add more tests and fix some stuff
* fix misra again
* add startup log hitl test
* list
* don't fail on wrong timestamps
* improvements
* fix tests
* expected logs test?
* not sure why this passed
* oh, it doesn't reset
* only show last few
* guess at expected logs
* needs this
* ugh
* reduce compiler warnings
* adjust expected logs
* this is correct
* is it really 1?
* min max
* reduce spam in SPI test
* some cleanup
2023-06-13 17:00:56 +02:00
Adeeb Shihadeh
52f96bac68
spi: nack on can tx endpoint if buffer is full ( #1426 )
...
* spi: nack on can tx endpoint if buffer is full
* handle in python lib
* fix timeout
* fix timeout
* fix linter
* cleanup
* fix
---------
Co-authored-by: Comma Device <device@comma.ai >
2023-05-19 22:43:34 -07:00
Adeeb Shihadeh
2de7140117
SPI support in bootstub ( #1227 )
...
* always build spi
* no dos for now
* spi gpio init
* detect bootstub
* cleanup
* revert that
* move fx stuff
* fix linter
* set erase timeout
* fix types
* cleanup
---------
Co-authored-by: Comma Device <device@comma.ai >
2023-03-07 14:55:15 -08:00
Adeeb Shihadeh
544cf2ba82
bootstub: add hw type endpoint ( #1278 )
2023-03-06 22:26:56 -08:00
Adeeb Shihadeh
b8693da342
add comms handler to get MCU UID ( #1212 )
...
* cleanup first
* get uid
* add to bootstub and test
* fix pedal
* match that
Co-authored-by: Comma Device <device@comma.ai >
2023-01-15 20:13:26 -08:00
Adeeb Shihadeh
e6f62a62aa
rename puts to avoid conflict with stdio.h ( #1174 )
...
* rename puts to avoid conflict with stdio.h
* better name
2022-11-29 22:55:10 -08:00
Adeeb Shihadeh
80dac4cd94
cleanup CAN definitions ( #1170 )
2022-11-29 15:56:43 -08:00
Robbe Derks
d24971ef8a
Communication refactor ( #997 )
...
* cleanup is_enumerated, rename comms and init spi
* big comms refactor, building now
* misra fixes
* more fixes
* misra try 3
* cleanup
* this belongs in a separate PR
* remove unneccesary file
* revert llspi changes
* this needs packing
* fix pedal usb
Co-authored-by: Comma Device <device@comma.ai >
2022-08-03 13:11:52 +02:00
Igor Biletskyy
8d0d148681
Move shared definitions into separate file ( #808 )
...
* refactor definitions includes
* fix include
* revert dlc_to_len
* ...
* change name
2021-12-16 14:38:22 -08:00
Igor Biletskyy
493866d15b
Cleanup Wi-Fi leftovers ( #804 )
...
* cleanup python lib
* remove wifi leftovers from firmware
* few spots in firmware
* forgot
* remove usb to wifi test
* linter
* more cleanup in flasher.h
* more found
* check in tests too
* linter
2021-12-06 14:39:28 -08:00
Igor Biletskyy
ae26b75d7b
CAN_FIFOMailBox to CANPacket struct + USB dynamic packet size ( #739 )
...
* Squashed commits, no cleanup
* Few fixes
* No init = garbage
* Only receive with new canpacket
* Add send with canpacket
* Revert "Add send with canpacket"
This reverts commit 7d06686ddd6d447c714b5289d31af24403d36931.
* Packet must be aligned to word, or bad performance
* Cleaner
* Fix tests
* Tests...
* MISRA 10.4
* More MISRA
* libpandasafety_py
* cffi
* even more tests...
* typo
* ...
* ...
* ...
* Slight cleanup
* MISRA 6.1
* MISRA 17.7
* Bug in bxcan + even style
* MISRA 10.1
* Revert "MISRA 10.1"
This reverts commit 404ae7fcc39556f80f528de9015702e69f4ea0a5.
* ...
* MISRA 10.1 and 10.4 suppress until next PR
* MISRA 20.1
* ...
* test_honda
* ...
* ...
* test_toyota
* test_volkswagen_mqb
* test_volkswagen_pq
* Sketchy thing...
* Revert "Sketchy thing..."
This reverts commit 3b2e5715bdc1954f7b7b3b7469ba3d0eaa06bdf9.
* remove comment
* bxcan extended address bug
* Concept, experimental dynamic usb packet size
* increase each buffer to 10240 bytes
* raise python bulk read/write limits
* ...
* Move packet size to start
* Experimental send, stream-like
* New receive test, stream-like
* cleanup
* cleanup + rebase fixes
* MISRA
* Extra receive method, stream-like, commented out
* type change
* Revert back to buffer for send, stream commented
* forgot ZLP
* lower buffer, add rx failsafe
* ... remove ZLP
* return ZLP back
* Add tx checks to panda fw
* TX stream with counter
* fix counter overflow
* 13 free slots should be enough
* limit tx usb packet
* ...
* Revert max_bulk_msg doubling
* python lib improve speed
* Stream with counter for RX, dirty, needs cleanup
* Increase chunk length to 4096 bytes
* cleanup fdcan.h
* cleanup __init__.py
* MISRA 12.1
* MISRA 10.8
* remove non-streaming usb functions
* more main.c cleanup
* MISRA 15.6
* MISRA 15.5
* MISRA 18.4 and suppress objectIndex
* handling usb pakcets > 63bytes, naming and cleanup
* Cleanup old from tests and update CANPacket_t struct
* Switch to 4 bit DLC instead of 6 bit length
* ops)
* ...
* pylint
* receive python buffer increase
* USB increase receive packet len
* tweak buffers
* No need for so high limits
* MISRA 20.1 workaround
* performance tweaks
* cleanup, dlc to data_len_code naming
* main.c naming
* comments and cleanup for main.c usb
* clean py lib
* pylint
* do not discard good rx messages on stream fail
* cleanups
* naming
* remove bitstruct lib and lower tx limit
* bitstruct lefovers
* fix bug in VW test
* remove adjusting data size and assert on wrong len
* ...
* test new memcpy before merging
* Revert "test new memcpy before merging"
This reverts commit 399465a264835061adabdd785718c4b6fc18c267.
* macros for to/fromuint8_t array
* MISRA hates me!
* tests.c include macros instead
* move CANPacket to can_definitions.h
* vw_pq python test fix
* new memcpy test, REMOVE
* check without alignment
* revert macros for uint8 arrays
* Revert "revert macros for uint8 arrays"
This reverts commit 581a9db735a42d0d68200bd270d87a8fd34e43fe.
* check assert
* Revert "check assert"
This reverts commit 9e970d029a50597a1718b2bb0260196c050fd77f.
* one more variation
* Revert "one more variation"
This reverts commit f6c0528b7ac7e125750dc0d9445c7ce97f6954b5.
* what about read performance
* Revert "what about read performance"
This reverts commit d2610f90958a816fe7f1822157a84f85e97d9249.
* check struct alignment to word
* check for aligned memcpy again
* cleanup
* add CANPacket structure diagram
* update CANPacket and add USB packet struct
* bugfix + refactoring of EP1
* move dlc_to_len to header
* missed include
* typo...
* MISRA
* fk
* lower MAX_CAN_MSGS_PER_BULK_TRANSFER
* bump CAN_PACKET_VERSION to 2
* bump python lib CAN_PACKET_VERSION to 2
* rename parse_can_buffer to unpack_can_buffer
* CANPacket_t const fields
* Revert "CANPacket_t const fields"
This reverts commit cf91c035b7706a14e317550c5f0501ae3fce7c70.
* test.c relative path
* cleanup
* move macros to safety_declarations
* Refactor pack/unpack funcs and add unittest
* usb_protocol.h
* oops
* Update .github/workflows/test.yaml
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com >
* remove print from unittest
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com >
2021-11-12 16:36:34 -08:00
Igor Biletskyy
ad90646001
Support for STM32H7 and Red Panda ( #694 )
...
* H7 drivers
* Include H7 into the code
* fix flash write for H7
* get serial from flasher.h from F4 and H7
* flash.sh and recover.sh for gen3
* add set_data_speed for BRS CAN FD
* build all fws
* gen3 to panda lib
* gen3 name in scons project
* disable fd can and brs
* gen3 to CI tests
* jenkins fix for new tests and build_all
* fix pedal test
* pedal in panda tests again...
* cleanup llfdcan.h
* cleanup clock.h
* Add LDORDY bit check instead of delay
* missing define in stm32h735xx.h lib
* board_id helper
* enable debug detection again
* clean gpio inits
* fix board_id helper, make cleaner
* comment MCUs in stm lib for faster misra
* target MCU
* misra-5.5
* improve headers and misra speed
* cleanup CI tests
* change naming from gen3 to h7
* readable if statement
* cleanup llusb.h
* only cycle one transceifer in bus-off
* move unused funcs to common header
* bus_off_err reset
* misra 10.4 fdcan
* extern to can_data_speed variable
* limit can_data_speed array size to 3
* reinit fd can on data speed change
* Improve test with ELM327 and extaddr check
* bugfix for fdcan
* panda python config naming
* abstracted init request in llfdcan
* misra fdcan
* Improve llusb.h for H7
2021-08-02 20:26:15 -07:00
Igor
863993dab9
refactor CAN ( #695 )
2021-07-16 12:22:28 -07:00
Igor
aaad0c2865
Refactor flasher ( #686 )
2021-07-14 13:49:28 -07:00