Skip to content

Commit

Permalink
Squashed 'panda/' changes from ae816c1..45d0d28
Browse files Browse the repository at this point in the history
45d0d28 remove whitespace (#255)
e49d0db Pedal: use avg between tracks (#253)
c597dcc VERSION update after health packet changes and minor misra test change
01072be Misra 11.x: pointer usage. (#250)
fd68c26 Propagate can_push errors (#249)
ce1daf2 Misra check only done for EON config
70d4fd7 cleanup docker container on failure
04756a0 Turning back Misra check: unvoluntarily change
fcb1208 fix weird code in USB_ReadPacket
b983cc8 Re-wrote test_misra.sh
0b19206 Misra 17.7: The value returned by a function having non-void return type shall be used. We should hang on initial failed safety_set_mode
06ee8bd Ignore Misra 5.4 until cppcheck bug (?) is fixed
4be8582 Update cppcheck commit and pass predefined params to avoid impossible combinations of configs
f45dd04 cppcheck: ignore redundantAssignment and selfAssignment for registers in llcan.h
9ce6311 Misra 12.1 (operator order) and 10.4 (incompatible essential types) fixes, arised after properly checking UID_BASE config
1cd34e5 Explicitly set the define and undefine for unknown configs in misra checks
5a02499 remove esp flash from run_automated_tests.sh
23e3684 Cppcheck unused functions (#247)
c97d60b Removed bad language
b031480 Missed adding Dockerfile
91ff6bb Run language checker in CI
205ec34 Improved language checker
f7bbab0 Language checker test
d9d0a62 Misra 5.5: missed this change from previous PR
85fa3c0 Misra 5.5: Identifiers shall be distinct from macro names (#246)
190d604 Pedal: 2 minor fixes to Misra 15.7 (else needed) and 17.7 (non-void output must be used)
8ea01ff Pedal: no built-in functions to avoid puts and putc re-definitions
1f40d1e Misra pedal (#245)
a4554e3 Ignore advisory Misra 19.2: the union keyword should not be used
e6dc417 Minor indent error
247e128 Fix strict compiler on bootstub build
ba68569 Removed build strict test and enabled -Werror flag
da11f0f safety replay: update openpilot-tools after logreader fix
fc8b9e4 Cppcheck: also check pedal
f7bd2c2 Misra 10.4: fix last 2 violations (#242)
9be5fde finished misra 17.8 (#241)
3c3aba3 Misra 10.4: Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category (#240)
f2a3a17 Misra 15_7: fix what seems to be a false positive of cppcheck
812ace5 Misra 15_7: if … else if constructs should be terminated with an else clause (#230)
79e9735 rename 5_wifi_udp.py
3c3ff0c Update Jenkinsfile (#239)
1bd9284 Misra 17.7: the value returned by a function having non-void return shall be used (#237)
18c9e88 Merge pull request #238 from commaai/misra_17_8
7ac321d Merge pull request #235 from commaai/memxxx
004e543 Jenkins: run EON test first
4bff286 Merge branch 'memxxx' of github.com:commaai/panda into memxxx
7cd80de typo
385e33b 12.1 regression
955842b WIP
ea908cb 10_1 violations: Operands shall not be of an inappropriate essential type (#233)
fa33038 Fix Misra 5.3: An identifier declared in an inner scope shall not hide an identifier declared in an outer scope (#236)
ebfe1c5 Merge branch 'master' of github.com:commaai/panda into memxxx
8c11470 Fix EON test case
64e18e8 fix inverted logic to differentiate between dev and EON panda builds
36755a0 Merge branch 'master' of github.com:commaai/panda into memxxx
e2981d6 skip wifi tests for EON panda build
db2eec9 Merge branch 'master' of github.com:commaai/panda into memxxx
11257e7 Ignore test 5_wifi_udp.py_ignore: too unreliable for now
6973c2a fix wifi tests
cf6985a memxxx function changes to be Misra compliant
3a6cd29 wifi threshold perc back to 20%. Problem wasn't this.
d92a035 faster docker build for safety replay
3e9469b Fixing tests after min->MIN  change
ecb9b6c Revert "Misra 10 1: Operands shall not be of an inappropriate essential type (#232)"
8732e4f Misra 10 1: Operands shall not be of an inappropriate essential type (#232)

git-subtree-dir: panda
git-subtree-split: 45d0d28
  • Loading branch information
Vehicle Researcher committed Jul 22, 2019
1 parent dba8e01 commit 1ff59ba
Show file tree
Hide file tree
Showing 78 changed files with 6,703 additions and 5,857 deletions.
28 changes: 14 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@ jobs:
path: /tmp/misra/misra_safety_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/tests/build_strict; ./test_build_strict.sh"
build:
machine:
docker_layer_caching: true
Expand Down Expand Up @@ -99,12 +86,25 @@ jobs:
command: |
docker run panda_safety_replay /bin/bash -c "cd /openpilot/panda/tests/safety_replay; PYTHONPATH=/openpilot ./test_safety_replay.py"
language_check:
machine:
docker_layer_caching: true
steps:
- checkout
- run:
name: Build image
command: "docker build -t language_check -f tests/language/Dockerfile ."
- run:
name: Check code for bad language
command: |
docker run language_check /bin/bash -c "cd /panda/tests/language; ./test_language.py"
workflows:
version: 2
main:
jobs:
- safety
- misra-c2012
- strict-compiler
- build
- safety_replay
- language_check
42 changes: 31 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,54 @@ pipeline {
}
}
}
stage('Test Dev Build') {
stage('Test Dev Build (no WIFI)') {
steps {
lock(resource: "Pandas", inversePrecedence: true, quantity:1){
lock(resource: "Pandas", inversePrecedence: true, quantity: 1){
timeout(time: 60, unit: 'MINUTES') {
sh "docker run --name ${env.DOCKER_NAME} --privileged --volume /dev/bus/usb:/dev/bus/usb --volume /var/run/dbus:/var/run/dbus --net host ${env.DOCKER_IMAGE_TAG} bash -c 'cd /tmp/panda; ./run_automated_tests.sh '"
script {
sh "docker run --name ${env.DOCKER_NAME} --privileged --volume /dev/bus/usb:/dev/bus/usb --volume /var/run/dbus:/var/run/dbus --net host ${env.DOCKER_IMAGE_TAG} bash -c 'cd /tmp/panda; SKIPWIFI=1 ./run_automated_tests.sh'"
sh "docker cp ${env.DOCKER_NAME}:/tmp/panda/nosetests.xml test_results_dev_nowifi.xml"
sh "docker rm ${env.DOCKER_NAME}"
}
}
}
}
}
stage('Test EON Build') {
steps {
lock(resource: "Pandas", inversePrecedence: true, quantity:1){
lock(resource: "Pandas", inversePrecedence: true, quantity: 1){
timeout(time: 60, unit: 'MINUTES') {
sh "docker cp ${env.DOCKER_NAME}:/tmp/panda/nosetests.xml test_results_dev.xml"
sh "touch EON && docker cp EON ${env.DOCKER_NAME}:/EON"
sh "docker start -a ${env.DOCKER_NAME}"
script {
sh "docker run --name ${env.DOCKER_NAME} --privileged --volume /dev/bus/usb:/dev/bus/usb --volume /var/run/dbus:/var/run/dbus --net host ${env.DOCKER_IMAGE_TAG} bash -c 'touch /EON; cd /tmp/panda; ./run_automated_tests.sh'"
sh "docker cp ${env.DOCKER_NAME}:/tmp/panda/nosetests.xml test_results_eon.xml"
sh "docker rm ${env.DOCKER_NAME}"
}
}
}
}
}
stage('Test Dev Build (WIFI)') {
steps {
lock(resource: "Pandas", inversePrecedence: true, quantity: 1){
timeout(time: 60, unit: 'MINUTES') {
script {
sh "docker run --name ${env.DOCKER_NAME} --privileged --volume /dev/bus/usb:/dev/bus/usb --volume /var/run/dbus:/var/run/dbus --net host ${env.DOCKER_IMAGE_TAG} bash -c 'cd /tmp/panda; ./run_automated_tests.sh'"
sh "docker cp ${env.DOCKER_NAME}:/tmp/panda/nosetests.xml test_results_dev.xml"
sh "docker rm ${env.DOCKER_NAME}"
}
}
}
}
}
}
post {
always {
failure {
script {
sh "docker cp ${env.DOCKER_NAME}:/tmp/panda/nosetests.xml test_results_EON.xml"
sh "docker rm ${env.DOCKER_NAME}"
sh "docker rm ${env.DOCKER_NAME} || true"
}
}
always {
junit "test_results*.xml"
}
}
}
}
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.4.0
v1.4.1
2 changes: 1 addition & 1 deletion board/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PROJ_NAME = panda
CFLAGS = -g -Wall
CFLAGS = -g -Wall -Wextra -Wstrict-prototypes -Werror

CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4
CFLAGS += -mhard-float -DSTM32F4 -DSTM32F413xx -mfpu=fpv4-sp-d16 -fsingle-precision-constant
Expand Down
8 changes: 0 additions & 8 deletions board/Makefile.strict

This file was deleted.

17 changes: 11 additions & 6 deletions board/bootstub.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
#endif

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

void puth(unsigned int i) {
UNUSED(i);
}

#include "libc.h"
#include "provision.h"
Expand All @@ -34,11 +39,11 @@ void puth(unsigned int i) {}

#include "spi_flasher.h"

void __initialize_hardware_early() {
void __initialize_hardware_early(void) {
early();
}

void fail() {
void fail(void) {
soft_flasher_start();
}

Expand All @@ -48,7 +53,7 @@ extern void *_app_start[];
// FIXME: sometimes your panda will fail flashing and will quickly blink a single Green LED
// BOUNTY: $200 coupon on shop.comma.ai or $100 check.

int main() {
int main(void) {
__disable_irq();
clock_init();
detect();
Expand Down Expand Up @@ -88,7 +93,7 @@ int main() {
return 0;
good:
// jump to flash
((void(*)()) _app_start[1])();
((void(*)(void)) _app_start[1])();
return 0;
}

8 changes: 4 additions & 4 deletions board/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
#include "stm32f2xx.h"
#endif

#define USB_VID 0xbbaa
#define USB_VID 0xbbaaU

#ifdef BOOTSTUB
#define USB_PID 0xddee
#define USB_PID 0xddeeU
#else
#define USB_PID 0xddcc
#define USB_PID 0xddccU
#endif

#include <stdbool.h>
Expand All @@ -34,7 +34,7 @@
__typeof__ (b) _b = (b); \
(_a > _b) ? _a : _b; })

#define MAX_RESP_LEN 0x40
#define MAX_RESP_LEN 0x40U

#endif

2 changes: 1 addition & 1 deletion board/drivers/adc.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void adc_init(void) {
ADC1->SMPR1 = ADC_SMPR1_SMP12 | ADC_SMPR1_SMP13;
}

uint32_t adc_get(int channel) {
uint32_t adc_get(unsigned int channel) {
// includes length
//ADC1->SQR1 = 0;

Expand Down
Loading

0 comments on commit 1ff59ba

Please sign in to comment.