Skip to content

Commit

Permalink
chef: Fix building esp32 examples on darwin and some iram optimizatio…
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamdp authored May 21, 2024
1 parent 7e7d2f9 commit 56bebef
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
17 changes: 13 additions & 4 deletions examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,11 +696,20 @@ def main() -> int:
if options.build_target == "esp32":
shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/esp32")
if options.enable_ipv4:
shell.run_cmd(
"sed -i 's/CONFIG_DISABLE_IPV4=y/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/g' sdkconfig ")
if sys.platform == "darwin":
shell.run_cmd(
"sed -i '' 's/CONFIG_DISABLE_IPV4=y/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/g' sdkconfig ")
else:
shell.run_cmd(
"sed -i 's/CONFIG_DISABLE_IPV4=y/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/g' sdkconfig ")
else:
shell.run_cmd(
"sed -i 's/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/CONFIG_DISABLE_IPV4=y/g' sdkconfig ")
if sys.platform == "darwin":
shell.run_cmd(
"sed -i '' 's/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/CONFIG_DISABLE_IPV4=y/g' sdkconfig ")
else:
shell.run_cmd(
"sed -i 's/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/CONFIG_DISABLE_IPV4=y/g' sdkconfig ")

shell.run_cmd("idf.py build")
shell.run_cmd("idf.py build flashing_script")
shell.run_cmd(
Expand Down
1 change: 1 addition & 0 deletions examples/chef/esp32/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ CONFIG_MBEDTLS_HKDF_C=y

# IRAM optimizations
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y

# Increase LwIP IPv6 address number
CONFIG_LWIP_IPV6_NUM_ADDRESSES=6
1 change: 1 addition & 0 deletions examples/chef/esp32/sdkconfig_rpc.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@ CONFIG_MBEDTLS_HKDF_C=y

# IRAM optimizations
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y

CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP=y

0 comments on commit 56bebef

Please sign in to comment.