Skip to content

Commit

Permalink
Merge panda subtree
Browse files Browse the repository at this point in the history
  • Loading branch information
Vehicle Researcher committed Jun 6, 2019
2 parents 1e8098c + 9a143c5 commit 0829b0a
Show file tree
Hide file tree
Showing 52 changed files with 970 additions and 1,249 deletions.
37 changes: 33 additions & 4 deletions panda/.circleci/config.yml
Expand Up @@ -12,6 +12,37 @@ jobs:
name: Run safety test name: Run safety test
command: | command: |
docker run panda_safety /bin/bash -c "cd /panda/tests/safety; ./test.sh" 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: build:
machine: machine:
docker_layer_caching: true docker_layer_caching: true
Expand Down Expand Up @@ -40,10 +71,6 @@ jobs:
name: Build Pedal STM bootstub image name: Build Pedal STM bootstub image
command: | command: |
docker run panda_build /bin/bash -c "cd /panda/board/pedal; make obj/bootstub.bin" 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: - run:
name: Build ESP image name: Build ESP image
command: | command: |
Expand All @@ -54,4 +81,6 @@ workflows:
main: main:
jobs: jobs:
- safety - safety
- misra-c2012
- strict-compiler
- build - build
5 changes: 3 additions & 2 deletions panda/.gitignore
Expand Up @@ -10,5 +10,6 @@ a.out
dist/ dist/
pandacan.egg-info/ pandacan.egg-info/
board/obj/ board/obj/
examples/output.csv examples/output.csv
.DS_Store .DS_Store
nosetests.xml
2 changes: 0 additions & 2 deletions panda/Dockerfile
Expand Up @@ -59,6 +59,4 @@ USER pandauser
RUN cd /tmp/panda/boardesp && ./get_sdk_ci.sh RUN cd /tmp/panda/boardesp && ./get_sdk_ci.sh
USER root USER root


COPY ./xx/pandaextra /tmp/pandaextra

ADD ./panda.tar.gz /tmp/panda ADD ./panda.tar.gz /tmp/panda
2 changes: 0 additions & 2 deletions panda/Jenkinsfile
Expand Up @@ -14,8 +14,6 @@ pipeline {
steps { steps {
timeout(time: 60, unit: 'MINUTES') { timeout(time: 60, unit: 'MINUTES') {
script { 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' sh 'git archive -v -o panda.tar.gz --format=tar.gz HEAD'
dockerImage = docker.build("${env.DOCKER_IMAGE_TAG}") dockerImage = docker.build("${env.DOCKER_IMAGE_TAG}")
} }
Expand Down
2 changes: 1 addition & 1 deletion panda/VERSION
@@ -1 +1 @@
v1.2.1 v1.3.1
9 changes: 0 additions & 9 deletions panda/board/Makefile.legacy

This file was deleted.

8 changes: 8 additions & 0 deletions panda/board/Makefile.strict
@@ -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
6 changes: 0 additions & 6 deletions panda/board/README.md
Expand Up @@ -23,12 +23,6 @@ Programming
make make
``` ```


**NEO**

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

Troubleshooting Troubleshooting
---- ----


Expand Down
16 changes: 5 additions & 11 deletions panda/board/bootstub.c
Expand Up @@ -12,27 +12,21 @@
#include "stm32f2xx_hal_gpio_ex.h" #include "stm32f2xx_hal_gpio_ex.h"
#endif #endif


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

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


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

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


#include "drivers/spi.h" #include "drivers/spi.h"
#include "drivers/usb.h" #include "drivers/usb.h"
//#include "drivers/uart.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/rsa.h"
#include "crypto/sha.h" #include "crypto/sha.h"


Expand Down

0 comments on commit 0829b0a

Please sign in to comment.