Commit Graph

29 Commits

Author SHA1 Message Date
Robbe Derks b70ba5ecde
Detect H723 in firmware (#1988)
* determine H723 based on package type

* wrong way round

* misra...

* enable SYSCFG clock before reading

* whitelist certain package types
2024-08-02 11:26:16 -07:00
Adeeb Shihadeh b4e3d5cdd2 Revert "H7: detect board type with second ID pin group (#1975)"
This reverts commit 376408bb4f.
2024-07-14 15:56:18 -07:00
Adeeb Shihadeh 376408bb4f
H7: detect board type with second ID pin group (#1975)
* H7: detect board type based on package

* detect smps

* misra fix

* jungle?

* pkg isn't reliable, need syscfg enabled

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-06-26 18:20:51 -07: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
Adeeb Shihadeh d6b5dbb3dc Revert "detect 723 live (#1835)"
This reverts commit 9d0caa1935.
2024-01-24 15:39:11 -08:00
Adeeb Shihadeh 9d0caa1935
detect 723 live (#1835)
* detect 723 live

* cleanup

* more precise

* more precise

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-01-24 14:48:32 -08:00
Adeeb Shihadeh a2d5d8ad07
stm32h723 (#1832)
* booting

* cleanup

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-01-23 23:15:59 -08:00
Adeeb Shihadeh 1950ba6f83 cleanup bus count constant 2023-08-04 10:47:03 -07:00
Adeeb Shihadeh f37f8d90ba
cleanup build, prep for jungle (#1549)
* cleanup build, prep for jungle

* cleanup

* update pedal obj path
2023-08-03 19:07:41 -07:00
Adeeb Shihadeh b6c378ad02
CI: set PYTHONWARNINGS=error (#1323)
* CI: set PYTHONWARNINGS=error

* update resetter

* fix build warnings

* bump jungle

* fix one more

* fix linter

---------

Co-authored-by: Bruce Wayne <batman@comma.ai>
2023-04-02 09:33:35 -07:00
Adeeb Shihadeh c75c276301
add has_spi board property (#1153)
* always spi for h7

* disable for now
2022-11-13 19:57:20 -08:00
Robbe Derks d574f4aebc
STM32F4: SPI communications (#998)
* 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

* llspi misra fix

* enable SPI on F4 and setup gpio

* duh

* wip: spi comms

* more spi wip

* dynamic sector erasing

* Revert "dynamic sector erasing"

This reverts commit fce1215a2e.

* more sectors to be erased

* debugging

* woah, this works

* cleanup on the panda side

* add sync and checksum checks, and fix recovery on errors

* this seems relatively stable

* add retrying

* this is stabler

* some endianness and endpoint fixes

* builds

* revert that

* add that back

* checksum start

* start splitting up driver

* spi behind flag

* cleanup test

* bump up timeout

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-11-09 18:46:20 -08:00
Igor Biletskyy 9147cba1af
F4: more RAM (#1126)
* F4 more ram

* more flash
2022-11-02 16:57:14 -07:00
Adeeb Shihadeh abaa9f8968
always build all projects + test libs (#1038)
* always build all projects

* and tests

* fix that
2022-08-19 11:41:34 -07:00
Igor Biletskyy f56ebf5b77
Revert "Split linker files for STMs F2 and F4 (#817)" (#852)
This reverts commit 5eddc180d5.
2022-02-10 19:25:25 -08:00
Igor Biletskyy 5eddc180d5
Split linker files for STMs F2 and F4 (#817)
* fix linkers
2022-02-07 16:21:18 -08:00
Igor Biletskyy de296d021b
fix make_release (#805) 2021-12-06 16:10:55 -08:00
Igor Biletskyy 0aed173fb5
Build panda for both target mcpus (#732)
* Edit SCons

* No need for H7 env

* also build panda when building pedal

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-10-04 12:13:29 +02:00
Greg Hogan 7e99d5245f
expose DEBUG flag and improve debug console output (#728)
* expose debug flags and improve debug console output

* puth4

* other flags need to be set more locally

* fix misra violations

* fix misra violation

* fix misra violation
2021-09-25 21:46:19 -07:00
Igor Biletskyy 53b49da48f
Remove panda code versioning (#702) 2021-08-03 15:07:53 -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 ada4f7e177
Add pedal tests to CI (#680)
* Add pedal tests to CI

* Organized as unittest

* Linter and imports

* Ignore 'none' serials

* Force into DFU

* Check in softloader mode

* Pin jungle commit

* Add silent mode to pedal

* Move pedal serial to const

* split CIs

* full path to canhandle

* Revert adding silent mode to pedal

* improve

* increase timeout pedal test
2021-07-06 20:29:51 -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
Willem Melching d6d928125b Sconscript: requires on .o not on .elf 2021-04-01 16:40:28 +02:00
Willem Melching 0716851508 add back requires for parellel build 2021-04-01 16:36:47 +02:00
Willem Melching 27b4b57566 Don't trigger fw rebuild on git hash change 2021-04-01 14:29:51 +02:00
Willem Melching 4906dc7b22 sconsfile add proper require to gitversion 2021-03-25 18:08:22 +01: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