Commit Graph

20 Commits

Author SHA1 Message Date
Adeeb Shihadeh a660e342fd
erase log flash sectors in DFU recovery (#1661)
* erase log flash sectors in DFU recovery

* always erase by sector

* erase all

* fix
2023-09-14 12:49:59 -07:00
Adeeb Shihadeh 09cd81752d
python lib: close USB context properly (#1606)
* python lib: close USB context properly

* fix jungle

* rm that

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-08-24 19:15:37 -07:00
Justin Newberry 4ea50fbb09
Ruff: propgate config from OP (#1579) 2023-08-14 12:52:02 -07:00
Adeeb Shihadeh 4dd2735e38
cleanup fw filename conventions (#1434)
* cleanup fn

* import os

* fix path
2023-05-21 21:19:19 -07:00
Adeeb Shihadeh 4d7abcc2e6
PandaDFU: don't reset in program_bootstub (#1433) 2023-05-21 20:05:21 -07:00
Adeeb Shihadeh 3e89b7127a
python: fix libusb deprecation warning (#1302)
* update list

* this one too

* update dfu
2023-04-01 23:09:12 -07:00
Adeeb Shihadeh efb36197bb
PandaDFU: SPI support (#1270)
* PandaDFU: SPI support

* get mcu type

* program bootstub

* little cleanup

* more cleanup

* connect by dfu serial

* time to remove that

* none

* fix linter

* little more

* catch

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-03-06 21:52:08 -08:00
Adeeb Shihadeh 18230831f3
PandaDFU: abstract out USB comms (#1274)
* wip

* revert that

* split list + connect

* some more

* mypy fix

* add clear status back

* rename

* cleanup

* cleaner mypy fix

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-03-06 09:24:00 -08:00
Adeeb Shihadeh 946f952aa7
DFU HITL tests (#1276)
* DFU HITL tests

* fix + types

* fix

* clear first
2023-03-05 20:19:27 -08:00
Adeeb Shihadeh 76d0459182
cleanup MCU definitions (#1226)
* cleanup MCU definitions

* rename

* enum

* enum

* fix that
2023-01-26 20:54:11 -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 da8a76f1b3
Deprecate bcdDevice and legacy mode from panda lib and tests (#692) 2021-07-14 13:30:59 -07:00
Willem Melching ad9ecefe65
Switch panda to scons builder (#635)
* add scons builder

* cleanup 1

* remove building from python code

* add pedal build

* fixup flags

* add EON flag

* change github actions to scons

* fixup automated tests

* move flashing scripts

* fix indent

* remove version.mk

* fix not in git

* fix linker script filename

* untested pedal flashing scripts

* add release option

* better asserts

* swap condition

* enable usb and fix flash script

* usb flash is not supported

* use button to enable dfu mode

* no usb because misra

* remove sleep
2021-03-24 14:44:32 +01:00
Robbe Derks 229047d7c2 fix flash_release 2020-09-07 10:26:27 +02:00
Adeeb d7f7b14118
Enable almost all Flake8 checks (#548)
* fix W391

* E262

* E703

* W293

* some E

* E231

* some more E

* E225

* more E

* E252

* no tabs

* more tabs

* E701

* uds.py

* almost all of them

* only e265 left

* not sure why this is triggering on commented out code

* ignore esptool
2020-06-01 01:49:26 -07:00
rbiasini fce38a91d7
Linter python (#299)
* Added pyflakes and Pylint for python

* Actually run linter in CI

* some simple pyflakes changes

* Add flake8 to panda reqs for linter test

* flake8 errors are fixed

* run flake8 in regression tests

* meant to run flake8

* hack to ignore unused import

* bug

* fix bugs in tucan_loopback

* Another fix by using set_safety_mode

* added pylintrc file

* more fixes and enabled pylint as well

* Fix pylint in circleci

* added linter to readme
2019-10-15 14:03:31 -07:00
rbiasini af0960ad3d DFU fix (#288)
* DFU fix

* fix test 2

* this should fix all the remaining jenkins test

* Fixed pyenv shim not being a python file, but a sh script
2019-10-03 19:46:28 -07:00
Riccardo 2dc34096a0 2to3 applied 2019-09-24 22:33:46 -07:00
Willem Melching 03d1c8ab3e make dfu.py compatible with latest libusb1 2019-06-26 13:56:02 -07:00
George Hotz b74b6f2727 rename panda to python because of git ambiguity 2017-12-06 16:17:57 -08:00