mirror of
https://github.com/rvtr/ctr_firmware.git
synced 2025-10-31 07:51:08 -04:00
スキャッタロードを有効時にmainから戻って例外が起こらないように修正。
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_firmware@110 b871894f-2f95-9b40-918c-086798483c85
This commit is contained in:
parent
2b2517c718
commit
ee2e31dfb8
@ -45,6 +45,9 @@ ASM void $Sub$$stupInitSections(void)
|
||||
int main( void )
|
||||
{
|
||||
BromMain();
|
||||
return 0;
|
||||
while (1)
|
||||
{
|
||||
}
|
||||
// never return
|
||||
}
|
||||
|
||||
|
||||
@ -45,6 +45,9 @@ ASM void $Sub$$stupInitSections(void)
|
||||
int main( void )
|
||||
{
|
||||
BromSpMain();
|
||||
return 0;
|
||||
while (1)
|
||||
{
|
||||
}
|
||||
// never return
|
||||
}
|
||||
|
||||
|
||||
@ -16,12 +16,7 @@
|
||||
*---------------------------------------------------------------------------*/
|
||||
#include <brom/os.h>
|
||||
|
||||
void timer_handler(void);
|
||||
|
||||
#if 0 // miya
|
||||
static void i_osTimerInterruptHandler(void);
|
||||
static void i_osWatchdogInterruptHandler( void );
|
||||
#endif
|
||||
static void i_osStartTimer( u32 count, u8 preScale, OSTimerRepeat repeat, OSTimerIntrReq ireq );
|
||||
static void i_osStartWatchdog( u32 count, u8 preScale, OSTimerRepeat repeat, OSTimerIntrReq ireq,
|
||||
OSWatchdogMode watchdogMode );
|
||||
@ -45,49 +40,22 @@ void osInitTimer( void )
|
||||
|
||||
if ( isInit == FALSE )
|
||||
{
|
||||
OSIntrMode intr = osDisableInterrupts();
|
||||
|
||||
isInit = TRUE;
|
||||
|
||||
osTimerClock = OS_TIMER_CLOCK_DEFAULT;
|
||||
|
||||
osStopTimer();
|
||||
osStopWatchdog();
|
||||
osResetWatchdog();
|
||||
osDisableWatchdog();
|
||||
|
||||
osRestoreInterrupts( intr );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: i_osTimerInterruptHandler
|
||||
|
||||
Description: Timer interrupt handler
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
#if 0 // miya
|
||||
static void i_osTimerInterruptHandler( void )
|
||||
{
|
||||
reg_OS_CPUTM_EVT = HW_CPUTM_EVT_FLAG;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: i_osWatchdogInterruptHandler
|
||||
|
||||
Description: Watchdog interrupt handler
|
||||
|
||||
Arguments: None.
|
||||
|
||||
Returns: None.
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
static void i_osWatchdogInterruptHandler( void )
|
||||
{
|
||||
reg_OS_CPUWD_EVT = HW_CPUWD_EVT_FLAG;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: osStartTimerWithUSec
|
||||
|
||||
@ -292,7 +260,12 @@ void osResetWatchdog( void )
|
||||
|
||||
void osDisableWatchdog( void )
|
||||
{
|
||||
reg_OS_WD_DIS = TRUE;
|
||||
OSIntrMode intr = osDisableInterrupts();
|
||||
|
||||
reg_OS_WD_DIS = OSi_WATCHDOG_DISABLE_CODE_0;
|
||||
reg_OS_WD_DIS = OSi_WATCHDOG_DISABLE_CODE_1;
|
||||
|
||||
osRestoreInterrupts( intr );
|
||||
}
|
||||
|
||||
#include <brom/code32.h>
|
||||
|
||||
@ -20,6 +20,10 @@
|
||||
//#define FIRM_ENABLE_JTAG_AT_INIT
|
||||
|
||||
|
||||
static void handler(void)
|
||||
{
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Name: osInitBROM
|
||||
|
||||
@ -51,8 +55,14 @@ void osInitBROM(void)
|
||||
//---- Init Tick
|
||||
osInitTick();
|
||||
|
||||
#if 1
|
||||
//---- Init Alarm
|
||||
// osInitAlarm();
|
||||
osInitAlarm();
|
||||
{
|
||||
static OSAlarm alarm;
|
||||
osSetPeriodicAlarm(&alarm, 0x1000, 0x1000, (OSAlarmHandler)handler, NULL);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define OS_TIMER_CLOCK_DEFAULT HW_CPU_CLOCK
|
||||
#define OS_TIMER_CLOCK_DEFAULT HW_CPU_CLOCK
|
||||
|
||||
#define OSi_WATCHDOG_DISABLE_CODE_0 0x12345678
|
||||
#define OSi_WATCHDOG_DISABLE_CODE_1 0x87654321
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user