Skip to content
Open
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
4 changes: 4 additions & 0 deletions esp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -fomit-frame-pointer")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fomit-frame-pointer")


include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(tiny386)
26 changes: 25 additions & 1 deletion esp/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,38 @@ dependencies:
registry_url: https://components.espressif.com
type: service
version: 1.1.2
espressif/usb_host_hid:
component_hash: 824d49e67771af546c29d916bd8d7d3526cd2ff5e082d9021cab66d5f9c2b9bc
dependencies:
- name: idf
require: private
version: '>=4.4'
- name: espressif/usb
registry_url: https://components.espressif.com
require: public
rules:
- if: idf_version >=6.0
- if: target not in ["linux"]
version: ^1.0.0
source:
registry_url: https://components.espressif.com/
type: service
targets:
- esp32s2
- esp32s3
- esp32p4
- esp32h4
- linux
version: 1.0.4
idf:
source:
type: idf
version: 5.2.6
direct_dependencies:
- espressif/esp_lcd_axs15231b
- espressif/esp_lcd_st7701
- espressif/usb_host_hid
- idf
manifest_hash: 26ab95a46a853deb322a62948df484e8d2884d3261f5e14c123bb2c7c815bbdd
manifest_hash: 9471048bf42ff958751b9ce17ee25039b0a9492bfc573d97e8b456fd607e0eb7
target: esp32s3
version: 2.0.0
2 changes: 2 additions & 0 deletions esp/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ idf_component_register(SRCS "esp_main.c"
"lcd_st7701.c"
"i2s.c"
"storage.c"
"usb_hid.c"
"usb_input.c"
INCLUDE_DIRS "")

# XXX
Expand Down
10 changes: 7 additions & 3 deletions esp/main/esp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,15 @@ void vga_task(void *arg);
void i2s_main();
void wifi_main(const char *, const char *);
void storage_init(void);
void usb_setup(void);

struct esp_ini_config {
const char *filename;
char ssid[16];
char pass[32];
};

static void i386_task(void *arg)
IRAM_ATTR static void i386_task(void *arg)
{
struct esp_ini_config *config = arg;
int core_id = esp_cpu_get_core_id();
Expand Down Expand Up @@ -273,12 +274,15 @@ void app_main(void)
break;
}
}

usb_setup();

if (config.ssid[0]) {
wifi_main(config.ssid, config.pass);
}

if (psram) {
xTaskCreatePinnedToCore(i386_task, "i386_main", 4096, &config, 3, NULL, 1);
xTaskCreatePinnedToCore(vga_task, "vga_task", 4096, NULL, 0, NULL, 0);
xTaskCreatePinnedToCore(i386_task, "i386_main", 4096, &config, 20, NULL, 1);
xTaskCreatePinnedToCore(vga_task, "vga_task", 4096, NULL, 5, NULL, 0);
}
}
1 change: 1 addition & 0 deletions esp/main/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ dependencies:
# public: true
espressif/esp_lcd_axs15231b: ==1.0.0
espressif/esp_lcd_st7701: '*'
usb_host_hid: "^1.0.1"
Loading