1
0
Fork 0

Part 1: Build System

Este commit está contenido en:
Austin Morlan 2020-05-09 19:07:57 -07:00
commit e6687c543c
Firmado por: austin
ID de clave GPG: FD6B27654AF5E348
Se han modificado 8 ficheros con 99 adiciones y 0 borrados

2
.gitignore vendido Archivo normal
Ver fichero

@ -0,0 +1,2 @@
sdkconfig

9
CMakeLists.txt Archivo normal
Ver fichero

@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.5)
set(EXTRA_COMPONENT_DIRS "src")
set(COMPONENTS "esptool_py src")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(game)

21
LICENSE Archivo normal
Ver fichero

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Austin Morlan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

9
README.md Archivo normal
Ver fichero

@ -0,0 +1,9 @@
# Embedded Game Programming
* Get the [ESP-IDF v4.0](https://github.com/espressif/esp-idf/releases/tag/v4.0)
* Follow Steps 1 through 3 of the [Documentation](https://docs.espressif.com/projects/esp-idf/en/v4.0/get-started/index.html#step-1-install-prerequisites)
* Modify the `export.sh` script in this directory and fill out `IDF_PATH` and `IDF_TOOLS_PATH`
* `IDF_PATH` is the extracted ESP-IDF
* `IDF_TOOLS_PATH` is the path to the toolchain
* `source export.sh`

24
export.sh Archivo normal
Ver fichero

@ -0,0 +1,24 @@
#!/usr/bin/env bash
IDF_PATH=
IDF_TOOLS_PATH=
if [ -z "$IDF_PATH" ]
then
echo "IDF_PATH not set"
return
fi
if [ -z "$IDF_TOOLS_PATH" ]
then
echo "IDF_TOOLS_PATH not set"
return
fi
export IDF_PATH
export IDF_TOOLS_PATH
source $IDF_PATH/export.sh

13
sdkconfig.defaults Archivo normal
Ver fichero

@ -0,0 +1,13 @@
# Set flash size to 16MB
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
# Set CPU frequency to 80MHz
CONFIG_ESP32_DEFAULT_CPU_FREQ_80=y
# Enable SPI RAM and allocate with heap_caps_malloc()
CONFIG_ESP32_SPIRAM_SUPPORT=y
CONFIG_SPIRAM_USE_CAPS_ALLOC=y
# Enable optimizations
CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y

5
src/CMakeLists.txt Archivo normal
Ver fichero

@ -0,0 +1,5 @@
idf_component_register(
SRCS "main.c"
INCLUDE_DIRS ""
PRIV_REQUIRES "")

16
src/main.c Archivo normal
Ver fichero

@ -0,0 +1,16 @@
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <stdio.h>
void app_main(void)
{
for (;;)
{
printf("Hello World!\n");
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
// Should never get here
esp_restart();
}