Initial commit
This commit is contained in:
commit
a0776e8c4a
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/.vscode
|
||||
/sdkconfig
|
||||
/build
|
||||
/cmake-build*
|
6
CMakeLists.txt
Normal file
6
CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# The following lines of boilerplate have to be in your project's
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(uas-ugv)
|
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@ -0,0 +1,24 @@
|
||||
FROM debian:stretch
|
||||
|
||||
RUN apt-get update && apt-get install -yy \
|
||||
git \
|
||||
wget \
|
||||
make \
|
||||
libncurses-dev \
|
||||
flex \
|
||||
bison \
|
||||
gperf \
|
||||
python \
|
||||
python-serial
|
||||
|
||||
RUN mkdir /esp
|
||||
WORKDIR /esp
|
||||
|
||||
RUN wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz \
|
||||
-O xtensa-esp32-elf.tar.gz
|
||||
RUN tar --extract --verbose --file xtensa-esp32-elf.tar.gz && rm xtensa-esp32-elf.tar.gz
|
||||
|
||||
RUN git clone --branch v3.1.1 --depth 1 --recursive https://github.com/espressif/esp-idf.git
|
||||
|
||||
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/esp/xtensa-esp32-elf/bin \
|
||||
IDF_PATH=/esp/esp-idf
|
4
main/CMakeLists.txt
Normal file
4
main/CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
||||
set(COMPONENT_SRCS "hello_world_main.c")
|
||||
set(COMPONENT_ADD_INCLUDEDIRS "")
|
||||
|
||||
register_component()
|
26
main/Kconfig.projbuild
Normal file
26
main/Kconfig.projbuild
Normal file
@ -0,0 +1,26 @@
|
||||
menu "Example Configuration"
|
||||
|
||||
choice LCD_TYPE
|
||||
prompt "LCD module type"
|
||||
default LCD_TYPE_AUTO
|
||||
help
|
||||
The type of LCD on the evaluation board.
|
||||
|
||||
config LCD_TYPE_AUTO
|
||||
bool "Auto detect"
|
||||
config LCD_TYPE_ST7789V
|
||||
bool "ST7789V (WROVER Kit v2 or v3)"
|
||||
config LCD_TYPE_ILI9341
|
||||
bool "ILI9341 (WROVER Kit v1 or DevKitJ v1)"
|
||||
endchoice
|
||||
|
||||
config LCD_OVERCLOCK
|
||||
bool
|
||||
prompt "Run LCD at higher clock speed than allowed"
|
||||
default "n"
|
||||
help
|
||||
The ILI9341 and ST7789 specify that the maximum clock speed for the SPI interface is 10MHz. However,
|
||||
in practice the driver chips work fine with a higher clock rate, and using that gives a better framerate.
|
||||
Select this to try using the out-of-spec clock rate.
|
||||
|
||||
endmenu
|
40
main/ugv_main.c
Normal file
40
main/ugv_main.c
Normal file
@ -0,0 +1,40 @@
|
||||
/* Hello World Example
|
||||
|
||||
This example code is in the Public Domain (or CC0 licensed, at your option.)
|
||||
|
||||
Unless required by applicable law or agreed to in writing, this
|
||||
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
CONDITIONS OF ANY KIND, either express or implied.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "esp_system.h"
|
||||
#include "esp_spi_flash.h"
|
||||
|
||||
|
||||
void app_main()
|
||||
{
|
||||
printf("Hello world!\n");
|
||||
|
||||
/* Print chip information */
|
||||
esp_chip_info_t chip_info;
|
||||
esp_chip_info(&chip_info);
|
||||
printf("This is ESP32 chip with %d CPU cores, WiFi%s%s, ",
|
||||
chip_info.cores,
|
||||
(chip_info.features & CHIP_FEATURE_BT) ? "/BT" : "",
|
||||
(chip_info.features & CHIP_FEATURE_BLE) ? "/BLE" : "");
|
||||
|
||||
printf("silicon revision %d, ", chip_info.revision);
|
||||
|
||||
printf("%dMB %s flash\n", spi_flash_get_chip_size() / (1024 * 1024),
|
||||
(chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external");
|
||||
|
||||
for (int i = 10; i >= 0; i--) {
|
||||
printf("Restarting in %d seconds...\n", i);
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
}
|
||||
printf("Restarting now.\n");
|
||||
fflush(stdout);
|
||||
esp_restart();
|
||||
}
|
23
uas-ugv.code-workspace
Normal file
23
uas-ugv.code-workspace
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"cmake.preferredGenerators": [
|
||||
"Ninja",
|
||||
"Unix Makefiles"
|
||||
],
|
||||
"cmake.buildDirectory": "${workspaceRoot}/cmake-build",
|
||||
"cmake.configureOnOpen": true
|
||||
},
|
||||
"extensions": {
|
||||
"recommendations": [
|
||||
"ms-vscode.cpptools",
|
||||
"twxs.cmake",
|
||||
"vector-of-bool.cmake-tools",
|
||||
"peterjausovec.vscode-docker"
|
||||
]
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user