mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-06 13:54:09 +08:00
Compare commits
4 Commits
2a1dc303a3
...
77a30eeec2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
77a30eeec2 | ||
![]() |
ed39122b89 | ||
![]() |
cd0938fc22 | ||
![]() |
64f64ffc42 |
@ -25,7 +25,7 @@ SOURCES := ../libn3ds/kernel/source ../libn3ds/source ../libn3ds/source/drivers
|
||||
DATA :=
|
||||
INCLUDES := ../libn3ds/include ../libn3ds/include/arm11 ../libn3ds/kernel/include ../libn3ds/thirdparty ../include \
|
||||
../thirdparty
|
||||
DEFINES := -DARM11 -D_3DS -DLIBN3DS_LEGACY=1 -DVERS_STRING=\"$(VERS_STRING)\" \
|
||||
DEFINES := -D__ARM11__ -D__3DS__ -DLIBN3DS_LEGACY=1 -DVERS_STRING=\"$(VERS_STRING)\" \
|
||||
-DVERS_MAJOR=$(VERS_MAJOR) -DVERS_MINOR=$(VERS_MINOR)
|
||||
ASSETS :=
|
||||
|
||||
@ -38,11 +38,11 @@ endif
|
||||
#---------------------------------------------------------------------------------
|
||||
ARCH := -march=armv6k+vfpv2 -mtune=mpcore -mfloat-abi=hard -mtp=soft -marm -mthumb-interwork
|
||||
|
||||
CFLAGS := $(ARCH) -std=c17 -O2 -gdwarf-4 -mword-relocations \
|
||||
CFLAGS := $(ARCH) -std=c23 -O2 -gdwarf-4 -mword-relocations \
|
||||
-ffunction-sections -fno-math-errno -Wall -Wextra
|
||||
CFLAGS += $(INCLUDE) $(DEFINES)
|
||||
|
||||
CXXFLAGS := $(ARCH) -std=c++17 -O2 -flto -gdwarf-4 -fno-rtti -fno-exceptions \
|
||||
CXXFLAGS := $(ARCH) -std=c++23 -O2 -flto -gdwarf-4 -fno-rtti -fno-exceptions \
|
||||
-mword-relocations -ffunction-sections -fno-math-errno -Wall -Wextra
|
||||
CXXFLAGS += $(INCLUDE) $(DEFINES)
|
||||
|
||||
|
@ -22,7 +22,7 @@ SOURCES := ../libn3ds/source ../libn3ds/source/drivers/mmc ../libn3ds/source/dr
|
||||
../libn3ds/source/arm9/drivers ../libn3ds/thirdparty/fatfs ../source/arm9
|
||||
DATA :=
|
||||
INCLUDES := ../libn3ds/include ../libn3ds/include/arm9 ../libn3ds/thirdparty ../include ../thirdparty
|
||||
DEFINES := -DARM9 -D_3DS -DLIBN3DS_LEGACY=1 -DVERS_STRING=\"$(VERS_STRING)\" \
|
||||
DEFINES := -D__ARM9__ -D__3DS__ -DLIBN3DS_LEGACY=1 -DVERS_STRING=\"$(VERS_STRING)\" \
|
||||
-DVERS_MAJOR=$(VERS_MAJOR) -DVERS_MINOR=$(VERS_MINOR)
|
||||
|
||||
ifneq ($(strip $(NO_DEBUG)),)
|
||||
@ -34,11 +34,11 @@ endif
|
||||
#---------------------------------------------------------------------------------
|
||||
ARCH := -march=armv5te -mtune=arm946e-s -mfloat-abi=soft -mtp=soft -marm -mthumb-interwork
|
||||
|
||||
CFLAGS := $(ARCH) -std=c17 -O2 -gdwarf-4 -flto -mword-relocations \
|
||||
CFLAGS := $(ARCH) -std=c23 -O2 -gdwarf-4 -flto -mword-relocations \
|
||||
-ffunction-sections -Wall -Wextra
|
||||
CFLAGS += $(INCLUDE) $(DEFINES)
|
||||
|
||||
CXXFLAGS := $(ARCH) -std=c++17 -O2 -gdwarf-4 -flto -fno-rtti -fno-exceptions \
|
||||
CXXFLAGS := $(ARCH) -std=c++23 -O2 -gdwarf-4 -flto -fno-rtti -fno-exceptions \
|
||||
-mword-relocations -ffunction-sections -Wall -Wextra
|
||||
CXXFLAGS += $(INCLUDE) $(DEFINES)
|
||||
|
||||
|
@ -38,7 +38,7 @@ enum
|
||||
|
||||
|
||||
const char* oafResult2String(Result res);
|
||||
#ifdef ARM11
|
||||
#ifdef __ARM11__
|
||||
void printError(Result res);
|
||||
void printErrorWaitInput(Result res, u32 waitKeys);
|
||||
#endif // ifdef ARM11
|
||||
#endif // ifdef __ARM11__
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "error_codes.h"
|
||||
#include "fatfs/source/ff.h"
|
||||
#include "fatfs/ff.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
|
@ -7,8 +7,8 @@
|
||||
/* storage control modules to the FatFs module with a defined API. */
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
#include "fatfs/source/ff.h" /* Obtains integer types */
|
||||
#include "fatfs/source/diskio.h" /* Declarations of disk functions */
|
||||
#include "fatfs/ff.h" /* Obtains integer types */
|
||||
#include "fatfs/diskio.h" /* Declarations of disk functions */
|
||||
#include "types.h"
|
||||
#include "drivers/tmio.h"
|
||||
#include "drivers/mmc/sdmmc.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
/* A Sample Code of User Provided OS Dependent Functions for FatFs */
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
#include "fatfs/source/ff.h"
|
||||
#include "fatfs/ff.h"
|
||||
|
||||
|
||||
#if FF_USE_LFN == 3 /* Use dynamic memory allocation */
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "types.h"
|
||||
#include "error_codes.h"
|
||||
#include "fs.h"
|
||||
#include "fatfs/source/ff.h"
|
||||
#include "fatfs/ff.h"
|
||||
|
||||
|
||||
static const char *const g_fsPathTable[FS_MAX_DRIVES] = {FS_DRIVE_NAMES};
|
||||
|
@ -744,8 +744,8 @@ u32 SDMMC_getCid(const u8 devNum, u32 cidOut[4])
|
||||
return SDMMC_ERR_NONE;
|
||||
}
|
||||
|
||||
#include "fatfs/source/ff.h" // Needed for the "byte" type used in diskio.h.
|
||||
#include "fatfs/source/diskio.h"
|
||||
#include "fatfs/ff.h" // Needed for the "byte" type used in diskio.h.
|
||||
#include "fatfs/diskio.h"
|
||||
u8 SDMMC_getDiskStatus(const u8 devNum)
|
||||
{
|
||||
if(devNum > SDMMC_MAX_DEV_NUM) return STA_NODISK | STA_NOINIT;
|
||||
|
@ -19,10 +19,10 @@
|
||||
#include "types.h"
|
||||
#include "ipc_handler.h"
|
||||
#include "drivers/pxi.h"
|
||||
#ifdef ARM9
|
||||
#ifdef __ARM9__
|
||||
#include "arm9/drivers/interrupt.h"
|
||||
#include "arm9/drivers/ndma.h"
|
||||
#elif ARM11
|
||||
#elif __ARM11__
|
||||
#include "arm11/fmt.h"
|
||||
#include "arm11/drivers/interrupt.h"
|
||||
#endif
|
||||
@ -35,23 +35,23 @@ noreturn void __fb_assert(const char *const str, u32 line)
|
||||
{
|
||||
enterCriticalSection();
|
||||
|
||||
#ifdef ARM9
|
||||
#ifdef __ARM9__
|
||||
// Get rid of the warnings.
|
||||
(void)str;
|
||||
(void)line;
|
||||
PXI_sendCmd(IPC_CMD11_PANIC, NULL, 0);
|
||||
#elif ARM11
|
||||
#elif __ARM11__
|
||||
ee_printf("Assertion failed: %s:%" PRIu32, str, line);
|
||||
//PXI_sendCmd(IPC_CMD9_PANIC, NULL, 0);
|
||||
#endif
|
||||
|
||||
while(1)
|
||||
{
|
||||
#ifdef ARM9
|
||||
#ifdef __ARM9__
|
||||
const u32 color = RGB8_to_565(0, 0, 255)<<16 | RGB8_to_565(0, 0, 255);
|
||||
NDMA_fill((u32*)FRAMEBUF_BOT_A_1, color, SCREEN_SIZE_BOT);
|
||||
NDMA_fill((u32*)FRAMEBUF_BOT_A_2, color, SCREEN_SIZE_BOT);
|
||||
#elif ARM11
|
||||
#elif __ARM11__
|
||||
__wfi();
|
||||
#endif
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "oaf_error_codes.h"
|
||||
#include "drivers/gfx.h"
|
||||
#ifdef ARM11
|
||||
#ifdef __ARM11__
|
||||
#include "arm11/fmt.h"
|
||||
#include "arm11/drivers/hid.h"
|
||||
#endif
|
||||
@ -36,7 +36,7 @@ const char* oafResult2String(Result res)
|
||||
return (res < CUSTOM_ERR_OFFSET ? result2String(res) : oafResultStrings[res - CUSTOM_ERR_OFFSET]);
|
||||
}
|
||||
|
||||
#ifdef ARM11
|
||||
#ifdef __ARM11__
|
||||
void printError(Result res)
|
||||
{
|
||||
// @MERGE 231006 START
|
||||
@ -65,4 +65,4 @@ void printErrorWaitInput(Result res, u32 waitKeys)
|
||||
if(hidGetExtraKeys(0) & (KEY_POWER_HELD | KEY_POWER)) break;
|
||||
}
|
||||
}
|
||||
#endif // ifdef ARM11
|
||||
#endif // ifdef __ARM11__
|
||||
|
Loading…
x
Reference in New Issue
Block a user