Bläddra i källkod

retrofit to gcc8/CMake

Sebastien 5 år sedan
förälder
incheckning
f998ea2a52

+ 8 - 0
.pydevproject

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse-pydev version="1.0"?><pydev_project>
+        
+    <pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
+        
+    <pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property>
+    
+</pydev_project>

+ 1 - 0
components/esp-dsp

@@ -0,0 +1 @@
+Subproject commit 8b082c1071497d49346ee6ed55351470c1cb4264

+ 7 - 0
components/platform_config/CMakeLists.txt

@@ -0,0 +1,7 @@
+idf_component_register(SRCS "nvs_utilities.c" "platform_config.c"
+						INCLUDE_DIRS . 
+						INCLUDE_DIRS . ../tools/
+                   REQUIRES nvs_flash json platform_console services vfs
+)
+
+

+ 7 - 0
components/platform_console/CMakeLists.txt

@@ -0,0 +1,7 @@
+set(COMPONENT_ADD_INCLUDEDIRS .)
+
+set(COMPONENT_SRCS "platform_console.c" "cmd_ota.c" "cmd_nvs.c" "cmd_i2ctools.c" "cmd_squeezelite.c" "cmd_system.c" "cmd_wifi.c" )
+
+set(COMPONENT_REQUIRES console nvs_flash spi_flash app_update platform_config vfs pthread wifi-manager)
+
+register_component()

+ 12 - 0
components/platform_console/component.mk

@@ -0,0 +1,12 @@
+#
+# Component Makefile
+#
+# This Makefile should, at the very least, just include $(SDK_PATH)/Makefile. By default,
+# this will take the sources in the src/ directory, compile them and link them into
+# lib(subdirectory_name).a in the build directory. This behaviour is entirely configurable,
+# please read the SDK documents if you need to do this.
+#
+
+COMPONENT_ADD_INCLUDEDIRS := .
+COMPONENT_EXTRA_INCLUDES += $(PROJECT_PATH)/components/tools/
+COMPONENT_EXTRA_INCLUDES += $(PROJECT_PATH)/main

+ 6 - 0
components/squeezelite-ota/CMakeLists.txt

@@ -0,0 +1,6 @@
+idf_component_register(SRCS  "squeezelite-ota.c"
+					  INCLUDE_DIRS . 
+					  REQUIRES console spi_flash console freertos platform_console esp_https_ota
+					  )
+
+

+ 4 - 0
components/tools/CMakeLists.txt

@@ -0,0 +1,4 @@
+idf_component_register(SRCS "utf8.c"  
+						REQUIRES esp_common  pthread 
+                    	INCLUDE_DIRS .
+                    	)

+ 18 - 0
flash_cmd.txt

@@ -0,0 +1,18 @@
+
+====LINUX====
+To flash sequeezelite run the following script:
+./writeSequeezeEsp.sh [PORT_HERE] [BAUD_RATE]
+e.g. ./writeSequeezeEsp.sh /dev/ttyUSB0 115200
+
+====WINDOWS====
+To flash sequeezelite run the following script:
+./writeSequeezeEsp.bat [PORT_HERE] [BAUD_RATE]
+e.g. ./writeSequeezeEsp.bat COM11 115200
+
+If you don't know how to run the BAT file with arguments then you can
+edit the bat file in Notepad. Open the file up and edit the following:
+Change 'set port=%1' to 'set port=[PORT_HERE]'. E.g. 'set port=COM11'
+Change 'set baud=%2' to 'set baud=[BAUD_RATE]'. E.g. 'set baud=115200'
+
+====MANUAL====
+Python esptool.py --port [PORT_HERE] --baud [BAUD_RATE]  write_flash --flash_mode dio --flash_freq 80m --flash_size detect  0x1000 bootloader/bootloader.bin 0x8000 partitions.bin 0xd000 ota_data_initial.bin 0x10000 recovery.bin 0x150000 squeezelite.bin

+ 5 - 0
writeSequeezeEsp.bat

@@ -0,0 +1,5 @@
+echo off
+
+set port=%1
+set baud=%2
+Python esptool.py --port %port% --baud %baud%  write_flash --flash_mode dio --flash_freq 80m --flash_size detect  0x1000 bootloader/bootloader.bin 0x8000 partitions.bin 0xd000 ota_data_initial.bin 0x10000 recovery.bin 0x150000 squeezelite.bin

+ 5 - 0
writeSequeezeEsp.sh

@@ -0,0 +1,5 @@
+#!/bin/bash
+
+port=$1
+baud=$2
+Python esptool.py --port $port --baud $baud  write_flash --flash_mode dio --flash_freq 80m --flash_size detect  0x1000 bootloader/bootloader.bin 0x8000 partitions.bin 0xd000 ota_data_initial.bin 0x10000 recovery.bin 0x150000 squeezelite.bin