Issues with k64f hard float
This commit is contained in:
@@ -102,6 +102,8 @@ DHRY_DIR = $(CURDIR)/../../common/Dhrystone
|
||||
COREMARK_DIR = $(CURDIR)/../../common/CoreMark
|
||||
UMM_DIR = $(CURDIR)/../../common/umm
|
||||
INCLUDE_DIR = $(CURDIR)/../../include
|
||||
LIB_DIR = $(CURDIR)/../../libraries/lib
|
||||
LIB_INCLUDE_DIR= $(CURDIR)/../../libraries/include
|
||||
APP_INCLUDE_DIR= $(CURDIR)/../include
|
||||
|
||||
# Working directory to build object files.
|
||||
@@ -135,7 +137,7 @@ OBJS := $(foreach src,$(SOURCES), $(BUILD_DIR)/$(src))
|
||||
# CPPFLAGS = compiler options for C and C++
|
||||
#CPPFLAGS = -Wall -g -Os -mthumb -ffunction-sections -fdata-sections -nostdlib -MMD $(OPTIONS) -DTEENSYDUINO=144 -DF_CPU=$(TEENSY_CORE_SPEED)
|
||||
CPPFLAGS += -Wall -g -mthumb -nostdlib -MMD $(OPTIONS) -DTEENSYDUINO=144 -DF_CPU=$(TEENSY_CORE_SPEED)
|
||||
CPPFLAGS += -I. -I$(COMMON_DIR) -I$(FATFS_DIR) -I$(OSDIR) -I$(INCLUDE_DIR) -I$(APP_INCLUDE_DIR) -I$(COREPATH) -I$(COREMARK_DIR) -I$(DHRY_DIR) -I$(UMM_DIR)
|
||||
CPPFLAGS += -I. -I$(COMMON_DIR) -I$(FATFS_DIR) -I$(OSDIR) -I$(INCLUDE_DIR) -I$(APP_INCLUDE_DIR) -I$(COREPATH) -I$(COREMARK_DIR) -I$(DHRY_DIR) -I$(UMM_DIR) # -I$(LIB_INCLUDE_DIR)
|
||||
CPPFLAGS += -D__K64F__ -D__APP__ -DDEBUG -D__SD_CARD__ -DOS_BASEADDR=$(OS_BASEADDR) -DOS_APPADDR=$(OS_APPADDR)
|
||||
CPPFLAGS += -mlong-calls # WARNING! This is needed as a bug in the compiler creates veneer wrappers which switch to ARM mode and not Thumb.
|
||||
ifeq (-nostdlib,$(findstring -nostdlib,$(LDFLAGS)))
|
||||
@@ -177,11 +179,11 @@ CFLAGS += -Os
|
||||
#LDFLAGS = -Os -Wl,--gc-sections -mthumb -ffreestanding -Wl,--defsym=OS_BASEADDR=$(OS_BASEADDR) -Wl,--defsym=OS_APPADDR=$(OS_APPADDR)
|
||||
#LDFLAGS = -nostdlib -nostartfiles -ffreestanding -Wl,--gc-sections -mthumb -Wl,--relax -Os -Wl,--defsym=OS_BASEADDR=$(OS_BASEADDR) -Wl,--defsym=OS_APPADDR=$(OS_APPADDR)
|
||||
#LDFLAGS = -nostdlib -nostartfiles -ffreestanding -mthumb -Wl,--relax -Os -Wl,--defsym=OS_BASEADDR=$(OS_BASEADDR) -Wl,--defsym=OS_APPADDR=$(OS_APPADDR)
|
||||
LDFLAGS += -nostartfiles -ffreestanding -mthumb -Wl,--relax -Os -Wl,--defsym=OS_BASEADDR=$(OS_BASEADDR) -Wl,--defsym=OS_APPADDR=$(OS_APPADDR)
|
||||
LDFLAGS += -nostartfiles -ffreestanding -mthumb -Wl,--relax -Os -Wl,--defsym=OS_BASEADDR=$(OS_BASEADDR) -Wl,--defsym=OS_APPADDR=$(OS_APPADDR) -L$(LIB_DIR)
|
||||
#LDFLAGS = -ffreestanding -Wl,--gc-sections -mthumb -Wl,--relax -Os -Wl,--defsym=OS_BASEADDR=$(OS_BASEADDR) -Wl,--defsym=OS_APPADDR=$(OS_APPADDR)
|
||||
|
||||
# additional libraries to link
|
||||
LIBS = -lm
|
||||
LIBS += -lm
|
||||
|
||||
# compiler options specific to teensy version
|
||||
ifeq ($(TEENSY), 30)
|
||||
|
||||
@@ -48,11 +48,11 @@ ifeq ($(__K64F__),1)
|
||||
override STACKSIZE = 0x00000000
|
||||
|
||||
# Modules making up Kilo.
|
||||
APP_C_SRC = $(APP_COMMON_DIR)/sysutils.c $(APP_COMMON_DIR)/ctypelocal.c
|
||||
APP_C_SRC = #$(APP_COMMON_DIR)/sysutils.c $(APP_COMMON_DIR)/ctypelocal.c
|
||||
CFLAGS =
|
||||
CPPFLAGS = -D__HEAPADDR__=$(HEAPADDR) -D__HEAPSIZE__=$(HEAPSIZE)
|
||||
LDFLAGS = -nostdlib
|
||||
LIBS =
|
||||
LIBS = -lumansi-k64f -lumstdio-k64f
|
||||
else
|
||||
# Modules making up Kilo.
|
||||
APP_C_SRC = #$(APP_COMMON_DIR)/sysutils.c $(APP_COMMON_DIR)/ctypelocal.c
|
||||
@@ -62,7 +62,6 @@ else
|
||||
LIBS = -lumansi-zpu -limath-zpu
|
||||
endif
|
||||
|
||||
|
||||
# Filter out the standard HEAP address and size, replacing with the ones required for this application.
|
||||
# Useful for sub-makes
|
||||
FILTER1 = $(filter-out $(filter HEAPADDR=%,$(MAKEFLAGS)), $(MAKEFLAGS))
|
||||
|
||||
11
apps/ed/ed.c
11
apps/ed/ed.c
@@ -54,21 +54,16 @@
|
||||
#include <stdarg.h>
|
||||
#include <usb_serial.h>
|
||||
#include "k64f_soc.h"
|
||||
#define uint32_t __uint32_t
|
||||
#define uint16_t __uint16_t
|
||||
#define uint8_t __uint8_t
|
||||
#define int32_t __int32_t
|
||||
#define int16_t __int16_t
|
||||
#define int8_t __int8_t
|
||||
#include "../../libraries/include/ansi.h"
|
||||
#include "../../libraries/include/ctype.h"
|
||||
#elif defined(__ZPU__)
|
||||
#include <stdint.h>
|
||||
#include "zpu_soc.h"
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#else
|
||||
#error "Target CPU not defined, use __ZPU__ or __K64F__"
|
||||
#endif
|
||||
//#include <ctypelocal.h>
|
||||
#include <ctype.h>
|
||||
#include "interrupts.h"
|
||||
#include "ff.h" /* Declarations of FatFs API */
|
||||
#include "diskio.h"
|
||||
|
||||
@@ -46,13 +46,13 @@ ifeq ($(__K64F__),1)
|
||||
override HEAPSIZE = 0x00033000
|
||||
override STACKADDR = 0x20028000
|
||||
override STACKSIZE = 0x00000000
|
||||
|
||||
|
||||
# Modules making up Kilo.
|
||||
APP_C_SRC = $(APP_COMMON_DIR)/sysutils.c $(APP_COMMON_DIR)/ctypelocal.c
|
||||
APP_C_SRC = #$(APP_COMMON_DIR)/sysutils.c $(APP_COMMON_DIR)/ctypelocal.c
|
||||
CFLAGS =
|
||||
CPPFLAGS = -D__HEAPADDR__=$(HEAPADDR) -D__HEAPSIZE__=$(HEAPSIZE)
|
||||
LDFLAGS = -nostdlib
|
||||
LIBS =
|
||||
LIBS = -lumansi-k64f -lumstdio-k64f
|
||||
else
|
||||
# Modules making up Kilo.
|
||||
APP_C_SRC = #$(APP_COMMON_DIR)/sysutils.c $(APP_COMMON_DIR)/ctypelocal.c
|
||||
|
||||
@@ -51,21 +51,16 @@
|
||||
#include <unistd.h>
|
||||
#include <stdarg.h>
|
||||
#include "k64f_soc.h"
|
||||
#define uint32_t __uint32_t
|
||||
#define uint16_t __uint16_t
|
||||
#define uint8_t __uint8_t
|
||||
#define int32_t __int32_t
|
||||
#define int16_t __int16_t
|
||||
#define int8_t __int8_t
|
||||
#include "../../libraries/include/ansi.h"
|
||||
#include "../../libraries/include/ctype.h"
|
||||
#elif defined(__ZPU__)
|
||||
#include <stdint.h>
|
||||
#include "zpu_soc.h"
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#else
|
||||
#error "Target CPU not defined, use __ZPU__ or __K64F__"
|
||||
#endif
|
||||
//#include <ctypelocal.h>
|
||||
#include <ctype.h>
|
||||
#include "interrupts.h"
|
||||
#include "ff.h" /* Declarations of FatFs API */
|
||||
#include "diskio.h"
|
||||
|
||||
@@ -47,14 +47,23 @@ override HEAPADDR = 0x2000C000
|
||||
override HEAPSIZE = 0x0001BC00
|
||||
override STACKADDR = 0x20027C00
|
||||
override STACKSIZE = 0x00000400
|
||||
endif
|
||||
|
||||
# Modules making up Mbasic.
|
||||
APP_C_SRC = basic.c ed.c $(APP_COMMON_DIR)/sbrk.c $(APP_COMMON_DIR)/sysutils.c $(COMMON_DIR)/readline.c
|
||||
APP_C_SRC = basic.c ed.c $(APP_COMMON_DIR)/sbrk.c $(COMMON_DIR)/readline.c $(APP_COMMON_DIR)/sysutils.c
|
||||
UMM_C_SRC =
|
||||
CFLAGS = -Os
|
||||
CPPFLAGS = -D__HEAPADDR__=$(HEAPADDR) -D__HEAPSIZE__=$(HEAPSIZE)
|
||||
LDFLAGS =
|
||||
LIBS =
|
||||
else
|
||||
# Modules making up Mbasic.
|
||||
APP_C_SRC = basic.c ed.c $(APP_COMMON_DIR)/sbrk.c $(COMMON_DIR)/readline.c $(APP_COMMON_DIR)/sysutils.c
|
||||
UMM_C_SRC =
|
||||
CFLAGS = -Os
|
||||
CPPFLAGS = -D__HEAPADDR__=$(HEAPADDR) -D__HEAPSIZE__=$(HEAPSIZE)
|
||||
LDFLAGS =
|
||||
LIBS =
|
||||
endif
|
||||
|
||||
# Filter out the standard HEAP address and size, replacing with the ones required for this application.
|
||||
# Useful for sub-makes
|
||||
|
||||
@@ -48,11 +48,11 @@ ifeq ($(__K64F__),1)
|
||||
override STACKSIZE = 0x00000000
|
||||
|
||||
# Modules making up BASIC.
|
||||
APP_C_SRC = basic_main.c basic_editor.c basic_exectoks.c basic_expr.c basic_tokens.c basic_utils.c $(APP_COMMON_DIR)/sysutils.c
|
||||
APP_C_SRC = basic_main.c basic_editor.c basic_exectoks.c basic_expr.c basic_tokens.c basic_utils.c
|
||||
CFLAGS = -Wno-write-strings -Wno-char-subscripts
|
||||
CPPFLAGS = -D__HEAPADDR__=$(HEAPADDR) -D__HEAPSIZE__=$(HEAPSIZE)
|
||||
LDFLAGS = -nostdlib
|
||||
LIBS =
|
||||
LIBS = -lumansi-k64f -lumstdio-k64f
|
||||
else
|
||||
override HEAPADDR = 0x0000E200
|
||||
override HEAPSIZE = 0x00000D00
|
||||
@@ -60,7 +60,7 @@ else
|
||||
override STACKSIZE = 0x00000000
|
||||
|
||||
# Modules making up BASIC.
|
||||
APP_C_SRC = basic_main.c basic_editor.c basic_exectoks.c basic_expr.c basic_tokens.c basic_utils.c #$(APP_COMMON_DIR)/sysutils.c
|
||||
APP_C_SRC = basic_main.c basic_editor.c basic_exectoks.c basic_expr.c basic_tokens.c basic_utils.c
|
||||
CFLAGS = -Wno-write-strings -Wno-char-subscripts
|
||||
CPPFLAGS = -D__HEAPADDR__=$(HEAPADDR) -D__HEAPSIZE__=$(HEAPSIZE)
|
||||
LDFLAGS = -nostdlib
|
||||
|
||||
@@ -45,12 +45,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "k64f_soc.h"
|
||||
#define uint32_t __uint32_t
|
||||
#define uint16_t __uint16_t
|
||||
#define uint8_t __uint8_t
|
||||
#define int32_t __int32_t
|
||||
#define int16_t __int16_t
|
||||
#define int8_t __int8_t
|
||||
#elif defined(__ZPU__)
|
||||
#include <stdint.h>
|
||||
#include "zpu_soc.h"
|
||||
|
||||
@@ -43,12 +43,12 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#define uint32_t __uint32_t
|
||||
#define uint16_t __uint16_t
|
||||
#define uint8_t __uint8_t
|
||||
#define int32_t __int32_t
|
||||
#define int16_t __int16_t
|
||||
#define int8_t __int8_t
|
||||
// #define uint32_t __uint32_t
|
||||
// #define uint16_t __uint16_t
|
||||
// #define uint8_t __uint8_t
|
||||
// #define int32_t __int32_t
|
||||
// #define int16_t __int16_t
|
||||
// #define int8_t __int8_t
|
||||
#elif defined(__ZPU__)
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -105,6 +105,7 @@ IMATH_OBJS = $(foreach src,$(IMATH_SRC), $(BUILD_DIR)/$(src))
|
||||
CFLAGS = -I. -I$(UMLIBC_DIR)/include -I$(COMMON_DIR) -I$(INCLUDE_DIR) -I$(TEENSY35_DIR)
|
||||
ifeq ($(__ZPU__),)
|
||||
CFLAGS += -D__K64F__
|
||||
CFLAGS += -mlong-calls -mthumb -MMD -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16
|
||||
else
|
||||
CFLAGS += -D__ZPU__
|
||||
endif
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user