Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Kconfig & idf.py build #16

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build/
sdkconfig
sdkconfig.old
*.nes

8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 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)

set(SDKCONFIG_DEFAULTS sdkconfig.defaults)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(nesemu)
5 changes: 5 additions & 0 deletions components/nofrendo-esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
idf_component_register(
SRC_DIRS "."
INCLUDE_DIRS "."
REQUIRES nofrendo
)
18 changes: 12 additions & 6 deletions components/nofrendo-esp32/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -43,35 +43,41 @@ config HW_LCD_TYPE
default 1 if HW_LCD_TYPE_ST


config HW_LCD_MISO_GPIO_CUST
int "LCD MISO pin"
depends on HW_CUSTOM
range 1 35
default 25

config HW_LCD_MOSI_GPIO_CUST
int "LCD MOSI pin"
depends on HW_CUSTOM
range 1 35
default 25

default 23
config HW_LCD_CLK_GPIO_CUST
int "LCD CLK pin"
depends on HW_CUSTOM
range 1 35
default 23
default 19

config HW_LCD_CS_GPIO_CUST
int "LCD CS pin"
depends on HW_CUSTOM
range 1 35
default 19
default 22

config HW_LCD_DC_GPIO_CUST
int "LCD DC pin"
depends on HW_CUSTOM
range 1 35
default 22
default 21

config HW_LCD_RESET_GPIO_CUST
int "LCD RESET pin"
depends on HW_CUSTOM
range 1 35
default 21
default 18

config HW_LCD_BL_GPIO_CUST
int "LCD Backlight Enable pin"
Expand Down
5 changes: 5 additions & 0 deletions components/nofrendo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
idf_component_register(
SRC_DIRS "cpu" "libsnss" "nes" "sndhrdw" "mappers" "."
INCLUDE_DIRS "cpu" "libsnss" "nes" "sndhrdw" "."
)
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-error=char-subscripts -Wno-error=attributes -DNOFRENDO_DEBUG)
2 changes: 1 addition & 1 deletion components/nofrendo/libsnss/libsnss.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ SNSS_WriteFileHeader (SNSS_FILE *snssFile)
char writeBuffer[8];

/* always place the SNSS tag in this field */
strncpy (&writeBuffer[0], "SNSS", 4);
memcpy (&writeBuffer[0], "SNSS", 4);
tempInt = swap32 (snssFile->headerBlock.numberOfBlocks);
writeBuffer[4] = ((char *) &tempInt)[0];
writeBuffer[5] = ((char *) &tempInt)[1];
Expand Down
2 changes: 1 addition & 1 deletion components/nofrendo/nes/nes_rom.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ rominfo_t *rom_load(const char *filename)
if (rom_allocsram(rominfo))
goto _fail;

rom_loadtrainer(&rom, rominfo);
rom_loadtrainer(&rom, rominfo);

if (rom_loadrom(&rom, rominfo))
goto _fail;
Expand Down
4 changes: 4 additions & 0 deletions main/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
idf_component_register(
SRC_DIRS "."
INCLUDE_DIRS ""
)
281 changes: 0 additions & 281 deletions sdkconfig

This file was deleted.

Loading