Skip to content
Permalink
Browse files

Merge panda subtree

  • Loading branch information...
Vehicle Researcher
Vehicle Researcher committed Jun 6, 2019
2 parents 1e8098c + 9a143c5 commit 0829b0a767ecc61d2c66db5404ae6a2fd93eef75
Showing with 970 additions and 1,249 deletions.
  1. +33 −4 panda/.circleci/config.yml
  2. +3 −2 panda/.gitignore
  3. +0 −2 panda/Dockerfile
  4. +0 −2 panda/Jenkinsfile
  5. +1 −1 panda/VERSION
  6. +0 −9 panda/board/Makefile.legacy
  7. +8 −0 panda/board/Makefile.strict
  8. +0 −6 panda/board/README.md
  9. +5 −11 panda/board/bootstub.c
  10. +61 −216 panda/board/drivers/can.h
  11. +40 −0 panda/board/drivers/clock.h
  12. +0 −141 panda/board/drivers/drivers.h
  13. +0 −3 panda/board/drivers/gmlan_alt.h
  14. +80 −0 panda/board/drivers/llcan.h
  15. +9 −0 panda/board/drivers/llgpio.h
  16. +0 −88 panda/board/drivers/lline_relay.h
  17. +8 −3 panda/board/drivers/spi.h
  18. +22 −0 panda/board/drivers/uart.h
  19. +31 −17 panda/board/drivers/usb.h
  20. +15 −62 panda/board/gpio.h
  21. +241 −247 panda/board/main.c
  22. +17 −27 panda/board/pedal/main.c
  23. +20 −120 panda/board/power_saving.h
  24. +6 −23 panda/board/safety.h
  25. +0 −4 panda/board/safety/safety_cadillac.h
  26. +0 −4 panda/board/safety/safety_chrysler.h
  27. +0 −16 panda/board/safety/safety_defaults.h
  28. +3 −14 panda/board/safety/safety_elm327.h
  29. +0 −1 panda/board/safety/safety_ford.h
  30. +3 −7 panda/board/safety/safety_gm.h
  31. +0 −1 panda/board/safety/safety_gm_ascm.h
  32. +27 −34 panda/board/safety/safety_honda.h
  33. +0 −4 panda/board/safety/safety_hyundai.h
  34. +0 −4 panda/board/safety/safety_subaru.h
  35. +6 −16 panda/board/safety/safety_tesla.h
  36. +47 −50 panda/board/safety/safety_toyota.h
  37. +0 −1 panda/board/safety/safety_toyota_ipas.h
  38. +7 −4 panda/board/spi_flasher.h
  39. BIN panda/buy.png
  40. +2 −2 panda/examples/query_vin_and_stats.py
  41. +0 −3 panda/python/__init__.py
  42. +6 −1 panda/run_automated_tests.sh
  43. +0 −6 panda/tests/automated/0_builds.py
  44. +1 −1 panda/tests/automated/3_wifi.py
  45. +9 −0 panda/tests/build_strict/Dockerfile
  46. +6 −0 panda/tests/misra/Dockerfile
  47. +8 −0 panda/tests/misra/test_misra.sh
  48. +10 −4 panda/tests/safety/libpandasafety_py.py
  49. +35 −20 panda/tests/safety/test.c
  50. +29 −18 panda/tests/safety/test_gm.py
  51. +77 −24 panda/tests/safety/test_honda.py
  52. +94 −26 panda/tests/safety/test_toyota.py
@@ -12,6 +12,37 @@ jobs:
name: Run safety test
command: |
docker run panda_safety /bin/bash -c "cd /panda/tests/safety; ./test.sh"
misra-c2012:
machine:
docker_layer_caching: true
steps:
- checkout
- run:
name: Build image
command: "docker build -t panda_misra -f tests/misra/Dockerfile ."
- run:
name: Run Misra C 2012 test
command: |
mkdir /tmp/misra
docker run -v /tmp/misra:/tmp/misra panda_misra /bin/bash -c "cd /panda/tests/misra; ./test_misra.sh"
- store_artifacts:
name: Store misra test output
path: /tmp/misra/output.txt

strict-compiler:
machine:
docker_layer_caching: true
steps:
- checkout
- run:
name: Build image
command: "docker build -t panda_strict_compiler -f tests/build_strict/Dockerfile ."
- run:
name: Build Panda with strict compiler rules
command: |
docker run panda_strict_compiler /bin/bash -c "cd /panda/board; make -f Makefile.strict clean; make -f Makefile.strict bin"
build:
machine:
docker_layer_caching: true
@@ -40,10 +71,6 @@ jobs:
name: Build Pedal STM bootstub image
command: |
docker run panda_build /bin/bash -c "cd /panda/board/pedal; make obj/bootstub.bin"
- run:
name: Build NEO STM image
command: |
docker run panda_build /bin/bash -c "cd /panda/board; make clean; make -f Makefile.legacy obj/comma.bin"
- run:
name: Build ESP image
command: |
@@ -54,4 +81,6 @@ workflows:
main:
jobs:
- safety
- misra-c2012
- strict-compiler
- build
@@ -10,5 +10,6 @@ a.out
dist/
pandacan.egg-info/
board/obj/
examples/output.csv
.DS_Store
examples/output.csv
.DS_Store
nosetests.xml
@@ -59,6 +59,4 @@ USER pandauser
RUN cd /tmp/panda/boardesp && ./get_sdk_ci.sh
USER root

COPY ./xx/pandaextra /tmp/pandaextra

ADD ./panda.tar.gz /tmp/panda
@@ -14,8 +14,6 @@ pipeline {
steps {
timeout(time: 60, unit: 'MINUTES') {
script {
sh 'git clone --no-checkout --depth 1 git@github.com:commaai/xx.git || true'
sh 'cd xx && git fetch origin && git checkout origin/master -- pandaextra && cd ..' // Needed for certs for panda flashing
sh 'git archive -v -o panda.tar.gz --format=tar.gz HEAD'
dockerImage = docker.build("${env.DOCKER_IMAGE_TAG}")
}
@@ -1 +1 @@
v1.2.1
v1.3.1

This file was deleted.

@@ -0,0 +1,8 @@
PROJ_NAME = panda
CFLAGS = -g -Wall -Wextra -pedantic -Wstrict-prototypes

CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4
CFLAGS += -mhard-float -DSTM32F4 -DSTM32F413xx -mfpu=fpv4-sp-d16 -fsingle-precision-constant
STARTUP_FILE = startup_stm32f413xx

include build.mk
@@ -23,12 +23,6 @@ Programming
make
```

**NEO**

```
make -f Makefile.legacy
```

Troubleshooting
----

@@ -12,27 +12,21 @@
#include "stm32f2xx_hal_gpio_ex.h"
#endif

// default since there's no serial
int puts(const char *a) { return 0; }
void puth(unsigned int i) {}

#include "libc.h"
#include "provision.h"

#include "drivers/drivers.h"

#include "drivers/clock.h"
#include "drivers/llgpio.h"
#include "gpio.h"

#include "drivers/spi.h"
#include "drivers/usb.h"
//#include "drivers/uart.h"

#ifdef PEDAL
#define CUSTOM_CAN_INTERRUPTS
#include "safety.h"
#include "drivers/can.h"
#endif

int puts(const char *a) { return 0; }
void puth(unsigned int i) {}

#include "crypto/rsa.h"
#include "crypto/sha.h"

0 comments on commit 0829b0a

Please sign in to comment.
You can’t perform that action at this time.