Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to esp-idf 5.2.2 #56

Merged
merged 8 commits into from
Aug 26, 2024
Merged
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
6 changes: 3 additions & 3 deletions overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ rec {

esp-idf-esp32 = esp-idf-full.override {
toolsToInclude = [
"xtensa-esp32-elf"
"xtensa-esp-elf"
"esp32ulp-elf"
"openocd-esp32"
"xtensa-esp-elf-gdb"
Expand All @@ -23,7 +23,7 @@ rec {

esp-idf-esp32s2 = esp-idf-full.override {
toolsToInclude = [
"xtensa-esp32s2-elf"
"xtensa-esp-elf"
"esp32ulp-elf"
"openocd-esp32"
"xtensa-esp-elf-gdb"
Expand All @@ -32,7 +32,7 @@ rec {

esp-idf-esp32s3 = esp-idf-full.override {
toolsToInclude = [
"xtensa-esp32s3-elf"
"xtensa-esp-elf"
"esp32ulp-elf"
"openocd-esp32"
"xtensa-esp-elf-gdb"
Expand Down
18 changes: 8 additions & 10 deletions pkgs/esp-idf/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{ rev ? "v5.1.3"
, sha256 ? "sha256-0QsIFOcSx1N15t5po3TyOaNvpzBUfKaFdsRODOBoXCI="
{ rev ? "v5.2.2"
, sha256 ? "sha256-I4YxxSGdQT8twkoFx3zmZhyLTSagmeLD2pygVfY/pEk="
, toolsToInclude ? [
"xtensa-esp-elf-gdb"
"riscv32-esp-elf-gdb"
"xtensa-esp32-elf"
"xtensa-esp32s2-elf"
"xtensa-esp32s3-elf"
"xtensa-esp-elf"
"esp-clang"
"riscv32-esp-elf"
"esp32ulp-elf"
Expand Down Expand Up @@ -40,6 +38,7 @@ let
rev = rev;
sha256 = sha256;
fetchSubmodules = true;
leaveDotGit = true;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be aware, that you also need to change the hash, if you decide to leave the .git directory in there.

};

allTools = callPackage (import ./tools.nix) {
Expand Down Expand Up @@ -73,6 +72,7 @@ let
esp-idf-monitor
esp-idf-size
esp-idf-panic-decoder
pyclang

freertos_gdb

Expand All @@ -91,10 +91,6 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ makeWrapper ];

# Do not preserve file modes when copying templates as the nix store is read-only.
# create-project will fail without this.
patches = [ ./template-modes.patch ];

propagatedBuildInputs = [
# This is in propagatedBuildInputs so that downstream derivations will run
# the Python setup hook and get PYTHONPATH set up correctly.
Expand Down Expand Up @@ -136,5 +132,7 @@ stdenv.mkDerivation rec {
# directory to PYTHONPATH.
ln -s ${customPython} $out/python-env
ln -s ${customPython}/lib $out/lib
'';

echo "5.2.2-joakim" > $out/version.txt
'';
}
21 changes: 19 additions & 2 deletions pkgs/esp-idf/python-packages.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Versions based on
# https://dl.espressif.com/dl/esp-idf/espidf.constraints.v5.1.txt
# on 2023-07-05.
# https://dl.espressif.com/dl/esp-idf/espidf.constraints.v5.2.txt
# on 2024-02-20.

{ stdenv
, lib
Expand Down Expand Up @@ -169,6 +169,22 @@ rec {
};
};

pyclang = buildPythonPackage rec {
pname = "pyclang";
version = "0.4.2";

src = fetchPypi {
inherit pname version;
sha256 = "sha256-vuDZ5yEhyDpCmkXoC+Gr2X5vMK5B46HnktcvBONjxXM=";
};

doCheck = false;

meta = {
homepage = "https://pypi.org/project/pyclang/";
};
};

freertos_gdb = buildPythonPackage rec {
pname = "freertos-gdb";
version = "1.0.2";
Expand Down Expand Up @@ -210,5 +226,6 @@ rec {
homepage = "https://github.com/espressif/esp-idf-panic-decoder";
};
};

}

22 changes: 0 additions & 22 deletions pkgs/esp-idf/template-modes.patch

This file was deleted.

10 changes: 5 additions & 5 deletions pkgs/esp-idf/tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ let
toolFhsEnvTargetPackages = {
xtensa-esp-elf-gdb = pkgs: (with pkgs; [ ]);
riscv32-esp-elf-gdb = pkgs: (with pkgs; [ ]);
xtensa-esp32-elf = pkgs: (with pkgs; [ ]);
xtensa-esp32s2-elf = pkgs: (with pkgs; [ ]);
xtensa-esp32s3-elf = pkgs: (with pkgs; [ ]);
xtensa-esp-elf = pkgs: (with pkgs; [ ]);
esp-clang = pkgs: (with pkgs; [ zlib libxml2 ]);
riscv32-esp-elf = pkgs: (with pkgs; [ ]);
esp32ulp-elf = pkgs: (with pkgs; [ ]);
Expand Down Expand Up @@ -92,8 +90,10 @@ let
installPhase = let
wrapCmd = if (system == "x86_64-linux") || (system == "aarch64-linux") then
''
mv $FILE_PATH $FILE_PATH-unwrapped
makeWrapper ${fhsEnv}/bin/${pname}-env $FILE_PATH --add-flags "$FILE_PATH-unwrapped" ${lib.strings.concatStringsSep " " exportVarsWrapperArgsList}
[ ! -d $out/unwrapped_bin ] && mkdir $out/unwrapped_bin
WRAPPED_FILE_PATH="$out/unwrapped_bin/$(basename $FILE_PATH)"
mv $FILE_PATH $WRAPPED_FILE_PATH
makeWrapper ${fhsEnv}/bin/${pname}-env $FILE_PATH --add-flags $WRAPPED_FILE_PATH ${lib.strings.concatStringsSep " " exportVarsWrapperArgsList}
''
else
''wrapProgram $FILE_PATH ${lib.strings.concatStringsSep " " exportVarsWrapperArgsList}'';
Expand Down