Commit Graph

66 Commits

Author SHA1 Message Date
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
7c97ab5f35 cleanup build (#2234)
* cleanup bootstub build

* cleanup rest of build

* less files

* all in same obj

* oops

* lil more
2025-07-20 11:29:58 -07:00
Adeeb Shihadeh
ca603115cb Include from project root (#2232)
* fix include paths

* cleanup
2025-07-19 21:58:58 -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
Adeeb Shihadeh
8bd83750c2 setup opendbc dependency properly (#2202)
* rm that

* bump

* lil more

* update

* fix libpanda

* update

* fix misra

* python3?

* update ref

* fix mutation
2025-05-17 19:15:19 -07:00
Shane Smiskol
9804e2607e Move car safety modes to opendbc (#2143)
* move safety tests

* move libsafety

* move safety

* remove safety test job

* fix compilation

* update ref

* rm safety mutation test

* fix misra test

* no safety here

* fix build for both local and docker

* already tested

* fix misra mutation

* move Safety Model readme section to opendbc

* and panda

* fix

* in

* not here

* not here
2025-02-19 17:19:18 -08:00
DevTekVE
bedee405d6 test: Allow running test_misra.sh easy on macos (#2096)
Allow running test_misra.sh easy on macos
2024-12-09 17:34:04 -08:00
dzid26
6f0d1efbd9 stricter misra config check - prevent quiet bail out 2024-09-05 21:49:30 -07:00
Andrei Radulescu
0a0912234e update bash scripts to #!/usr/bin/env bash (#1987)
* update bash shebang for better compatibility including macOS

* can't have anything after #bash
2024-08-26 17:25:15 -07:00
Adeeb Shihadeh
c4e75ee89c remove cereal dependence (#2000)
* remove cereal

* rm more shit

* add back make

* python3

* python3

* fix that

* put that back

* rename

* fix that

* can't move it
2024-08-18 11:40:54 -07:00
dzid26
4df996cfd7 Cppcheck checklist bugfix (#1969)
* Fix cppcheck checklist diff

* cppcheck already has exitcode=2
2024-06-04 10:24:51 -07:00
dzid26
b6b8144523 misra mutations test - git diff error fix (#1964)
fix misra mutations - don't run git diff in temp folder
2024-06-03 22:31:53 -07:00
dzid26
d401ba169c Enable misra-c2012-1.2 (#1962)
* misra-c2012-1.2 - allow __typeof__ compiler extension

* explicit c11
2024-05-30 22:13:47 -07:00
dzid26
9fdbb178c4 Generate cppcheck checkers list (#1960)
* cppcheck checkers list / coverage

* Update tests/misra/test_misra.sh

* Update tests/misra/test_misra.sh

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-05-29 19:42:40 -07:00
Justin Newberry
698d17e021 fix inconsistent misra mutation tests (#1935)
* revert

* fix
2024-04-22 10:28:53 -07:00
Adeeb Shihadeh
418fca3583 enable misra-config checks (#1879)
* mostly done

* fix rest of misra-config

* do other two in next pr
2024-03-24 12:10:37 -07:00
Adeeb Shihadeh
546db7b73b set cppcheck platform 2024-02-18 11:43:25 -08: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
997b075349 misra: catch more cppcheck errors that don't change exit code 2024-02-17 12:53:28 -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
Aryan
ef68fea95e Make MISRA results consistent across cppcheck runs (#1867)
* fixed uninitialized data error

* update ci

* revert old changes

* add styling

* switch misra.py to misra

* remove cache from mutation.py

* works on local

* jobs increased to 8 for mutation test

* works locally

* add env variable back

* removed env variable

* cleanup

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-02-14 08:35:14 -08:00
Adeeb Shihadeh
5ab46d52fd set cppcheck level to exhaustive (#1846) 2024-02-03 15:28:15 -08:00
Adeeb Shihadeh
a5604de24f ensure cppcheck is always the right version (#1843) 2024-01-29 20:19:50 -08:00
Hoang Bui
ced1fb3dee Add more MISRA mutation tests (#1818)
* 9 added tests

* test speed with new del header

* mypy

* cleanup

* fix error in delete

* random

* change

* works on local

* sorted

* with order

* add pytest randomly

* test with ci

* remove sort

* cleanup

* all files

* no obj

* another bootstub

* fix

* cleanup

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-01-20 15:52:38 -08:00
Ruben Medina
07caaf6cfb enable misra-c2012-5.6 (#1802) 2024-01-15 21:14:22 -08:00
Hoang Bui
d854abedff Enable cache for MISRA mutation test (#1799)
* work with 1 cache

* enable cache in mutation

* name to hash

* cleanup

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-01-15 14:40:19 -08:00
Hoang Bui
d66161966d Enable caching in test_misra (#1798)
* enable cachinng

* hased args

* md5

* cleanup
2024-01-14 15:53:59 -08:00
Adeeb Shihadeh
734bf0979c update cppcheck to 2.13 (#926)
* update

* new table

* start with this

* speedup

* clean up
2024-01-09 21:28:12 -08:00
Adeeb Shihadeh
9270848da8 merge misra and cppcheck runs (#1790) 2024-01-09 20:04:44 -08:00
Adeeb Shihadeh
d066ae70cd ensure MISRA coverage table is always up to date (#1772)
* ensure MISRA coverage table is always up to date

* update comment
2023-12-09 15:48:33 -08:00
Adeeb Shihadeh
6e96d2e57a misra test cleanup (#1764)
* misra test cleanup

* fix pedal

* cleanup

* debug

* fix

* undo debug

* add CAN3
2023-12-09 01:28:50 -08:00
Adeeb Shihadeh
13d64d4cc3 USB power mode + bootkick cleanup (#1051)
* remove tick

* remove more

* delete more

* board tick

* update health

* dos bootkicking

* cleanup
2022-08-31 20:46:07 -07:00
Adeeb Shihadeh
294792c1b5 misra: support rules text if exists (#1017) 2022-08-09 14:56:21 -07:00
Adeeb Shihadeh
995aed6550 make misra tests easy to run locally (#1016)
* make misra tests easy to run locally

* auto install

* fix copy

* test the test

* Revert "test the test"

This reverts commit 418abfc728337a9a8be3388ba76a27d27dc5954e.
2022-08-09 14:23:12 -07:00
Adeeb Shihadeh
62f709afd4 fix missing CAN-FD safety modes 2022-05-19 16:55:53 -07:00
Willem Melching
36c62afa0c Kia EV6 (#905)
* block lkas

* taco time

* local changes

* start

* tx checks

* counter + vehicle moving

* support big can fd

* check crc

* add torque to rx checks

* tests

* little more

* little more

* get some misra coverage

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-05-19 15:59:58 -07:00
Igor Biletskyy
cf804d65d2 fix MISRA test bug and coverage (#743) 2021-10-18 22:04:14 -07: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
7d93e5a202 Refactor HAL (#656)
* Let refactoring begin!

* Fix pedal build

* Fix pedal safety tests

* Forgot few TIM2 instances

* Try this way with misra

* More misras...

* More misras...

* Still fighting with misra blindfolded

* Almost got it!

* Last misra error..

* Last misra error..

* Misra works locally..

* Maybe this?

* Looks like it was cppcheck bug, revert changes

* Suggested changes and reverts

* File structure change

* revert includes

* remove spaces

* remove timer delay

* endings

* more typing

* rename early to early_initialization

* Remove delay_us

* Revert RTC default values

* Revert initialization sequence

* Fix quotes

* Revert

* Return TIM6EN

* Alias slow timer to TICK_TIMER

* Refactor files structure

* Remove definition of PANDA

* Abstract timers

* Fix include

* tick_timer_init

* Split usb driver

* Move LL stuff: adc

* Move LL stuff: usb

* Fix include again...

* Will check pedal builds also locally..

* Move LL stuff: CAN

* Move LL stuff: clock

* Rename common to peripherals and move

* Move board HAL

* Change include, not needed for pedal

* llgpio to gpio and new lines fix

* remove board_has_relay, not used

* Remove board_functions.h and add to board struct

* Move include

* Fk MISRA...

* has_onboard_gmlan to has_hw_gmlan

* Typos

* Move board_declarations include

* Shuffle

* More abstraction

* fix paths, fix cppcheck test

* Fix for pedal build with USB
2021-07-02 18:25:35 -07:00
Adeeb Shihadeh
78c24982a9 Remove non-EON panda build (#671)
* Remove non-EON panda build

* missed that

* fixup readme

* more readme

* simplify ci

* add USB command to disable heartbeat checks in debug mode

* clean that up too

* more cleanup

* fix path

* disable heartbeat in set_safety_mode

* more red

* remove one more EON ref
2021-06-21 13:54:09 -07:00
Adeeb
35bff5db51 Speed up misra test in CI (#552) 2020-06-07 21:42:23 -07:00
Riccardo
dec565c728 Update Misra test coverage, which now includes rule 2.7 2019-11-27 00:23:32 -08:00
Riccardo
bfd8ff1b18 Update cppcheck commit with more coverage 2019-10-31 13:08:10 -07:00
Riccardo
62e2f5caac update cppcheck commit 2019-10-15 13:57:36 -07:00
rbiasini
fac0277169 Misra update (#280)
* Updated cppcheck ref. New rules to be fixed

* changed 2 MACRO names that had more than 31 characters in common

* Fix newly popped 10.4: same type on arithmetic ops

* Fix 18.4: operators should not be applied to an expression

* ensure a NULL pointer isn't dereferenced
2019-09-27 17:18:02 -07:00
Riccardo
578b95ee33 Misra table of coverage added 2019-09-27 11:11:16 -07:00
Riccardo
c597dcc897 VERSION update after health packet changes and minor misra test change 2019-07-12 12:04:21 -07:00
rbiasini
01072bec0b Misra 11.x: pointer usage. (#250)
* RDLR, RDHR gone from safety

* back at not failing misra safety

* fix safety tests

* did not mean this

* Use get-bytes in pedal too

* Ignore Misra 11.5 and Fix 11.8 violaitons

* Fix 11.3 violations

* Neglect Misra 11.4, fix pointer issue in bootstub and rutn on Werror for pedal builds

* Fix Misra 11.6: can't assign number to void pointer

* Fix test after changing honda_moving name

* for loop is better

* Fix bugs from fbck
2019-07-10 20:56:03 -07:00
Riccardo
ce1daf2062 Misra check only done for EON config 2019-07-10 12:02:50 -07:00
Riccardo
04756a037f Turning back Misra check: unvoluntarily change 2019-07-09 16:18:44 -07:00