make: add hifive1 to BOARD_INSUFFICIENT_MEMORY

Added HiFive1 to BOARD_INSUFFICIENT_MEMORY list for examples and tests that are too big to fit

build: fixed missing syscall and cpuid failures

Added missing syscall stubs for nanostubs and fixed compile error with cpuid periph

build: fixed whitespace error

build: add hifive1 to more BOARD_INSUFFICIENT_MEMORY

doc: fixed doxygen warnings

Addressed Doxygen warnings in source file comments

doc: more doxygen fixes

doc: even more doxygen fixes

doc: more changes

build: fix pedantic and rdci_simple build failures

make: exclude lua
This commit is contained in:
kenrabold 2018-04-16 13:35:32 -07:00
parent 619dd9ee3b
commit db4d67c4fd
24 changed files with 110 additions and 76 deletions

View File

@ -1,6 +1,7 @@
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_cpuid
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_pwm
#FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_rtc
FEATURES_PROVIDED += periph_rtt
#FEATURES_PROVIDED += periph_spi

View File

@ -7,11 +7,11 @@
*/
/**
* @ingroup boards_hifive HiFive1
* @ingroup boards_hifive
* @{
*
* @file
* @brief Support for the HiFive1 RISC-V board
* @brief Support for the SiFive HiFive1 RISC-V board
*
* @author Ken Rabold, JP Bonn
*

View File

@ -7,13 +7,13 @@
*/
/**
* @defgroup boards_hifive
* @defgroup boards_hifive SiFive HiFive1 RISC-V board
* @ingroup boards
* @brief Support for the HiFive1 RISC-V board
* @brief Support for the SiFive HiFive1 RISC-V board
* @{
*
* @file
* @brief Board specific definitions for the HiFive1 RISC-V board
* @brief Board specific definitions for the SiFive HiFive1 RISC-V board
*
* @author Ken Rabold
*/
@ -46,6 +46,7 @@ extern "C" {
#define LED2_ON gpio_clear(LED2_PIN)
#define LED2_OFF gpio_set(LED2_PIN)
#define LED2_TOGGLE gpio_toggle(LED2_PIN)
/** @} */
/**
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
@ -54,8 +55,6 @@ void board_init(void);
/**
* @brief Initialize the board clock to use PLL and faster SPI access.
* @detail This must be done before UART initialization. RIOT assumes
* newlib initializes the UART in the _init() routine.
*/
void board_init_clock(void);

View File

@ -7,9 +7,7 @@
*/
/**
* @defgroup boards_hifive HiFive1
* @ingroup boards
* @brief Support for the HiFive1 RISC-V board
* @ingroup boards_hifive
* @{
*
* @file

View File

@ -7,4 +7,6 @@ USEMODULE += sifive_drivers_fe310
USEMODULE += periph
USEMODULE += periph_pm
CFLAGS += -Wno-pedantic
include $(RIOTMAKE)/arch/riscv.inc.mk

View File

@ -1,4 +1,3 @@
/*
* Copyright (C) 2017 JP Bonn
*
@ -41,8 +40,7 @@ static void check_context_switch_frame_alignment(void)
"Stack pointer should be 16 byte aligned");
_Static_assert(sizeof(struct context_switch_frame) == CONTEXT_FRAME_SIZE,
"context_switch_frame size mismatch");
CHECK_OFFSET(filler0);
CHECK_OFFSET(filler1);
CHECK_OFFSET(pad);
CHECK_OFFSET(pc);
CHECK_OFFSET(s0);
CHECK_OFFSET(s1);

View File

@ -1,4 +1,3 @@
/*
* Copyright (C) 2017 JP Bonn
*
@ -8,9 +7,7 @@
*/
/**
* @defgroup cpu_fe310
* @ingroup cpu
* @brief Freedom E cpu
* @ingroup cpu_fe310
* @{
*
* @file
@ -32,59 +29,61 @@
extern "C" {
#endif
#if !defined(__ASSEMBLER__)
/**
* @brief context_switch_frame stores the registers and PC for a context switch.
* @brief Stores the registers and PC for a context switch.
*
* This also defines context_switch_frame offsets for assembly language. The
* structure is sized to maintain 16 byte stack alignment per the ABI.
* https://github.com/riscv/riscv-elf-psabi-doc
*
*/
#if !defined(__ASSEMBLER__)
/* N.B.: update the definitions below if this changes */
struct context_switch_frame {
uint32_t filler0; /* filler to maintain 16 byte alignment */
uint32_t filler1; /* filler to maintain 16 byte alignment */
uint32_t pc;
uint32_t pad[2]; /**< padding to maintain 16 byte alignment */
uint32_t pc; /**< program counter */
/* Callee saved registers */
uint32_t s0;
uint32_t s1;
uint32_t s2;
uint32_t s3;
uint32_t s4;
uint32_t s5;
uint32_t s6;
uint32_t s7;
uint32_t s8;
uint32_t s9;
uint32_t s10;
uint32_t s11;
/* Caller saved register */
uint32_t ra;
uint32_t tp;
uint32_t t0;
uint32_t t1;
uint32_t t2;
uint32_t t3;
uint32_t t4;
uint32_t t5;
uint32_t t6;
uint32_t a0;
uint32_t a1;
uint32_t a2;
uint32_t a3;
uint32_t a4;
uint32_t a5;
uint32_t a6;
uint32_t a7;
uint32_t s0; /**< s0 register */
uint32_t s1; /**< s1 register */
uint32_t s2; /**< s2 register */
uint32_t s3; /**< s3 register */
uint32_t s4; /**< s4 register */
uint32_t s5; /**< s5 register */
uint32_t s6; /**< s6 register */
uint32_t s7; /**< s7 register */
uint32_t s8; /**< s8 register */
uint32_t s9; /**< s9 register */
uint32_t s10; /**< s10 register */
uint32_t s11; /**< s11 register */
/* Caller saved registers */
uint32_t ra; /**< ra register */
uint32_t tp; /**< tp register */
uint32_t t0; /**< t0 register */
uint32_t t1; /**< t1 register */
uint32_t t2; /**< t2 register */
uint32_t t3; /**< t3 register */
uint32_t t4; /**< t4 register */
uint32_t t5; /**< t5 register */
uint32_t t6; /**< t6 register */
uint32_t a0; /**< a0 register */
uint32_t a1; /**< a1 register */
uint32_t a2; /**< a2 register */
uint32_t a3; /**< a3 register */
uint32_t a4; /**< a4 register */
uint32_t a5; /**< a5 register */
uint32_t a6; /**< a6 register */
uint32_t a7; /**< a7 register */
};
#endif /* __ASSEMBLER__ */
/**
* @name Register offsets
* @{
*/
/* These values are checked for correctness in context_frame.c */
#define filler0_OFFSET 0
#define filler1_OFFSET 4
#define pad_OFFSET 0
#define pc_OFFSET 8
#define s0_OFFSET 12
#define s1_OFFSET 16
@ -115,9 +114,16 @@ struct context_switch_frame {
#define a5_OFFSET 116
#define a6_OFFSET 120
#define a7_OFFSET 124
/** @} */
/**
* @brief Size of context switch frame
*/
#define CONTEXT_FRAME_SIZE (a7_OFFSET + 4)
/**
* @brief Offset of stack pointer in struct _thread
*/
#define SP_OFFSET_IN_THREAD 0

View File

@ -7,7 +7,7 @@
*/
/**
* @defgroup cpu_fe310
* @defgroup cpu_fe310 SiFive FE310
* @ingroup cpu
* @brief Common implementations and headers for RISC-V
* @{

View File

@ -7,9 +7,7 @@
*/
/**
* @defgroup cpu_fe310
* @ingroup cpu
* @brief CPU specific implementations for the SiFive FE310 cpu
* @ingroup cpu_fe310
* @{
*
* @file
@ -21,6 +19,10 @@
#ifndef CPU_CONF_H
#define CPU_CONF_H
/**
* @name Configuration of default stack sizes
* @{
*/
#ifndef THREAD_EXTRA_STACKSIZE_PRINTF
#define THREAD_EXTRA_STACKSIZE_PRINTF (256)
#endif
@ -30,6 +32,7 @@
#ifndef THREAD_STACKSIZE_IDLE
#define THREAD_STACKSIZE_IDLE (256)
#endif
/** @} */
#ifdef __cplusplus
extern "C" {

View File

@ -148,3 +148,30 @@ _off_t _lseek(int fd, _off_t pos, int dir)
errno = ENODEV;
return -1;
}
int _gettimeofday(struct timeval *tp, void *tzp)
{
(void) tp;
(void) tzp;
errno = EINVAL;
return -1;
}
int _getpid(void)
{
return thread_getpid();
}
int _kill(int pid, int sig)
{
(void) pid;
(void) sig;
errno = EINVAL;
return -1;
}
void _exit(int _status)
{
(void) _status;
while(1);
}

View File

@ -22,8 +22,8 @@
#include "periph/cpuid.h"
#include "cpu.h"
#include "sifive/encoding.h"
#include "sifive/platform.h"
#include "vendor/encoding.h"
#include "vendor/platform.h"
void cpuid_get(void *id)
{

View File

@ -13,7 +13,7 @@ BOARD_BLACKLIST := arduino-duemilanove arduino-mega2560 arduino-uno chronos \
z1 jiminy-mega256rfr2 mega-xplained
BOARD_INSUFFICIENT_MEMORY := airfy-beacon b-l072z-lrwan1 bluepill calliope-mini \
cc2650-launchpad cc2650stk maple-mini \
cc2650-launchpad cc2650stk hifive1 maple-mini \
microbit nrf51dongle nrf6310 nucleo-f031k6 \
nucleo-f042k6 nucleo-f303k8 nucleo-l031k6 nucleo-f030r8 \
nucleo-f070rb nucleo-f072rb nucleo-f103rb nucleo-f302r8 nucleo-f334r8 \

View File

@ -8,7 +8,7 @@ BOARD ?= native
RIOTBASE ?= $(CURDIR)/../..
BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-mega2560 arduino-uno \
chronos msb-430 msb-430h nucleo-f031k6 nucleo-f042k6 \
chronos hifive1 msb-430 msb-430h nucleo-f031k6 nucleo-f042k6 \
nucleo-f303k8 nucleo-l031k6 nucleo-f030r8 nucleo-f070rb \
nucleo-f072rb nucleo-f302r8 nucleo-f334r8 nucleo-l053r8 \
stm32f0discovery telosb waspmote-pro wsn430-v1_3b \

View File

@ -8,7 +8,7 @@ BOARD ?= samr21-xpro
RIOTBASE ?= $(CURDIR)/../..
BOARD_INSUFFICIENT_MEMORY := airfy-beacon b-l072z-lrwan1 bluepill calliope-mini \
cc2650-launchpad cc2650stk maple-mini \
cc2650-launchpad cc2650stk hifive1 maple-mini \
microbit msb-430 msb-430h nrf51dongle nrf6310 \
nucleo-f031k6 nucleo-f042k6 nucleo-f303k8 nucleo-l031k6 \
nucleo-f030r8 nucleo-f070rb nucleo-f072rb nucleo-f103rb nucleo-f302r8 \

View File

@ -7,7 +7,7 @@ BOARD ?= native
# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
BOARD_INSUFFICIENT_MEMORY := calliope-mini chronos microbit msb-430 msb-430h \
BOARD_INSUFFICIENT_MEMORY := calliope-mini chronos hifive1 microbit msb-430 msb-430h \
nucleo-f031k6 nucleo-f042k6 nucleo-f303k8 nucleo-l031k6 \
nucleo-f030r8 nucleo-f070rb nucleo-f072rb nucleo-f103rb nucleo-f302r8 \
nucleo-f334r8 nucleo-l053r8 spark-core stm32f0discovery telosb \

View File

@ -8,7 +8,7 @@ BOARD ?= native
RIOTBASE ?= $(CURDIR)/../..
BOARD_INSUFFICIENT_MEMORY := airfy-beacon b-l072z-lrwan1 bluepill calliope-mini chronos \
microbit msb-430 msb-430h nrf51dongle nrf6310 nucleo-f031k6 \
hifive1 microbit msb-430 msb-430h nrf51dongle nrf6310 nucleo-f031k6 \
nucleo-f042k6 nucleo-f303k8 nucleo-l031k6 nucleo-f030r8 \
nucleo-f070rb nucleo-f072rb nucleo-f103rb nucleo-f302r8 nucleo-f334r8 \
nucleo-l053r8 spark-core stm32f0discovery \

View File

@ -8,7 +8,7 @@ BOARD ?= native
RIOTBASE ?= $(CURDIR)/../..
BOARD_INSUFFICIENT_MEMORY := airfy-beacon b-l072z-lrwan1 bluepill calliope-mini \
cc2650-launchpad cc2650stk maple-mini \
cc2650-launchpad cc2650stk hifive1 maple-mini \
microbit nrf51dongle nrf6310 nucleo-f030r8 nucleo-f070rb \
nucleo-f072rb nucleo-f103rb nucleo-f302r8 nucleo-f334r8 nucleo-f410rb \
nucleo-l053r8 nucleo-l073rz nucleo-f031k6 nucleo-f042k6 \

View File

@ -15,7 +15,7 @@ BOARD_INSUFFICIENT_MEMORY := bluepill calliope-mini cc2650-launchpad \
opencm904 spark-core stm32f0discovery
BOARD_BLACKLIST := arduino-duemilanove arduino-mega2560 arduino-uno \
chronos jiminy-mega256rfr2 mega-xplained mips-malta \
chronos hifive1 jiminy-mega256rfr2 mega-xplained mips-malta \
msb-430 msb-430h pic32-clicker pic32-wifire telosb \
waspmote-pro wsn430-v1_3b wsn430-v1_4 z1

View File

@ -7,7 +7,7 @@ BOARD ?= native
# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
BOARD_INSUFFICIENT_MEMORY := chronos msb-430 msb-430h nucleo-f030r8 nucleo-l053r8 \
BOARD_INSUFFICIENT_MEMORY := chronos hifive1 msb-430 msb-430h nucleo-f030r8 nucleo-l053r8 \
nucleo-f031k6 nucleo-f042k6 nucleo-l031k6 \
stm32f0discovery telosb wsn430-v1_3b wsn430-v1_4 \
z1

View File

@ -1,6 +1,6 @@
include ../Makefile.tests_common
BOARD_INSUFFICIENT_MEMORY := chronos msb-430 msb-430h nucleo-f031k6 nucleo-f042k6 \
BOARD_INSUFFICIENT_MEMORY := chronos hifive1 msb-430 msb-430h nucleo-f031k6 nucleo-f042k6 \
nucleo-f303k8 nucleo-l031k6 nucleo-f030r8 nucleo-f070rb \
nucleo-f072rb nucleo-f302r8 nucleo-f303re nucleo-f334r8 \
nucleo-l053r8 stm32f0discovery telosb wsn430-v1_3b \

View File

@ -1,7 +1,7 @@
include ../Makefile.tests_common
BOARD_INSUFFICIENT_MEMORY := airfy-beacon b-l072z-lrwan1 bluepill calliope-mini \
cc2650-launchpad cc2650stk chronos maple-mini \
cc2650-launchpad cc2650stk chronos hifive1 maple-mini \
microbit msb-430 msb-430h nrf51dongle nrf6310 \
nucleo-f030r8 nucleo-f070rb nucleo-f072rb nucleo-f103rb \
nucleo-f302r8 nucleo-f334r8 nucleo-l053r8 nucleo-l073rz \

View File

@ -10,7 +10,7 @@ TCP_TEST_CYCLES ?= 3
# Mark Boards with insufficient memory
BOARD_INSUFFICIENT_MEMORY := airfy-beacon arduino-duemilanove arduino-mega2560 \
arduino-uno calliope-mini chronos mega-xplained microbit \
arduino-uno calliope-mini chronos hifive1 mega-xplained microbit \
msb-430 msb-430h nrf51dongle nrf6310 nucleo-f031k6 \
nucleo-f042k6 nucleo-f303k8 nucleo-l031k6 nucleo-f030r8 \
nucleo-f070rb nucleo-f072rb nucleo-f302r8 nucleo-f334r8 nucleo-l053r8 \

View File

@ -10,7 +10,7 @@ TCP_TEST_CYCLES ?= 3
# Mark Boards with insufficient memory
BOARD_INSUFFICIENT_MEMORY := airfy-beacon arduino-duemilanove arduino-mega2560 \
arduino-uno calliope-mini chronos mega-xplained \
arduino-uno calliope-mini chronos hifive1 mega-xplained \
microbit msb-430 msb-430h nrf51dongle nrf6310 nucleo-f031k6 \
nucleo-f042k6 nucleo-f303k8 nucleo-l031k6 nucleo-f030r8 \
nucleo-f070rb nucleo-f072rb nucleo-f302r8 nucleo-f334r8 nucleo-l053r8 \

View File

@ -5,7 +5,7 @@ include ../Makefile.tests_common
BOARD_BLACKLIST := arduino-uno arduino-duemilanove arduino-mega2560 chronos \
msb-430 msb-430h telosb waspmote-pro wsn430-v1_3b \
wsn430-v1_4 z1 jiminy-mega256rfr2 mega-xplained
BOARD_INSUFFICIENT_MEMORY := airfy-beacon nrf6310 nucleo-f031k6 nucleo-f042k6 \
BOARD_INSUFFICIENT_MEMORY := airfy-beacon hifive1 nrf6310 nucleo-f031k6 nucleo-f042k6 \
nucleo-l031k6 nucleo-f030r8 nucleo-f334r8 nucleo-l053r8 \
stm32f0discovery yunjia-nrf51822