Solve the problems pointed out in the comments
This commit is contained in:
parent
417d0d4ccd
commit
ce40edbd11
@ -31,6 +31,5 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <arch/irq.h>
|
||||
#include "riscv_internal.h"
|
||||
|
||||
#endif /* __ARCH_RISCV_INCLUDE_BL602_CHIP_H */
|
||||
|
@ -35,10 +35,6 @@
|
||||
|
||||
#define CLIC_TIMER_ENABLE_ADDRESS (0x02800407)
|
||||
|
||||
/* In mstatus register */
|
||||
|
||||
#define MIE_MSIE (0x1 << 3) /* Machine Software Interrupt Enable */
|
||||
|
||||
/* Map RISC-V exception code to NuttX IRQ */
|
||||
|
||||
/* IRQ 0-15 : (exception:interrupt=0) */
|
||||
@ -54,8 +50,8 @@
|
||||
#define BL602_IRQ_ECALLU (8) /* Environment Call from U-mode */
|
||||
/* 9-10: Reserved */
|
||||
|
||||
#define BL602_IRQ_ECALLM (11) /* Environment Call from M-mode */
|
||||
/* 12-15: Reserved */
|
||||
#define BL602_IRQ_ECALLM (11) /* Environment Call from M-mode */
|
||||
/* 12-15: Reserved */
|
||||
|
||||
/* IRQ 16- : (async event:interrupt=1) */
|
||||
|
||||
@ -231,8 +227,6 @@ extern "C"
|
||||
EXTERN irqstate_t up_irq_save(void);
|
||||
EXTERN void up_irq_restore(irqstate_t);
|
||||
EXTERN irqstate_t up_irq_enable(void);
|
||||
EXTERN void up_disable_irq(int irq);
|
||||
EXTERN void up_enable_irq(int irq);
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
@ -240,3 +234,4 @@ EXTERN void up_enable_irq(int irq);
|
||||
#endif
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARCH_RISCV_INCLUDE_BL602_IRQ_H */
|
||||
|
||||
|
@ -9,13 +9,11 @@ menu "BL602 Peripheral Support"
|
||||
|
||||
config BL602_HAVE_UART0
|
||||
bool
|
||||
default y
|
||||
select UART0_SERIALDRIVER
|
||||
select ARCH_HAVE_SERIAL_TERMIOS
|
||||
|
||||
config BL602_UART0
|
||||
bool "UART0"
|
||||
default y
|
||||
select ARCH_HAVE_UART0
|
||||
|
||||
config BL602_UART0_TX_PIN
|
||||
@ -40,13 +38,11 @@ config BL602_UART0_CTS_PIN
|
||||
|
||||
config BL602_HAVE_UART1
|
||||
bool
|
||||
default y
|
||||
select UART1_SERIALDRIVER
|
||||
select ARCH_HAVE_SERIAL_TERMIOS
|
||||
|
||||
config BL602_UART1
|
||||
bool "UART1"
|
||||
default y
|
||||
select ARCH_HAVE_UART1
|
||||
|
||||
config BL602_UART1_TX_PIN
|
||||
@ -71,9 +67,7 @@ config BL602_UART1_CTS_PIN
|
||||
|
||||
config BL602_TIMER0
|
||||
bool "TIMER0"
|
||||
default y
|
||||
|
||||
config BL602_TIMER1
|
||||
bool "TIMER1"
|
||||
default y
|
||||
endmenu
|
||||
|
@ -24,10 +24,15 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "chip.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Variables
|
||||
****************************************************************************/
|
||||
|
||||
extern uint8_t _heap_start;
|
||||
extern uint8_t _heap_size;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -55,9 +60,6 @@ void up_addregion(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
extern uint8_t _heap_start;
|
||||
extern uint8_t _heap_size;
|
||||
|
||||
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||
{
|
||||
*heap_start = (FAR void *)&_heap_start;
|
||||
|
@ -106,68 +106,5 @@ struct pt_table_stuff_config_s
|
||||
uint32_t crc32; /* Partition entries crc32 */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Inline Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: <Inline function name>
|
||||
*
|
||||
* Description:
|
||||
* Description of the operation of the inline function.
|
||||
*
|
||||
* Input Parameters:
|
||||
* A list of input parameters, one-per-line, appears here along with a
|
||||
* description of each input parameter.
|
||||
*
|
||||
* Returned Value:
|
||||
* Description of the value returned by this function (if any),
|
||||
* including an enumeration of all possible error values.
|
||||
*
|
||||
* Assumptions/Limitations:
|
||||
* Anything else that one might need to know to use this function.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: <Global function name>
|
||||
*
|
||||
* Description:
|
||||
* Description of the operation of the function.
|
||||
*
|
||||
* Input Parameters:
|
||||
* A list of input parameters, one-per-line, appears here along with a
|
||||
* description of each input parameter.
|
||||
*
|
||||
* Returned Value:
|
||||
* Description of the value returned by this function (if any),
|
||||
* including an enumeration of all possible error values.
|
||||
*
|
||||
* Assumptions/Limitations:
|
||||
* Anything else that one might need to know to use this function.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARCH_RISCV_SRC_BL602_HARDWARE_BL602_BOOT2_H */
|
||||
|
@ -18,11 +18,11 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* This is defined in sifive/platform.h, but that can't be included from
|
||||
* assembly. */
|
||||
#define CLINT_CTRL_ADDR 0x02000000
|
||||
#define MSTATUS_FS 0x00006000
|
||||
#define MSTATUS_MIE 0x00000008
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <arch/rv32im/irq.h>
|
||||
|
||||
.section .init
|
||||
.globl bl602_start
|
||||
@ -33,9 +33,11 @@ __start:
|
||||
bl602_start:
|
||||
.cfi_startproc
|
||||
.cfi_undefined ra
|
||||
.option push
|
||||
.option norelax
|
||||
/*disable IRQ*/
|
||||
.option push
|
||||
.option norelax
|
||||
|
||||
/*disable IRQ*/
|
||||
|
||||
li t0, MSTATUS_MIE
|
||||
csrc mstatus, t0
|
||||
|
||||
@ -43,76 +45,76 @@ bl602_start:
|
||||
.option pop
|
||||
la sp, _sp_main
|
||||
|
||||
|
||||
#ifndef RUN_IN_RAM
|
||||
/* Load boot2 partition address */
|
||||
|
||||
la a0, __boot2_pt_addr_src
|
||||
la a1, __boot2_pt_addr_start
|
||||
la a2, __boot2_pt_addr_end
|
||||
bgeu a1, a2, 2f
|
||||
|
||||
1:
|
||||
lw t0, (a0)
|
||||
sw t0, (a1)
|
||||
addi a0, a0, 4
|
||||
addi a1, a1, 4
|
||||
bltu a1, a2, 1b
|
||||
|
||||
2:
|
||||
|
||||
|
||||
/* Load boot2 flashCfg address */
|
||||
|
||||
jal boot2_get_flash_addr
|
||||
la a1, __boot2_flash_cfg_start
|
||||
la a2, __boot2_flash_cfg_end
|
||||
bgeu a1, a2, 2f
|
||||
|
||||
1:
|
||||
lw t0, (a0)
|
||||
sw t0, (a1)
|
||||
addi a0, a0, 4
|
||||
addi a1, a1, 4
|
||||
bltu a1, a2, 1b
|
||||
|
||||
2:
|
||||
#endif
|
||||
|
||||
/* Load data section */
|
||||
|
||||
la a0, _data_load
|
||||
la a1, _data_run
|
||||
la a2, _data_run_end
|
||||
bgeu a1, a2, 2f
|
||||
|
||||
1:
|
||||
lw t0, (a0)
|
||||
sw t0, (a1)
|
||||
addi a0, a0, 4
|
||||
addi a1, a1, 4
|
||||
bltu a1, a2, 1b
|
||||
2:
|
||||
|
||||
2:
|
||||
/* Clear bss section */
|
||||
|
||||
la a0, __bss_start
|
||||
la a1, __bss_end
|
||||
bgeu a0, a1, 3f
|
||||
|
||||
1:
|
||||
sw zero, (a0)
|
||||
addi a0, a0, 4
|
||||
bltu a0, a1, 1b
|
||||
|
||||
/* Clear bss section */
|
||||
|
||||
la a0, __wifi_bss_start
|
||||
la a1, __wifi_bss_end
|
||||
bgeu a0, a1, 3f
|
||||
|
||||
1:
|
||||
sw zero, (a0)
|
||||
addi a0, a0, 4
|
||||
bltu a0, a1, 1b
|
||||
|
||||
3:
|
||||
|
||||
/* Call global constructors */
|
||||
#if 0
|
||||
la a0, __libc_fini_array
|
||||
call atexit
|
||||
call __libc_init_array
|
||||
#endif
|
||||
|
||||
#ifndef __riscv_float_abi_soft
|
||||
/* Enable FPU */
|
||||
li t0, MSTATUS_FS
|
||||
@ -121,56 +123,22 @@ bl602_start:
|
||||
and t1, t1, t0
|
||||
beqz t1, 1f
|
||||
fssr x0
|
||||
|
||||
1:
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_SMP)
|
||||
smp_resume(t0, t1)
|
||||
|
||||
csrr a0, mhartid
|
||||
bnez a0, 2f
|
||||
#endif
|
||||
|
||||
auipc ra, 0
|
||||
addi sp, sp, -16
|
||||
#if __riscv_xlen == 32
|
||||
sw ra, 8(sp)
|
||||
#else
|
||||
sd ra, 8(sp)
|
||||
#endif
|
||||
|
||||
/* argc = argv = 0 */
|
||||
|
||||
li a0, 0
|
||||
li a1, 0
|
||||
call bfl_main
|
||||
#if 0
|
||||
tail exit
|
||||
#endif
|
||||
1:
|
||||
j 1b
|
||||
|
||||
#if defined(ENABLE_SMP)
|
||||
2:
|
||||
la t0, trap_entry
|
||||
csrw mtvec, t0
|
||||
|
||||
csrr a0, mhartid
|
||||
la t1, _sp_main
|
||||
slli t0, a0, 10
|
||||
sub sp, t1, t0
|
||||
|
||||
auipc ra, 0
|
||||
addi sp, sp, -16
|
||||
#if __riscv_xlen == 32
|
||||
sw ra, 8(sp)
|
||||
#else
|
||||
sd ra, 8(sp)
|
||||
#endif
|
||||
|
||||
call secondary_main
|
||||
tail exit
|
||||
|
||||
1:
|
||||
j 1b
|
||||
#endif
|
||||
|
||||
.cfi_endproc
|
||||
|
||||
|
@ -24,49 +24,6 @@
|
||||
|
||||
#include "hardware/bl602_glb.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: <Static function name>
|
||||
*
|
||||
* Description:
|
||||
* Description of the operation of the static function.
|
||||
*
|
||||
* Input Parameters:
|
||||
* A list of input parameters, one-per-line, appears here along with a
|
||||
* description of each input parameter.
|
||||
*
|
||||
* Returned Value:
|
||||
* Description of the value returned by this function (if any),
|
||||
* including an enumeration of all possible error values.
|
||||
*
|
||||
* Assumptions/Limitations:
|
||||
* Anything else that one might need to know to use this function.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
@ -26,49 +26,6 @@
|
||||
#include "hardware/bl602_gpio.h"
|
||||
#include "hardware/bl602_glb.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: <Static function name>
|
||||
*
|
||||
* Description:
|
||||
* Description of the operation of the static function.
|
||||
*
|
||||
* Input Parameters:
|
||||
* A list of input parameters, one-per-line, appears here along with a
|
||||
* description of each input parameter.
|
||||
*
|
||||
* Returned Value:
|
||||
* Description of the value returned by this function (if any),
|
||||
* including an enumeration of all possible error values.
|
||||
*
|
||||
* Assumptions/Limitations:
|
||||
* Anything else that one might need to know to use this function.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -182,3 +139,4 @@ void gpio_init(struct gpio_cfg_s *cfg)
|
||||
|
||||
*p_out = tmp_out;
|
||||
}
|
||||
|
||||
|
@ -25,49 +25,6 @@
|
||||
|
||||
#include "hardware/bl602_hbn.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: <Static function name>
|
||||
*
|
||||
* Description:
|
||||
* Description of the operation of the static function.
|
||||
*
|
||||
* Input Parameters:
|
||||
* A list of input parameters, one-per-line, appears here along with a
|
||||
* description of each input parameter.
|
||||
*
|
||||
* Returned Value:
|
||||
* Description of the value returned by this function (if any),
|
||||
* including an enumeration of all possible error values.
|
||||
*
|
||||
* Assumptions/Limitations:
|
||||
* Anything else that one might need to know to use this function.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -98,3 +55,4 @@ void hbn_set_uart_clk_sel(enum hbn_uart_clk_type_e clk_sel)
|
||||
tmp_val = BL_SET_REG_BITS_VAL(tmp_val, HBN_UART_CLK_SEL, clk_sel);
|
||||
BL_WR_REG(HBN_BASE, HBN_GLB, tmp_val);
|
||||
}
|
||||
|
||||
|
@ -65,3 +65,4 @@ void up_idle(void)
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -40,22 +40,26 @@
|
||||
|
||||
#include "chip.h"
|
||||
|
||||
void bl_irq_enable(unsigned int source)
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static inline void bl_irq_enable(unsigned int source)
|
||||
{
|
||||
*(volatile uint8_t *)(CLIC_HART0_ADDR + CLIC_INTIE + source) = 1;
|
||||
}
|
||||
|
||||
void bl_irq_disable(unsigned int source)
|
||||
static inline void bl_irq_disable(unsigned int source)
|
||||
{
|
||||
*(volatile uint8_t *)(CLIC_HART0_ADDR + CLIC_INTIE + source) = 0;
|
||||
}
|
||||
|
||||
void bl_irq_pending_set(unsigned int source)
|
||||
static inline void bl_irq_pending_set(unsigned int source)
|
||||
{
|
||||
*(volatile uint8_t *)(CLIC_HART0_ADDR + CLIC_INTIP + source) = 1;
|
||||
}
|
||||
|
||||
void bl_irq_pending_clear(unsigned int source)
|
||||
static inline void bl_irq_pending_clear(unsigned int source)
|
||||
{
|
||||
*(volatile uint8_t *)(CLIC_HART0_ADDR + CLIC_INTIP + source) = 0;
|
||||
}
|
||||
@ -251,3 +255,4 @@ irqstate_t up_irq_enable(void)
|
||||
asm volatile("csrrs %0, mstatus, %1" : "=r"(oldstat) : "r"(MSTATUS_MIE));
|
||||
return oldstat;
|
||||
}
|
||||
|
||||
|
@ -103,3 +103,4 @@ void *bl602_dispatch_irq(uint32_t vector, uint32_t *regs)
|
||||
|
||||
return regs;
|
||||
}
|
||||
|
||||
|
@ -193,3 +193,4 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
|
||||
leave_critical_section(flags);
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
@ -982,3 +983,4 @@ int up_putc(int ch)
|
||||
}
|
||||
|
||||
#endif /* USE_SERIALDRIVER */
|
||||
|
||||
|
@ -25,12 +25,16 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "bl602_boot2.h"
|
||||
#include "riscv_internal.h"
|
||||
#include "chip.h"
|
||||
|
||||
#include "bl602_boot2.h"
|
||||
#include "hardware/bl602_hbn.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
@ -115,6 +119,8 @@ uint32_t boot2_get_flash_addr(void)
|
||||
|
||||
void bfl_main(void)
|
||||
{
|
||||
uint32_t tmp_val;
|
||||
|
||||
/* set interrupt vector */
|
||||
|
||||
asm volatile("csrw mtvec, %0" ::"r"((uintptr_t)exception_common + 2));
|
||||
@ -123,6 +129,12 @@ void bfl_main(void)
|
||||
|
||||
bl602_lowsetup();
|
||||
|
||||
/* HBN Config AON pad input and SMT */
|
||||
|
||||
tmp_val = BL_RD_REG(HBN_BASE, HBN_IRQ_MODE);
|
||||
tmp_val = BL_SET_REG_BITS_VAL(tmp_val, HBN_REG_AON_PAD_IE_SMT, 1);
|
||||
BL_WR_REG(HBN_BASE, HBN_IRQ_MODE, tmp_val);
|
||||
|
||||
#ifdef USE_EARLYSERIALINIT
|
||||
up_earlyserialinit();
|
||||
#endif
|
||||
@ -140,3 +152,4 @@ void bfl_main(void)
|
||||
while (1)
|
||||
;
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
@ -447,3 +448,4 @@ int bl602_timer_initialize(FAR const char *devpath, int timer)
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
@ -154,3 +154,4 @@ void up_timer_initialize(void)
|
||||
|
||||
up_enable_irq(BL602_IRQ_MTIMER);
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,5 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <arch/irq.h>
|
||||
#include "riscv_internal.h"
|
||||
|
||||
#endif /* __ARCH_RISCV_INCLUDE_BL602_CHIP_H */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/risc-v/litex/arty_a7/include/board.h
|
||||
* boards/risc-v/bl602/bl602evb/include/board.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@ -58,11 +58,11 @@ extern "C"
|
||||
* Name: litex_boardinitialize
|
||||
****************************************************************************/
|
||||
|
||||
void litex_boardinitialize(void);
|
||||
void bl602_boardinitialize(void);
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_RISC-V_BL602_EVB_INCLUDE_BOARD_H */
|
||||
#endif /* __BOARDS_RISC_V_BL602_BL602EVB_INCLUDE_BOARD_H */
|
||||
|
@ -27,31 +27,12 @@ ARCH_INCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)include
|
||||
|
||||
LDSCRIPT = ld.script
|
||||
|
||||
CINCPATH := ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include}
|
||||
CXXINCPATH := ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include$(DELIM)cxx}
|
||||
|
||||
ARCHINCLUDES += $(CINCPATH)
|
||||
ARCHXXINCLUDES += $(CINCPATH) $(CXXINCPATH)
|
||||
|
||||
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
|
||||
ARCHSCRIPT = -T "${shell cygpath -w $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}"
|
||||
else
|
||||
ARCHSCRIPT = -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
|
||||
endif
|
||||
|
||||
CC = $(CROSSDEV)gcc
|
||||
CXX = $(CROSSDEV)g++
|
||||
CPP = $(CROSSDEV)gcc -E
|
||||
LD = $(CROSSDEV)ld
|
||||
STRIP = $(CROSSDEV)strip --strip-unneeded
|
||||
AR = $(ARCROSSDEV)ar rcs
|
||||
NM = $(ARCROSSDEV)nm
|
||||
OBJCOPY = $(CROSSDEV)objcopy
|
||||
OBJDUMP = $(CROSSDEV)objdump
|
||||
|
||||
ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'}
|
||||
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = -g
|
||||
ASARCHCPUFLAGS += -Wa,-g
|
||||
@ -85,5 +66,3 @@ LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
LDFLAGS += --gc-sections -melf32lriscv
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe
|
||||
|
@ -189,23 +189,10 @@ SECTIONS
|
||||
__freertos_irq_stack_top = .;
|
||||
} >ram_tcm
|
||||
|
||||
|
||||
/*SYMOBOL used in code*/
|
||||
PROVIDE( _ld_bl_static_cli_cmds_start = _bl_static_cli_cmds_start );
|
||||
PROVIDE( _ld_bl_static_cli_cmds_end = _bl_static_cli_cmds_end );
|
||||
|
||||
/*CFG FW used in code*/
|
||||
PROVIDE( _ld_bl_static_cfg_entry_start = _bl_static_fw_cfg_entry_start );
|
||||
PROVIDE( _ld_bl_static_cfg_entry_end = _bl_static_fw_cfg_entry_end );
|
||||
|
||||
/* blog */
|
||||
PROVIDE( _ld_bl_static_blogcomponent_code_start = _bl_static_blogcomponent_code_start );
|
||||
PROVIDE( _ld_bl_static_blogcomponent_code_end = _bl_static_blogcomponent_code_end );
|
||||
PROVIDE( _ld_bl_static_blogfile_code_start = _bl_static_blogfile_code_start );
|
||||
PROVIDE( _ld_bl_static_blogfile_code_end = _bl_static_blogfile_code_end );
|
||||
PROVIDE( _ld_bl_static_blogpri_code_start = _bl_static_blogpri_code_start );
|
||||
PROVIDE( _ld_bl_static_blogpri_code_end = _bl_static_blogpri_code_end );
|
||||
|
||||
|
||||
PROVIDE( _ld_ram_size0 = LENGTH(flash) );
|
||||
PROVIDE( _ld_ram_addr0 = ORIGIN(flash) );
|
||||
PROVIDE( _ld_ram_size1 = LENGTH(ram_tcm) );
|
||||
@ -218,62 +205,5 @@ SECTIONS
|
||||
PROVIDE ( __boot2_pt_addr_src = BOOT2_PT_ADDR );
|
||||
PROVIDE ( __boot2_flash_cfg_src = BOOT2_FLASHCFG_ADDR );
|
||||
|
||||
PROVIDE(xTaskGetTickCount = 0x0000000021017694);
|
||||
PROVIDE(xTaskGetTickCountFromISR = 0x00000000210176aa);
|
||||
PROVIDE(pvPortMalloc = 0x0000000021019662);
|
||||
PROVIDE(vPortFree = 0x000000002101973a);
|
||||
PROVIDE(vTaskNotifyGiveFromISR = 0x00000000210188e8);
|
||||
PROVIDE(vTaskSwitchContext = 0x0000000021017a04);
|
||||
PROVIDE(ulTaskNotifyTake = 0x0000000021018548);
|
||||
PROVIDE(vTaskExitCritical = 0x00000000210183f4);
|
||||
PROVIDE(vTaskEnterCritical = 0x00000000210183e4);
|
||||
PROVIDE(xTaskGetCurrentTaskHandle = 0x0000000021018152);
|
||||
PROVIDE(xQueueSemaphoreTake = 0x0000000021015ce8);
|
||||
PROVIDE(xQueueGenericSend = 0x0000000021015834);
|
||||
PROVIDE(xQueueGenericSendFromISR = 0x0000000021015a4c);
|
||||
PROVIDE(xTaskCreateStatic = 0x00000000210170a2);
|
||||
PROVIDE(xTaskCreate = 0x000000002101713a);
|
||||
PROVIDE(xQueueCreateMutex = 0x0000000021015a1c);
|
||||
PROVIDE(xQueueCreateMutexStatic = 0x0000000021015994);
|
||||
PROVIDE(vQueueDelete = 0x00000000210161d8);
|
||||
PROVIDE(xQueueGenericCreateStatic = 0x00000000210156c2);
|
||||
PROVIDE(xQueueGenericCreate = 0x0000000021015744);
|
||||
PROVIDE(xQueueReceive = 0x0000000021015b8a);
|
||||
PROVIDE(uxQueueMessagesWaiting = 0x0000000021016168);
|
||||
PROVIDE(vTaskDelay = 0x00000000210179c6);
|
||||
PROVIDE(vTaskDelayUntil = 0x0000000021017952);
|
||||
PROVIDE(xPortGetFreeHeapSize = 0x00000000210197ce);
|
||||
PROVIDE(vTaskList = 0x0000000021018408);
|
||||
PROVIDE(xTimerGenericCommand = 0x0000000021018bec);
|
||||
PROVIDE(xTimerCreateTimerTask = 0x0000000021018a9e);
|
||||
PROVIDE(xTimerCreate = 0x0000000021018af6);
|
||||
PROVIDE(xTimerCreateStatic = 0x0000000021018b66);
|
||||
PROVIDE(xQueueCreateCountingSemaphoreStatic = 0x00000000210157c2);
|
||||
PROVIDE(xQueueCreateCountingSemaphore = 0x0000000021015800);
|
||||
PROVIDE(pTrapNetCounter = __global_pointer_head$);
|
||||
PROVIDE(TrapNetCounter = __global_pointer_head$ + 0x58);
|
||||
PROVIDE(vEventGroupDelete = 0x00000000210153be);
|
||||
PROVIDE(xEventGroupWaitBits = 0x0000000021015086);
|
||||
PROVIDE(xEventGroupCreateStatic = 0x0000000021015000);
|
||||
PROVIDE(xEventGroupSetBits = 0x00000000210151e0);
|
||||
PROVIDE(xStreamBufferGenericCreateStatic = 0x00000000210165c0);
|
||||
PROVIDE(xStreamBufferReceive = 0x00000000210169ae);
|
||||
PROVIDE(xStreamBufferSend = 0x00000000210167a8);
|
||||
PROVIDE(pvTimerGetTimerID = 0x0000000021018fd4);
|
||||
PROVIDE(xTaskGenericNotify = 0x00000000210186be);
|
||||
PROVIDE(xTaskGenericNotifyFromISR = 0x00000000210187de);
|
||||
PROVIDE(xQueueGiveMutexRecursive = 0x00000000210159c8);
|
||||
PROVIDE(xQueueTakeMutexRecursive = 0x0000000021015e70);
|
||||
PROVIDE(xTaskGetTickCount2 = 0x000000002101769a);
|
||||
PROVIDE(xQueueGiveFromISR = 0x0000000021015b0e);
|
||||
PROVIDE(vTaskDelete = 0x00000000210171b6);
|
||||
PROVIDE(uxTaskGetStackHighWaterMark = 0x0000000021018110);
|
||||
PROVIDE(pcTaskGetName = 0x00000000210176b6);
|
||||
PROVIDE(vTaskStartScheduler = 0x0000000021017610);
|
||||
PROVIDE(vPortDefineHeapRegions = 0x00000000210197da);
|
||||
PROVIDE(__LD_CONFIG_EM_SEL = __EM_SIZE);
|
||||
|
||||
PROVIDE( _ld_symbol_rom_framework_audio_device_start = _rom_framework_audio_device_start);
|
||||
PROVIDE( _ld_symbol_rom_framework_audio_device_end = _rom_framework_audio_device_end);
|
||||
|
||||
PROVIDE (__LD_CONFIG_EM_SEL = __EM_SIZE);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/risc-v/bl602/evb/src/litex_appinit.c
|
||||
* boards/risc-v/bl602/evb/src/bl602_appinit.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/risc-v/bl602/evb/src/litex_boot.c
|
||||
* boards/risc-v/bl602/evb/src/bl602_boot.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@ -29,8 +29,6 @@
|
||||
#include <nuttx/board.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "hardware/bl602_hbn.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
@ -47,7 +45,7 @@
|
||||
* Name: bl602_boardinitialize
|
||||
*
|
||||
* Description:
|
||||
* All LITEX architectures must provide the following entry point.
|
||||
* All bl602 architectures must provide the following entry point.
|
||||
* This entry point is called early in the initialization -- after all
|
||||
* memory has been configured and mapped but before any devices have been
|
||||
* initialized.
|
||||
@ -56,9 +54,5 @@
|
||||
|
||||
void bl602_boardinitialize(void)
|
||||
{
|
||||
uint32_t tmp_val;
|
||||
|
||||
tmp_val = BL_RD_REG(HBN_BASE, HBN_IRQ_MODE);
|
||||
tmp_val = BL_SET_REG_BITS_VAL(tmp_val, HBN_REG_AON_PAD_IE_SMT, 1);
|
||||
BL_WR_REG(HBN_BASE, HBN_IRQ_MODE, tmp_val);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/risc-v/bl602/evb/src/litex_bringup.c
|
||||
* boards/risc-v/bl602/evb/src/bl602_bringup.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
@ -29,4 +29,5 @@
|
||||
|
||||
int bl602_bringup(void);
|
||||
|
||||
#endif /* __BOARDS_RISCV_BL602_EVB_SRC_ARTY_A7_H */
|
||||
#endif /* __BOARDS_RISCV_BL602_BL602EVB_SRC_BL602EVB_H */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user