forked from xuos/xiuos
fit musl for riscv64 boards.
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
|
||||
#ifndef _KENDRYTE_BSP_H
|
||||
#define _KENDRYTE_BSP_H
|
||||
#include "atomic.h"
|
||||
#include "bsp_atomic.h"
|
||||
#include "entry.h"
|
||||
#include "sleep.h"
|
||||
#include "encoding.h"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* @date 2021-04-25
|
||||
*/
|
||||
|
||||
#include <atomic.h>
|
||||
#include <bsp_atomic.h>
|
||||
#include <hardware_uart.h>
|
||||
#include <plic.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#ifndef _KENDRYTE_BSP_H
|
||||
#define _KENDRYTE_BSP_H
|
||||
#include "atomic.h"
|
||||
#include "bsp_atomic.h"
|
||||
#include "entry.h"
|
||||
#include "sleep.h"
|
||||
#include "encoding.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "sysctl.h"
|
||||
#include "hardware_uart.h"
|
||||
#include "utils.h"
|
||||
#include "atomic.h"
|
||||
#include "bsp_atomic.h"
|
||||
|
||||
#define __UART_BRATE_CONST 16
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export CFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -fgnu89-inline -Werror
|
||||
export CFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -fgnu89-inline #-Werror
|
||||
# $(warning, "DEBUG, here add cflags.")
|
||||
# export CFLAGS += -nostdlib -nostdinc -fno-builtin
|
||||
export AFLAGS := -c -mcmodel=medany -march=rv64imafdc -mabi=lp64d -x assembler-with-cpp -ggdb
|
||||
@@ -6,6 +6,15 @@ export LFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl
|
||||
|
||||
export APPLFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
|
||||
|
||||
ifeq ($(CONFIG_LIB_MUSLLIB), y)
|
||||
export LFLAGS += -nostdlib -nostdinc -fno-builtin -nodefaultlibs
|
||||
export LIBCC := -lgcc
|
||||
export LINK_MUSLLIB := $(KERNEL_ROOT)/lib/musllib/libmusl.a
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RESOURCES_LWIP), y)
|
||||
export LINK_LWIP := $(KERNEL_ROOT)/resources/ethernet/LwIP/liblwip.a
|
||||
endif
|
||||
|
||||
export CXXFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#ifndef _KENDRYTE_BSP_H
|
||||
#define _KENDRYTE_BSP_H
|
||||
#include "atomic.h"
|
||||
#include "bsp_atomic.h"
|
||||
#include "entry.h"
|
||||
#include "sleep.h"
|
||||
#include "encoding.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "sysctl.h"
|
||||
#include "hardware_uart.h"
|
||||
#include "utils.h"
|
||||
#include "atomic.h"
|
||||
#include "bsp_atomic.h"
|
||||
|
||||
#define __UART_BRATE_CONST 16
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#ifndef _KENDRYTE_BSP_H
|
||||
#define _KENDRYTE_BSP_H
|
||||
#include "atomic.h"
|
||||
#include "bsp_atomic.h"
|
||||
#include "entry.h"
|
||||
#include "sleep.h"
|
||||
#include "encoding.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "sysctl.h"
|
||||
#include "hardware_uart.h"
|
||||
#include "utils.h"
|
||||
#include "atomic.h"
|
||||
#include "bsp_atomic.h"
|
||||
|
||||
#define __UART_BRATE_CONST 16
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ export AFLAGS := -c -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections
|
||||
### if use USB function, use special lds file because USB uses ITCM
|
||||
|
||||
ifeq ($(CONFIG_LIB_MUSLLIB), y)
|
||||
export LFLAGS += -nostdlib -nostdinc -fno-builtin -nodefaultlibs
|
||||
export LFLAGS += -nostdlib -nostdinc # -fno-builtin -nodefaultlibs
|
||||
export LIBCC := -lgcc
|
||||
export LINK_MUSLLIB := $(KERNEL_ROOT)/lib/musllib/libmusl.a
|
||||
endif
|
||||
|
||||
@@ -116,7 +116,7 @@ void ethernetif_gpio_init(void)
|
||||
GPIO_WritePinOutput(GPIO1, 3, 1);
|
||||
}
|
||||
|
||||
void ETH_BSP_Config(void)
|
||||
int ETH_BSP_Config(void)
|
||||
{
|
||||
static int flag = 0;
|
||||
if(flag == 0)
|
||||
@@ -125,6 +125,7 @@ void ETH_BSP_Config(void)
|
||||
ethernetif_gpio_init();
|
||||
flag = 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ethernetif_phy_init(struct ethernetif *ethernetif,
|
||||
|
||||
@@ -181,7 +181,7 @@ err_t ethernetif1_init(struct netif *netif);
|
||||
*/
|
||||
void ethernetif_input( struct netif *netif);
|
||||
|
||||
void ETH_BSP_Config(void);
|
||||
int ETH_BSP_Config(void);
|
||||
|
||||
int32 lwip_obtain_semaphore(struct netif *netif);
|
||||
|
||||
|
||||
@@ -2,6 +2,16 @@ export CFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffun
|
||||
export AFLAGS := -c -mcmodel=medany -march=rv64imafdc -mabi=lp64d -x assembler-with-cpp -ggdb
|
||||
export LFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-xidatong-riscv64.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
|
||||
|
||||
ifeq ($(CONFIG_LIB_MUSLLIB), y)
|
||||
export LFLAGS += -nostdlib -nostdinc # -fno-builtin -nodefaultlibs
|
||||
export LIBCC := -lgcc
|
||||
export LINK_MUSLLIB := $(KERNEL_ROOT)/lib/musllib/libmusl.a
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RESOURCES_LWIP), y)
|
||||
export LINK_LWIP := $(KERNEL_ROOT)/resources/ethernet/LwIP/liblwip.a
|
||||
endif
|
||||
|
||||
export APPLFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-xidatong-riscv64.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
|
||||
|
||||
export CXXFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#ifndef _KENDRYTE_BSP_H
|
||||
#define _KENDRYTE_BSP_H
|
||||
#include "atomic.h"
|
||||
#include "bsp_atomic.h"
|
||||
#include "entry.h"
|
||||
#include "sleep.h"
|
||||
#include "encoding.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "sysctl.h"
|
||||
#include "hardware_uart.h"
|
||||
#include "utils.h"
|
||||
#include "atomic.h"
|
||||
#include "bsp_atomic.h"
|
||||
|
||||
#define __UART_BRATE_CONST 16
|
||||
|
||||
|
||||
Reference in New Issue
Block a user