Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 0 additions & 120 deletions .github/workflows/codeql_intech.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/fail_on_error.py

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ binary
grid_esp/dependencies.lock
lists.py
out.json
codeql-db
iperf
vmp/build
tags
Expand Down
67 changes: 32 additions & 35 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,44 @@
# Use the base image
FROM docker.io/espressif/idf:v5.5
FROM debian:trixie

# Install pico sdk required dependencies
RUN apt update && \
apt install -y git python3 python3-pip cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential xxd && \
mkdir -p pico && \
RUN apt-get update

# Dependencies of esp-idf
RUN apt -y install git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0

# Clone esp-idf
RUN git clone -b v5.5 --recursive https://github.com/espressif/esp-idf.git

# Install tools used by esp-idf for esp32s3
WORKDIR /esp-idf
RUN ./install.sh esp32s3 > install-sh.log 2>&1
WORKDIR /

ENV IDF_PATH=/esp-idf
ENTRYPOINT ["/esp-idf/tools/docker/entrypoint.sh"]

# Install pico sdk and build dependencies
RUN apt-get update && \
apt-get install -y git python3 python3-pip cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential xxd

# Clone pico sdk
RUN mkdir -p pico && \
cd pico && \
git clone https://github.com/raspberrypi/pico-sdk.git --branch 2.1.1 && \
cd pico-sdk/ && \
git submodule update --init && \
cd ../.. && \
\
git clone https://github.com/emscripten-core/emsdk.git && \
git submodule update --init

# Install emscripten sdk
RUN git clone https://github.com/emscripten-core/emsdk.git && \
cd emsdk && \
git pull && \
./emsdk install latest && \
./emsdk activate latest && \
. ./emsdk_env.sh && \
cd ..
./emsdk activate latest

WORKDIR /

ENV PICO_SDK_PATH=/pico/pico-sdk

# Install picotool
RUN apt install libusb-1.0-0-dev
RUN apt-get install -y libusb-1.0-0-dev
RUN git clone --depth 1 --branch 2.1.1 https://github.com/raspberrypi/picotool.git
RUN mkdir -p picotool/build
WORKDIR /picotool
Expand All @@ -36,24 +50,11 @@ WORKDIR /

ENV EMSDK=/emsdk EM_CONFIG=/emsdk/.emscripten EMSDK_NODE=/emsdk/node/14.18.2_64bit/bin/node PATH=/emsdk:/emsdk/upstream/emscripten:/emsdk/upstream/bin:/emsdk/node/14.18.2_64bit/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# Set up environment variables
ENV CODEQL_HOME=/opt/codeql
ENV PATH="${CODEQL_HOME}/codeql:${PATH}"

# Install CodeQL CLI tools
RUN mkdir -p ${CODEQL_HOME} && \
curl -L https://github.com/github/codeql-cli-binaries/releases/latest/download/codeql-linux64.zip -o ${CODEQL_HOME}/codeql.zip && \
unzip ${CODEQL_HOME}/codeql.zip -d ${CODEQL_HOME} && \
rm ${CODEQL_HOME}/codeql.zip && \
codeql --version

RUN cd ${CODEQL_HOME} && git clone --recursive https://github.com/github/codeql.git codeql-repo

RUN apt update && \
apt install -y socat
RUN apt-get update && \
apt-get install -y socat

# Install pre-commit from pip
RUN apt install -y pre-commit
RUN python3 -m pip install --break-system-packages pre-commit
RUN pre-commit --version

# Copy pre-commit hooks and create a git directory,
Expand All @@ -65,10 +66,6 @@ RUN pre-commit install-hooks
# Add /project as a safe git repository
RUN git config --global --add safe.directory /project

# Patch esp_efuse_startup.c
COPY ./patch_esp_efuse_startup.sh /
RUN ./patch_esp_efuse_startup.sh

# Patch FreeRTOSConfig.h
COPY ./patch_esp_trace_include.sh /
RUN ./patch_esp_trace_include.sh
Expand Down
1 change: 1 addition & 0 deletions grid_common/grid_ain.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "grid_ain.h"

#include <assert.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down
2 changes: 2 additions & 0 deletions grid_common/grid_asc.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "grid_asc.h"

#include <assert.h>

void grid_asc_array_set_factors(struct grid_asc* asc, size_t capacity, uint8_t start, uint8_t length, uint8_t factor) {

assert(start < capacity);
Expand Down
2 changes: 2 additions & 0 deletions grid_common/grid_cal.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "grid_cal.h"

#include <assert.h>
#include <stdlib.h>

struct grid_cal_model grid_cal_state = {0};
Expand Down Expand Up @@ -233,4 +234,5 @@ uint16_t grid_cal_next(struct grid_cal_model* cal, uint8_t channel, uint16_t in)
}

assert(0);
return 0;
}
1 change: 1 addition & 0 deletions grid_common/grid_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "grid_config.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "tomlc99/toml.h"
Expand Down
1 change: 1 addition & 0 deletions grid_common/grid_led.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "grid_led.h"

#include <assert.h>
#include <stdlib.h>
#include <string.h>

Expand Down
1 change: 1 addition & 0 deletions grid_common/grid_littlefs.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "grid_littlefs.h"

#include <assert.h>
#include <limits.h>

#include "grid_platform.h"
Expand Down
1 change: 1 addition & 0 deletions grid_common/grid_lua_api.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "grid_lua_api.h"

#include <assert.h>
#include <stdlib.h>
#include <string.h>

Expand Down
1 change: 1 addition & 0 deletions grid_common/grid_module.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "grid_module.h"

#include <assert.h>
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
Expand Down
1 change: 1 addition & 0 deletions grid_common/grid_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "grid_decode.h"
Expand Down
1 change: 1 addition & 0 deletions grid_common/grid_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct grid_transport grid_transport_state;
Expand Down
1 change: 1 addition & 0 deletions grid_common/grid_ui_button.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "grid_ui_button.h"

#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
Expand Down
1 change: 1 addition & 0 deletions grid_common/grid_ui_endless.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "grid_ui_endless.h"

#include <assert.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
Expand Down
1 change: 1 addition & 0 deletions grid_common/grid_ui_potmeter.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "grid_ui_potmeter.h"

#include <assert.h>
#include <stdlib.h>
#include <string.h>

Expand Down
Binary file added grid_esp/bootloader/apps/blinky.uf2
Binary file not shown.
Binary file added grid_esp/bootloader/apps/update-tinyuf2.uf2
Binary file not shown.
Binary file modified grid_esp/bootloader/bootloader.bin
Binary file not shown.
Binary file modified grid_esp/bootloader/combined.bin
Binary file not shown.
5 changes: 5 additions & 0 deletions grid_esp/bootloader/flash_args
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--flash_mode dio --flash_freq 80m --flash_size 8MB
0x0 bootloader/bootloader.bin
0x410000 tinyuf2.bin
0x8000 partition_table/partition-table.bin
0xe000 ota_data_initial.bin
Binary file modified grid_esp/bootloader/tinyuf2.bin
Binary file not shown.
Loading