mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Refresh several configurations. Fix errors and warnings detected by tools/testbuild.sh
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -186,7 +186,9 @@ static struct ssd1783_dev_s g_lcddev =
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* we trust gcc to move this expensive bitshifting out of
|
/* we trust gcc to move this expensive bitshifting out of
|
||||||
the loops in the drawing funtcions */
|
* the loops in the drawing funtcions
|
||||||
|
*/
|
||||||
|
|
||||||
static uint8_t rgb_to_pixel(uint16_t color)
|
static uint8_t rgb_to_pixel(uint16_t color)
|
||||||
{
|
{
|
||||||
uint8_t ret;
|
uint8_t ret;
|
||||||
@@ -199,8 +201,11 @@ static uint8_t rgb_to_pixel(uint16_t color)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* somehow the palette is messed up, RRR seems to have the
|
/* somehow the palette is messed up, RRR seems to have the
|
||||||
bits reversed! R0 R1 R2 G G G B B ---> R2 R1 R0 G G G B B */
|
* bits reversed! R0 R1 R2 G G G B B ---> R2 R1 R0 G G G B B
|
||||||
uint8_t fix_rrr(uint8_t v){
|
*/
|
||||||
|
|
||||||
|
uint8_t fix_rrr(uint8_t v)
|
||||||
|
{
|
||||||
return (v & 0x5f) | (v & 0x80) >> 2 | (v & 0x20) << 2;
|
return (v & 0x5f) | (v & 0x80) >> 2 | (v & 0x20) << 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -519,7 +524,8 @@ void board_lcd_uninitialize(void)
|
|||||||
|
|
||||||
void lcd_clear()
|
void lcd_clear()
|
||||||
{
|
{
|
||||||
struct ssd1783_cmdlist prepare_disp_write_cmds[] = {
|
struct ssd1783_cmdlist prepare_disp_write_cmds[] =
|
||||||
|
{
|
||||||
{ CMD, 0x8E },
|
{ CMD, 0x8E },
|
||||||
{ DATA, 0x00 },
|
{ DATA, 0x00 },
|
||||||
{ DATA, 0x00 },
|
{ DATA, 0x00 },
|
||||||
@@ -528,11 +534,12 @@ void lcd_clear()
|
|||||||
{ END, 0x00 }
|
{ END, 0x00 }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ssd1783_cmdlist nop[] = {
|
struct ssd1783_cmdlist nop_command[] =
|
||||||
|
{
|
||||||
{ CMD, 0x25 }, // NOP command
|
{ CMD, 0x25 }, // NOP command
|
||||||
{ END, 0x00 }
|
{ END, 0x00 }
|
||||||
};
|
};
|
||||||
|
|
||||||
fb_ssd1783_send_cmdlist(prepare_disp_write_cmds);
|
fb_ssd1783_send_cmdlist(prepare_disp_write_cmds);
|
||||||
fb_ssd1783_send_cmdlist(nop);
|
fb_ssd1783_send_cmdlist(nop_command);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -292,7 +292,7 @@ CONFIG_DEV_NULL=y
|
|||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
CONFIG_SPI=y
|
CONFIG_SPI=y
|
||||||
# CONFIG_SPI_OWNBUS is not set
|
# CONFIG_SPI_OWNBUS is not set
|
||||||
CONFIG_SPI_EXCHANGE=y
|
# CONFIG_SPI_EXCHANGE is not set
|
||||||
# CONFIG_SPI_CMDDATA is not set
|
# CONFIG_SPI_CMDDATA is not set
|
||||||
# CONFIG_SPI_BITBANG is not set
|
# CONFIG_SPI_BITBANG is not set
|
||||||
# CONFIG_I2S is not set
|
# CONFIG_I2S is not set
|
||||||
|
|||||||
@@ -35,101 +35,90 @@
|
|||||||
|
|
||||||
include ${TOPDIR}/.config
|
include ${TOPDIR}/.config
|
||||||
include ${TOPDIR}/tools/Config.mk
|
include ${TOPDIR}/tools/Config.mk
|
||||||
|
include ${TOPDIR}/arch/arm/src/arm/Toolchain.defs
|
||||||
|
|
||||||
# The default value for CROSSDEV can be overridden from the make command line:
|
ifeq ($(WINTOOL),y)
|
||||||
# make -- Will build for the NuttX buildroot toolchain
|
# Windows-native toolchains
|
||||||
# make CROSSDEV=arm-eabi- -- Will build for the devkitARM toolchain
|
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
||||||
# make CROSSDEV=arm-none-eabi- -- Will build for the CodeSourcery toolchain
|
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||||
# make CROSSDEV=arm-nuttx-elf- -- Will build for the NuttX buildroot toolchain
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
|
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||||
|
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||||
|
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}"
|
||||||
|
else
|
||||||
|
# Linux/Cygwin-native toolchain
|
||||||
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script
|
||||||
|
endif
|
||||||
|
|
||||||
CROSSDEV = arm-nuttx-elf-
|
CC = $(CROSSDEV)gcc
|
||||||
CC = $(CROSSDEV)gcc
|
CXX = $(CROSSDEV)g++
|
||||||
CXX = $(CROSSDEV)g++
|
CPP = $(CROSSDEV)gcc -E
|
||||||
CPP = $(CROSSDEV)gcc -E
|
LD = $(CROSSDEV)ld
|
||||||
LD = $(CROSSDEV)ld
|
AR = $(CROSSDEV)ar rcs
|
||||||
AR = $(CROSSDEV)ar rcs
|
NM = $(CROSSDEV)nm
|
||||||
NM = $(CROSSDEV)nm
|
OBJCOPY = $(CROSSDEV)objcopy
|
||||||
OBJCOPY = $(CROSSDEV)objcopy
|
OBJDUMP = $(CROSSDEV)objdump
|
||||||
OBJDUMP = $(CROSSDEV)objdump
|
|
||||||
|
|
||||||
HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"}
|
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}
|
||||||
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 ($(ARCHCCMAJOR),4)
|
ifeq ($(ARCHCCMAJOR),4)
|
||||||
ifneq ($(HOSTOS),Cygwin)
|
ifneq ($(HOSTOS),Cygwin)
|
||||||
OBJCOPYARGS = -R .note -R .note.gnu.build-id -R .comment
|
OBJCOPYARGS = -R .note -R .note.gnu.build-id -R .comment
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CROSSDEV),arm-nuttx-elf-)
|
ifeq ("${CONFIG_DEBUG}","y")
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
ARCHOPTIMIZATION = -g
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script
|
|
||||||
MAXOPTIMIZATION = -Os
|
|
||||||
else
|
|
||||||
WINTOOL = y
|
|
||||||
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
|
||||||
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
|
||||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
|
||||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
|
||||||
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
|
||||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}"
|
|
||||||
MAXOPTIMIZATION = -O2
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
|
||||||
ARCHOPTIMIZATION = -g
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
||||||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCHCCMAJOR),4)
|
ifeq ($(ARCHCCMAJOR),4)
|
||||||
ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft
|
ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft
|
||||||
else
|
else
|
||||||
ARCHCPUFLAGS = -mapcs-32 -mcpu=arm7tdmi -msoft-float
|
ARCHCPUFLAGS = -mapcs-32 -mcpu=arm7tdmi -msoft-float
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCFLAGS = -fno-builtin
|
ARCHCFLAGS = -fno-builtin
|
||||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
|
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
|
||||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
||||||
ARCHWARNINGSXX = -Wall -Wshadow
|
ARCHWARNINGSXX = -Wall -Wshadow
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
|
|
||||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||||
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||||
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \
|
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \
|
||||||
$(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
$(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||||
|
|
||||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld \
|
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld \
|
||||||
-no-check-sections
|
-no-check-sections
|
||||||
LDNXFLATFLAGS = -e main -s 2048
|
LDNXFLATFLAGS = -e main -s 2048
|
||||||
|
|
||||||
OBJEXT = .o
|
OBJEXT = .o
|
||||||
LIBEXT = .a
|
LIBEXT = .a
|
||||||
EXEEXT =
|
EXEEXT =
|
||||||
|
|
||||||
ifneq ($(CROSSDEV),arm-nuttx-elf-)
|
ifneq ($(CROSSDEV),arm-nuttx-elf-)
|
||||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||||
endif
|
endif
|
||||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
ifeq ($(CONFIG_DEBUG),y)
|
||||||
LDFLAGS += -g
|
LDFLAGS += -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
HOSTCC = gcc
|
||||||
HOSTCC = gcc
|
HOSTINCLUDES = -I.
|
||||||
HOSTINCLUDES = -I.
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
HOSTLDFLAGS =
|
||||||
HOSTLDFLAGS =
|
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
#include <nuttx/spi/spi.h>
|
#include <nuttx/spi/spi.h>
|
||||||
#include <nuttx/net/enc28j60.h>
|
#include <nuttx/net/enc28j60.h>
|
||||||
|
|
||||||
|
#include <arch/irq.h>
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
@@ -154,9 +155,9 @@
|
|||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int up_attach(FAR struct enc_lower_s *lower, xcpt_t handler);
|
static int up_attach(FAR const struct enc_lower_s *lower, xcpt_t handler);
|
||||||
static void up_enable(FAR struct enc_lower_s *lower);
|
static void up_enable(FAR const struct enc_lower_s *lower);
|
||||||
static void up_disable(FAR struct enc_lower_s *lower);
|
static void up_disable(FAR const struct enc_lower_s *lower);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <errno.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user