forked from xuos/xiuos
repair running error by remove interrupt stack,and repair the uart output problems
This commit is contained in:
parent
d5d7ea74c8
commit
26e8a1a7e8
|
@ -20,7 +20,7 @@ IRQ_Handler:
|
|||
mv fp, sp
|
||||
|
||||
/* switch to interrupt stack */
|
||||
la sp, __stack
|
||||
# la sp, __stack
|
||||
|
||||
/* interrupt handle */
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
// this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations under the License.
|
||||
|
||||
.extern Rv32m1VgeaStart
|
||||
#define EXCEPTION_STACK_SIZE 0x58
|
||||
|
||||
.text
|
||||
|
@ -98,7 +98,7 @@ Reset_Handler:
|
|||
# Enable global interrupt. */
|
||||
# csrsi mstatus, 8
|
||||
|
||||
jal entry
|
||||
jal Rv32m1VgeaStart
|
||||
ebreak
|
||||
|
||||
.size Reset_Handler, . - Reset_Handler
|
||||
|
|
|
@ -18,6 +18,12 @@
|
|||
#include <fsl_intmux.h>
|
||||
|
||||
extern int InitHwUart();
|
||||
extern void entry(void);
|
||||
|
||||
void Rv32m1VgeaStart(void)
|
||||
{
|
||||
entry();
|
||||
}
|
||||
|
||||
void LPIT0_IRQHandler(void)
|
||||
{
|
||||
|
@ -55,21 +61,13 @@ void InitBoardHardware(void)
|
|||
INTMUX_Init(INTMUX0);
|
||||
INTMUX_EnableInterrupt(INTMUX0, 0, PORTC_IRQn);
|
||||
|
||||
/* initialize hardware interrupt */
|
||||
InitHwUart();
|
||||
InitHwTick();
|
||||
InstallConsole("uart0", "uart0_drv", "uart0_dev0");
|
||||
KPrintf("console init completed.\n");
|
||||
|
||||
InitBoardMemory(MEMORY_START_ADDRESS, MEMORY_END_ADDRESS);
|
||||
|
||||
InitHwUart();
|
||||
InstallConsole("uart0", "uart0_drv", "uart0_dev");
|
||||
|
||||
KPrintf("console init completed.\n");
|
||||
KPrintf("board initialization......\n");
|
||||
|
||||
// InitHwTick();
|
||||
KPrintf("memory address range: [0x%08x - 0x%08x], size: %d\n", (x_ubase) MEMORY_START_ADDRESS, (x_ubase) MEMORY_END_ADDRESS, RV32M1VEGA_SRAM_SIZE);
|
||||
/* initialize memory system */
|
||||
|
||||
KPrintf("board init done.\n");
|
||||
KPrintf("start kernel...\n");
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
export CFLAGS := -march=rv32imac -mabi=ilp32 -fno-builtin -fno-exceptions -ffunction-sections -O2 -Os
|
||||
export CFLAGS := -march=rv32imac -mabi=ilp32 -fno-builtin -fno-exceptions -ffunction-sections -O0 -ggdb -Werror
|
||||
export AFLAGS := -c -march=rv32imac -mabi=ilp32 -x assembler-with-cpp -ggdb
|
||||
export LFLAGS := -march=rv32imac -mabi=ilp32 -nostartfiles -Wl,--gc-sections,-Map=XiUOS_rv32m1_vega.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
|
||||
|
||||
export CXXFLAGS := -march=rv32imac -mabi=ilp32 -fno-builtin -fno-exceptions -ffunction-sections -O2 -Os
|
||||
export CXXFLAGS := -march=rv32imac -mabi=ilp32 -fno-builtin -fno-exceptions -ffunction-sections -O0 -ggdb -Werror
|
||||
|
||||
export CROSS_COMPILE ?=/opt/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.1-20190425-1021/bin/riscv-none-embed-
|
||||
|
||||
|
|
|
@ -125,8 +125,8 @@ static uint32 SerialInit(struct SerialDriver *serial_drv, struct BusConfigureInf
|
|||
break;
|
||||
}
|
||||
|
||||
config.enableTx = 0;
|
||||
config.enableRx = 0;
|
||||
config.enableTx = 1;
|
||||
config.enableRx = 1;
|
||||
|
||||
CLOCK_SetIpSrc(kCLOCK_Lpuart0, kCLOCK_IpSrcFircAsync);
|
||||
|
||||
|
|
|
@ -1222,8 +1222,9 @@ void ShowBuddy(void)
|
|||
};
|
||||
}
|
||||
|
||||
KPrintf("\n\033[41;1mlist extern memory information\033[0m\n");
|
||||
|
||||
#ifdef MEM_EXTERN_SRAM
|
||||
KPrintf("\n\033[41;1mlist extern memory information\033[0m\n");
|
||||
for(i = 0; i < EXTSRAM_MAX_NUM; i++) {
|
||||
if(NONE != ExtByteManager[i].done){
|
||||
KPrintf("\nlist extern sram[%d] memory information\n\n",i);
|
||||
|
|
|
@ -74,7 +74,9 @@ void TickAndTaskTimesliceUpdate(void)
|
|||
RoundRobinTaskTimesliceUpdate(task);
|
||||
#elif defined (SCHED_POLICY_RR_REMAINSLICE)
|
||||
task = GetKTaskDescriptor();
|
||||
RoundRobinRemainTaskTimesliceUpdate(task);
|
||||
if(task){
|
||||
RoundRobinRemainTaskTimesliceUpdate(task);
|
||||
}
|
||||
#endif
|
||||
CheckTaskDelay();
|
||||
#ifdef KERNEL_SOFTTIMER
|
||||
|
|
Loading…
Reference in New Issue