osd-contiki/cpu/x86/Makefile.x86
Andre Guedes 5f47bafc6a x86: Add Real-Time Clock Driver
This patch adds a driver for Real-Time Clock (RTC). The RTC timer is
suitable to implement some operating system features such as the
system clock. Actually, the RTC will be used to implement the system
clock in galileo platform.

The driver introduced by this patch programs the RTC to generate
interrupt periodically. The interrupt frequency can be configured by the
user. On each RTC interrupt, a callback configured by the user is called.
As expected, that callback is executed in interrupt context so the user
should be aware of what it is not supposed to do (e.g. to call blocking
functions).

This patch also adds the inb() helper function to helpers.h. The helpers
is a wrapper for assembly 'in' instruction.
2015-12-21 08:06:14 -02:00

34 lines
714 B
Makefile

CONTIKI_CPU_DIRS = . drivers
CONTIKI_SOURCEFILES += mtarch.c gdt.c helpers.S idt.c cpu.c rtc.c
### Compiler definitions
CC = gcc
LD = gcc
AS = as
OBJCOPY = objcopy
SIZE = size
STRIP = strip
CFLAGSNO = -Wall -g -I/usr/local/include
CFLAGS += $(CFLAGSNO)
ifeq ($(HOST_OS),Linux)
LDFLAGS = -Wl,-Map=contiki-$(TARGET).map,-export-dynamic
else
LDFLAGS = -Wl
endif
### Compilation rules
%.so: $(OBJECTDIR)/%.o
$(LD) -shared -o $@ $^
ifdef CORE
.PHONY: symbols.c symbols.h
symbols.c symbols.h:
$(NM) $(CORE) | awk -f $(CONTIKI)/tools/mknmlist > symbols.c
else
symbols.c symbols.h:
cp ${CONTIKI}/tools/empty-symbols.c symbols.c
cp ${CONTIKI}/tools/empty-symbols.h symbols.h
endif