aboutsummaryrefslogtreecommitdiffstats
path: root/boards/base
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-10-06 17:05:16 +1000
committerinmarket <andrewh@inmarket.com.au>2014-10-06 17:05:48 +1000
commit211254ed6c5a945be18334aa540de55db885000c (patch)
tree19b94dd69a4a95d4b718c06c0d6eb27f6aa7a9a8 /boards/base
parent3348128fe289aae37f2df46802709aaa7aedb0c1 (diff)
downloaduGFX-211254ed6c5a945be18334aa540de55db885000c.tar.gz
uGFX-211254ed6c5a945be18334aa540de55db885000c.tar.bz2
uGFX-211254ed6c5a945be18334aa540de55db885000c.zip
Add support for FreeRTOS into make system
Diffstat (limited to 'boards/base')
-rw-r--r--boards/base/RaspberryPi/FreeRTOS/bcm2835_intc.h (renamed from boards/base/RaspberryPi/example-FreeRTOS/Drivers/bcm2835_intc.h)0
-rw-r--r--boards/base/RaspberryPi/FreeRTOS/freertos_main.c (renamed from boards/base/RaspberryPi/example-FreeRTOS/main.c)34
-rw-r--r--boards/base/RaspberryPi/FreeRTOS/gpio.c (renamed from boards/base/RaspberryPi/example-FreeRTOS/Drivers/gpio.c)0
-rw-r--r--boards/base/RaspberryPi/FreeRTOS/gpio.h (renamed from boards/base/RaspberryPi/example-FreeRTOS/Drivers/gpio.h)0
-rw-r--r--boards/base/RaspberryPi/FreeRTOS/interrupts.c (renamed from boards/base/RaspberryPi/example-FreeRTOS/Drivers/interrupts.c)0
-rw-r--r--boards/base/RaspberryPi/FreeRTOS/interrupts.h (renamed from boards/base/RaspberryPi/example-FreeRTOS/Drivers/interrupts.h)0
-rw-r--r--boards/base/RaspberryPi/FreeRTOS/mmio.h (renamed from boards/base/RaspberryPi/example-FreeRTOS/Drivers/mmio.h)0
-rw-r--r--boards/base/RaspberryPi/FreeRTOS/raspberrypi.ld (renamed from boards/base/RaspberryPi/example-FreeRTOS/raspberrypi.ld)0
-rw-r--r--boards/base/RaspberryPi/FreeRTOS/startup.s (renamed from boards/base/RaspberryPi/example-FreeRTOS/startup.s)4
-rw-r--r--boards/base/RaspberryPi/FreeRTOS/uart.c (renamed from boards/base/RaspberryPi/example-FreeRTOS/Drivers/uart.c)0
-rw-r--r--boards/base/RaspberryPi/FreeRTOS/uart.h (renamed from boards/base/RaspberryPi/example-FreeRTOS/Drivers/uart.h)0
-rw-r--r--boards/base/RaspberryPi/example-FreeRTOS/Makefile128
12 files changed, 64 insertions, 102 deletions
diff --git a/boards/base/RaspberryPi/example-FreeRTOS/Drivers/bcm2835_intc.h b/boards/base/RaspberryPi/FreeRTOS/bcm2835_intc.h
index 9f87b88e..9f87b88e 100644
--- a/boards/base/RaspberryPi/example-FreeRTOS/Drivers/bcm2835_intc.h
+++ b/boards/base/RaspberryPi/FreeRTOS/bcm2835_intc.h
diff --git a/boards/base/RaspberryPi/example-FreeRTOS/main.c b/boards/base/RaspberryPi/FreeRTOS/freertos_main.c
index 3a64a7bb..821a679b 100644
--- a/boards/base/RaspberryPi/example-FreeRTOS/main.c
+++ b/boards/base/RaspberryPi/FreeRTOS/freertos_main.c
@@ -3,43 +3,23 @@
#include "Drivers/interrupts.h"
-#include "gfx.h"
+extern int main(void);
-static void displayTask(void *pvParameters) {
- coord_t width, height;
- // Get the screen size
- width = gdispGetWidth();
- height = gdispGetHeight();
-
- // Code Here
- gdispDrawBox(10, 10, width/2, height/2, Yellow);
- gdispFillArea(width/2, height/2, width/2-10, height/2-10, Blue);
- gdispDrawLine(5, 30, width-50, height-40, Red);
-
- while(1)
- {
- vTaskDelay(1000);
- }
-
- return;
+static void mainTask(void *pvParameters) {
+ (void) pvParameters;
+ main();
}
/**
* This is the systems main entry, some call it a boot thread.
- *
- * -- Absolutely nothing wrong with this being called main(), just it doesn't have
- * -- the same prototype as you'd see in a linux program.
**/
-int main(void) {
+int FreeRTOS_Main(void) {
DisableInterrupts();
InitInterruptController();
- // Initialize and clear the display
- gfxInit();
-
- xTaskCreate(displayTask,
- (portCHAR *)"Display Task",
+ xTaskCreate(mainTask,
+ (portCHAR *)"Main Task",
128,
NULL,
0,
diff --git a/boards/base/RaspberryPi/example-FreeRTOS/Drivers/gpio.c b/boards/base/RaspberryPi/FreeRTOS/gpio.c
index 485de897..485de897 100644
--- a/boards/base/RaspberryPi/example-FreeRTOS/Drivers/gpio.c
+++ b/boards/base/RaspberryPi/FreeRTOS/gpio.c
diff --git a/boards/base/RaspberryPi/example-FreeRTOS/Drivers/gpio.h b/boards/base/RaspberryPi/FreeRTOS/gpio.h
index fa459707..fa459707 100644
--- a/boards/base/RaspberryPi/example-FreeRTOS/Drivers/gpio.h
+++ b/boards/base/RaspberryPi/FreeRTOS/gpio.h
diff --git a/boards/base/RaspberryPi/example-FreeRTOS/Drivers/interrupts.c b/boards/base/RaspberryPi/FreeRTOS/interrupts.c
index 9908b7c4..9908b7c4 100644
--- a/boards/base/RaspberryPi/example-FreeRTOS/Drivers/interrupts.c
+++ b/boards/base/RaspberryPi/FreeRTOS/interrupts.c
diff --git a/boards/base/RaspberryPi/example-FreeRTOS/Drivers/interrupts.h b/boards/base/RaspberryPi/FreeRTOS/interrupts.h
index d09353a4..d09353a4 100644
--- a/boards/base/RaspberryPi/example-FreeRTOS/Drivers/interrupts.h
+++ b/boards/base/RaspberryPi/FreeRTOS/interrupts.h
diff --git a/boards/base/RaspberryPi/example-FreeRTOS/Drivers/mmio.h b/boards/base/RaspberryPi/FreeRTOS/mmio.h
index 89bea700..89bea700 100644
--- a/boards/base/RaspberryPi/example-FreeRTOS/Drivers/mmio.h
+++ b/boards/base/RaspberryPi/FreeRTOS/mmio.h
diff --git a/boards/base/RaspberryPi/example-FreeRTOS/raspberrypi.ld b/boards/base/RaspberryPi/FreeRTOS/raspberrypi.ld
index ece588b5..ece588b5 100644
--- a/boards/base/RaspberryPi/example-FreeRTOS/raspberrypi.ld
+++ b/boards/base/RaspberryPi/FreeRTOS/raspberrypi.ld
diff --git a/boards/base/RaspberryPi/example-FreeRTOS/startup.s b/boards/base/RaspberryPi/FreeRTOS/startup.s
index 286f396c..d865439f 100644
--- a/boards/base/RaspberryPi/example-FreeRTOS/startup.s
+++ b/boards/base/RaspberryPi/FreeRTOS/startup.s
@@ -4,7 +4,7 @@
.extern vFreeRTOS_ISR
.extern vPortYieldProcessor
.extern DisableInterrupts
-.extern main
+.extern FreeRTOS_Main
.section .init
.globl _start
;;
@@ -79,7 +79,7 @@ zero_loop:
;@ mov sp,#0x1000000
- b main ;@ We're ready?? Lets start main execution!
+ b FreeRTOS_Main ;@ We're ready?? Lets start main execution!
.section .text
undefined_instruction:
diff --git a/boards/base/RaspberryPi/example-FreeRTOS/Drivers/uart.c b/boards/base/RaspberryPi/FreeRTOS/uart.c
index 92f837e7..92f837e7 100644
--- a/boards/base/RaspberryPi/example-FreeRTOS/Drivers/uart.c
+++ b/boards/base/RaspberryPi/FreeRTOS/uart.c
diff --git a/boards/base/RaspberryPi/example-FreeRTOS/Drivers/uart.h b/boards/base/RaspberryPi/FreeRTOS/uart.h
index fe7f64aa..fe7f64aa 100644
--- a/boards/base/RaspberryPi/example-FreeRTOS/Drivers/uart.h
+++ b/boards/base/RaspberryPi/FreeRTOS/uart.h
diff --git a/boards/base/RaspberryPi/example-FreeRTOS/Makefile b/boards/base/RaspberryPi/example-FreeRTOS/Makefile
index c1751204..a8d64ad0 100644
--- a/boards/base/RaspberryPi/example-FreeRTOS/Makefile
+++ b/boards/base/RaspberryPi/example-FreeRTOS/Makefile
@@ -1,73 +1,55 @@
-# build environment
-PREFIX ?= /your compiler path/gcc-arm-none-eabi-4_8-2014q1
-ARCH ?= $(PREFIX)/bin/arm-none-eabi
-
-CC = ${ARCH}-gcc
-CPP = ${ARCH}-g++
-AS = ${ARCH}-as
-LD = ${ARCH}-ld
-AR = ${ARCH}-ar
-OBJCOPY = ${ARCH}-objcopy
-
-PLATFORM = raspi
-LINKER_SCRIPT = raspberrypi.ld
-
-CFLAGS = -march=armv6z -g -Wall -Wextra
-ASFLAGS = -g
-
-CFLAGS_FOR_TARGET = #-mcpu=arm1176jzf-s
-ASFLAGS_FOR_TARGET = #-mcpu=arm1176jzf-s
-LDFLAGS = #--error-unresolved-symbols
-
-GFXLIB := ../uGFX
-include $(GFXLIB)/gfx.mk
-include $(GFXLIB)/drivers/gdisp/framebuffer/driver.mk
-
-OSLIB := ../FreeRTOS
-MODULES := $(OSLIB)/Source/portable/GCC/RaspberryPi
-MODULES += $(OSLIB)/Source/portable/MemMang
-MODULES += $(OSLIB)/Source
-MODULES += Drivers
-
-SRC_DIR := $(MODULES)
-INC_DIR := $(addsuffix /include,$(SRC_DIR))
-BUILD_DIR := $(addsuffix /build,$(SRC_DIR))
-
-INCLUDEDIRS := $(OSLIB)/Source/portable/GCC/RaspberryPi
-INCLUDEDIRS += $(OSLIB)/Source/include
-INCLUDEDIRS += Drivers
-INCLUDEDIRS += $(GFXINC)
-
-INCLUDES := $(addprefix -I,$(INCLUDEDIRS))
-
-ASRC := $(foreach sdir,$(SRC_DIR),$(wildcard $(sdir)/*.s))
-AOBJ := $(ASRC:.s=.o)
-CSRC := $(foreach sdir,$(SRC_DIR),$(wildcard $(sdir)/*.c))
-CSRC += $(GFXSRC)
-COBJ := $(CSRC:.c=.o)
-
-vpath %.c $(SRC_DIR)
-vpath %.cpp $(SRC_DIR)
-vpath %.s $(SRC_DIR)
-
-%.o: %.c
- $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c -o $*.o $<
-
-%.o: %.s
- $(AS) $(ASFLAGS_FOR_TARGET) $(INCLUDES) $(ASFLAGS) -o $*.o $<
-
-OBJ = $(AOBJ) $(COBJ)
-
-bin/kernel.img: bin/kernel.elf
- ${OBJCOPY} -O binary $< $@
-
-bin/kernel.elf: LDFLAGS += -L "$(PREFIX)/lib/gcc/arm-none-eabi/4.8.3" -lgcc
-bin/kernel.elf: LDFLAGS += -L "$(PREFIX)/arm-none-eabi/lib" -lc
-bin/kernel.elf: $(OBJ)
- ${LD} $(OBJ) -Map bin/kernel.map -o $@ -T $(LINKER_SCRIPT) ${LDFLAGS}
-
-clean:
- rm -f bin/*.elf bin/*.img bin/*.map $(OBJ)
-
-
-
+# Possible Targets: all clean Debug cleanDebug Release cleanRelease
+
+##############################################################################################
+# Settings
+#
+
+# General settings
+ # See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables
+ OPT_OS = freertos
+ OPT_THUMB = yes
+ OPT_LINK_OPTIMIZE = yes
+ # For the raspberry pi we can either use the generic armv6 cpu or the highly optimized raspberrypi settings
+ OPT_CPU = raspberrypi
+
+# uGFX settings
+ # See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables
+ GFXLIB = ../uGFX
+ GFXBOARD = RaspberryPi
+ GFXDEMO = modules/gdisp/basics
+
+# FreeRTOS settings
+ifeq ($(OPT_OS),freertos)
+ # See $(GFXLIB)/tools/gmake_scripts/os_freertos.mk for the list of variables
+ FREERTOS = ../FreeRTOS
+ FREERTOS_BOARD = RaspberryPi
+ FREERTOS_MODULES = $(GFXLIB)/boards/base/RaspberryPi/FreeRTOS
+ FREERTOS_LDSCRIPT = $(GFXLIB)/boards/base/RaspberryPi/FreeRTOS/raspberrypi.ld
+endif
+
+##############################################################################################
+# Set these for your project
+#
+
+ARCH = arm-none-eabi-
+SRCFLAGS = -ggdb -O0
+CFLAGS =
+CXXFLAGS = -fno-rtti
+ASFLAGS =
+LDFLAGS =
+
+SRC =
+OBJS =
+DEFS =
+LIBS =
+INCPATH =
+LIBPATH =
+
+##############################################################################################
+# These should be at the end
+#
+
+include $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk
+include $(GFXLIB)/tools/gmake_scripts/os_$(OPT_OS).mk
+include $(GFXLIB)/tools/gmake_scripts/compiler_gcc.mk
+# *** EOF ***