Skip to content

Commit

Permalink
Merge pull request #33 from mikoff/master
Browse files Browse the repository at this point in the history
updated Chronos support
  • Loading branch information
OlegHahm committed Mar 31, 2013
2 parents ad0b7a8 + 4f638eb commit 1ee0196
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ PROJBINDIR =$(CURDIR)/bin

## make script for your project. Build RIOT-base here!
all: $(PROJBINDIR)/$(PROJECT).a
@echo "Building project $(PROJECT) for $(BOARD) w/ MCU $(CPU)."
@echo "Building project $(PROJECT) for $(BOARD) w/ MCU $(MCU)."
$(MAKE) -C $(RIOTBOARD)
$(MAKE) -C $(RIOTBASE)
@$(LINK) $(UNDEF) -o $(PROJBINDIR)/$(PROJECT).elf -Wl,--start-group $(BASELIBS) -lm -Wl,--end-group -Wl,-Map=$(PROJBINDIR)/$(PROJECT).map $(LINKFLAGS)
Expand Down
2 changes: 1 addition & 1 deletion cpu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ifeq ($(CPU),lpc214x)
endif

ifeq ($(CPU),cc430)
DIRS = msp430 cc430
DIRS = msp430-common cc430
endif

ifeq ($(CPU),msp430x16x)
Expand Down
3 changes: 2 additions & 1 deletion cpu/cc430/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MODULE =cpu

INCLUDES = -Iinclude -Idrivers/include -I../arm_common/include -I../../sys/lib -I../../sys/drivers/include -I../../core/include -I../../sys/include -I../../hal/include -I../../..
INCLUDES += -Iinclude -Idrivers/include -I../arm_common/include -I../../sys/lib -I../../sys/drivers/include -I../../core/include -I../../sys/include -I../../hal/include -I../../..
INCLUDES += -I$(RIOTBASE)/drivers/cc110x_ng/include
DIRS =

all: $(BINDIR)$(MODULE).a
Expand Down
2 changes: 1 addition & 1 deletion cpu/cc430/cc430-adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* ************************************************************************************************/


#include <signal.h>
#include <legacymsp430.h>
#include <cpu.h>
#include <cc430-adc.h>
#include <hwtimer.h>
Expand Down
11 changes: 6 additions & 5 deletions cpu/cc430/cc430-gpioint.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ and the mailinglist (subscription via web site)
*******************************************************************************/

#include <stdlib.h>
#include <signal.h>
#include <legacymsp430.h>
#include <gpioint.h>
#include <bitarithm.h>
#include <cpu.h>
#include <irq.h>
#include <hwtimer.h>
#include <cc430x613x.h>
#include <cc430f6137.h>

/** min and max portnumber to generate interrupts */
#define PORTINT_MIN (1)
Expand Down Expand Up @@ -222,9 +222,10 @@ interrupt (PORT2_VECTOR) __attribute__ ((naked)) port2_isr(void) {
cb[1][ifg_num]();
}
}
else {
cb[1][ifg_num]();
}

//else {
// cb[1][ifg_num]();
//}

P2IFG = 0x00;
P2IE = int_enable;
Expand Down
4 changes: 2 additions & 2 deletions cpu/cc430/cc430-rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ and the mailinglist (subscription via web site)
*/

#include <string.h>
#include <signal.h>
#include <legacymsp430.h>
#include <irq.h>
#include <cpu.h>
#include <cc430x613x.h>
#include <cc430f6137.h>
#include <cc430-rtc.h>

//static volatile time_t epoch;
Expand Down
4 changes: 2 additions & 2 deletions cpu/cc430/hwtimer_cc430.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <signal.h>
#include <legacymsp430.h>
#include <board.h>
#include <hwtimer.h>
#include <hwtimer_arch.h>
Expand All @@ -12,7 +12,7 @@ static uint32_t ticks = 0;
extern void (*int_handler)(int);
extern void TA0_unset(short timer);

void timerA_init()
void timerA_init(void)
{
ticks = 0; // Set tick counter value to 0
TA0CTL = TASSEL_1 + TACLR; // Clear the timer counter, set ACLK
Expand Down
2 changes: 1 addition & 1 deletion cpu/msp430-common/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MODULE =cpu

INCLUDES = -Iinclude -I$(RIOTBASE)/core/include/ -I$(RIOTBOARD)/$(BOARD)/include
INCLUDES += -Iinclude -I$(RIOTBASE)/core/include/ -I$(RIOTBOARD)/$(BOARD)/include
DIRS =

all: $(BINDIR)$(MODULE).a
Expand Down
7 changes: 5 additions & 2 deletions cpu/msp430-common/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ For further information and questions please use the web site
and the mailinglist (subscription via web site)
scatterweb@lists.spline.inf.fu-berlin.de
*******************************************************************************/

#include <msp430x16x.h>
#ifdef CC430
#include <cc430f6137.h>
#else
#include <msp430x16x.h>
#endif
#include "cpu.h"
#include "kernel.h"
#include "kernel_intern.h"
Expand Down
2 changes: 1 addition & 1 deletion cpu/msp430-common/flashrom.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <stddef.h>
#include <stdint.h>
#include <msp430x16x.h>
#include <msp430x16x.h>
#include <irq.h>

uint8_t ie1, ie2;
Expand Down
2 changes: 1 addition & 1 deletion cpu/msp430-common/include/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ and the mailinglist (subscription via web site)

#include <sched.h>
#include <stdio.h>
#include <signal.h>
#include <legacymsp430.h>
#include <cpu-conf.h>

#define WORDSIZE 16
Expand Down
6 changes: 5 additions & 1 deletion cpu/msp430-common/include/hwtimer_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ and the mailinglist (subscription via web site)
#ifndef __HWTIMER_CPU_H
#define __HWTIMER_CPU_H

#include <msp430x16x.h>
#ifdef CC430
#include <cc430f6137.h>
#else
#include <msp430x16x.h>
#endif
#include <stdint.h>

#ifdef __MSP430_HAS_TA2__
Expand Down
6 changes: 5 additions & 1 deletion cpu/msp430-common/irq.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#include <irq.h>
#include <msp430x16x.h>
#ifdef CC430
#include <cc430f6137.h>
#else
#include <msp430x16x.h>
#endif
#include <cpu.h>

unsigned int disableIRQ() {
Expand Down
6 changes: 5 additions & 1 deletion cpu/msp430-common/msp430-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@
*/

#include "cpu.h"
#include <msp430x16x.h>
#ifdef CC430
#include <cc430f6137.h>
#else
#include <msp430x16x.h>
#endif
#include "msp430.h"


Expand Down

0 comments on commit 1ee0196

Please sign in to comment.