mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
remove trailing whitespace and newlines
This commit is contained in:
parent
9fff3f5b90
commit
2525920426
4
Makefile
4
Makefile
@ -5,12 +5,12 @@ DIRS = $(RIOTCPU)/$(CPU) core drivers sys
|
|||||||
all:
|
all:
|
||||||
mkdir -p $(BINDIR)
|
mkdir -p $(BINDIR)
|
||||||
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
|
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
|
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
|
||||||
-@if [ -d $(BINDIR) ] ; \
|
-@if [ -d $(BINDIR) ] ; \
|
||||||
then rm -rf $(BINDIR) ; \
|
then rm -rf $(BINDIR) ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
"$(MAKE)" -BC doc/doxygen
|
"$(MAKE)" -BC doc/doxygen
|
||||||
|
@ -44,4 +44,3 @@ $(BINDIR)%.o: %.S
|
|||||||
# remove compilation products
|
# remove compilation products
|
||||||
clean::
|
clean::
|
||||||
$(AD)rm -f $(BINDIR)$(MODULE).a $(OBJ) $(DEP) $(ASMOBJ)
|
$(AD)rm -f $(BINDIR)$(MODULE).a $(OBJ) $(DEP) $(ASMOBJ)
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ endif
|
|||||||
|
|
||||||
ifneq (,$(findstring uart0,$(USEMODULE)))
|
ifneq (,$(findstring uart0,$(USEMODULE)))
|
||||||
ifeq (,$(findstring lib,$(USEMODULE)))
|
ifeq (,$(findstring lib,$(USEMODULE)))
|
||||||
USEMODULE += lib
|
USEMODULE += lib
|
||||||
endif
|
endif
|
||||||
ifeq (,$(findstring posix,$(USEMODULE)))
|
ifeq (,$(findstring posix,$(USEMODULE)))
|
||||||
USEMODULE += posix
|
USEMODULE += posix
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
ifeq ($(strip $(RIOTCPU)),)
|
ifeq ($(strip $(RIOTCPU)),)
|
||||||
export RIOTCPU =$(RIOTBASE)/cpu
|
export RIOTCPU =$(RIOTBASE)/cpu
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(RIOTBOARD)),)
|
ifeq ($(strip $(RIOTBOARD)),)
|
||||||
export RIOTBOARD =$(RIOTBASE)/boards
|
export RIOTBOARD =$(RIOTBASE)/boards
|
||||||
endif
|
endif
|
||||||
@ -46,7 +46,7 @@ all: $(BINDIR)$(PROJECT).a
|
|||||||
"$(MAKE)" -C $(RIOTBOARD)/$(BOARD)
|
"$(MAKE)" -C $(RIOTBOARD)/$(BOARD)
|
||||||
"$(MAKE)" -C $(RIOTBASE)
|
"$(MAKE)" -C $(RIOTBASE)
|
||||||
@for i in $(EXTERNAL_MODULES) ; do "$(MAKE)" -C $$i ; done ;
|
@for i in $(EXTERNAL_MODULES) ; do "$(MAKE)" -C $$i ; done ;
|
||||||
ifeq ($(BUILDOSXNATIVE),1)
|
ifeq ($(BUILDOSXNATIVE),1)
|
||||||
$(AD)$(LINK) $(UNDEF) -o $(BINDIR)$(PROJECT).elf $(BASELIBS) $(LINKFLAGS) -Wl,-no_pie
|
$(AD)$(LINK) $(UNDEF) -o $(BINDIR)$(PROJECT).elf $(BASELIBS) $(LINKFLAGS) -Wl,-no_pie
|
||||||
else
|
else
|
||||||
$(AD)$(LINK) $(UNDEF) -o $(BINDIR)$(PROJECT).elf -Wl,--start-group $(BASELIBS) -lm -Wl,--end-group -Wl,-Map=$(BINDIR)$(PROJECT).map $(LINKFLAGS)
|
$(AD)$(LINK) $(UNDEF) -o $(BINDIR)$(PROJECT).elf -Wl,--start-group $(BASELIBS) -lm -Wl,--end-group -Wl,-Map=$(BINDIR)$(PROJECT).map $(LINKFLAGS)
|
||||||
@ -57,12 +57,12 @@ endif
|
|||||||
## your make rules
|
## your make rules
|
||||||
## Only basic example - modify it for larger projects!!
|
## Only basic example - modify it for larger projects!!
|
||||||
#$(BINDIR)/$(PROJECT).a: $(BINDIR)/$(PROJECT).o
|
#$(BINDIR)/$(PROJECT).a: $(BINDIR)/$(PROJECT).o
|
||||||
# $(AR) -rc $(BINDIR)/project.a $(BINDIR)/$(PROJECT).o
|
# $(AR) -rc $(BINDIR)/project.a $(BINDIR)/$(PROJECT).o
|
||||||
|
|
||||||
# string array of all names of c files in dir
|
# string array of all names of c files in dir
|
||||||
SRC = $(wildcard *.c)
|
SRC = $(wildcard *.c)
|
||||||
|
|
||||||
# string array of all names replaced .c with .o
|
# string array of all names replaced .c with .o
|
||||||
OBJ = $(SRC:%.c=${BINDIR}${PROJECT}/%.o)
|
OBJ = $(SRC:%.c=${BINDIR}${PROJECT}/%.o)
|
||||||
|
|
||||||
$(BINDIR)$(PROJECT).a: $(OBJ)
|
$(BINDIR)$(PROJECT).a: $(OBJ)
|
||||||
|
56
README.md
56
README.md
@ -1,29 +1,29 @@
|
|||||||
ZZZZZZ
|
ZZZZZZ
|
||||||
ZZZZZZZZZZZZ
|
ZZZZZZZZZZZZ
|
||||||
ZZZZZZZZZZZZZZZZ
|
ZZZZZZZZZZZZZZZZ
|
||||||
ZZZZZZZ ZZZZZZ
|
ZZZZZZZ ZZZZZZ
|
||||||
ZZZZZZ ZZZZZ
|
ZZZZZZ ZZZZZ
|
||||||
ZZZZZ ZZZZ
|
ZZZZZ ZZZZ
|
||||||
ZZZZ ZZZZZ
|
ZZZZ ZZZZZ
|
||||||
ZZZZ ZZZZ
|
ZZZZ ZZZZ
|
||||||
ZZZZ ZZZZZ
|
ZZZZ ZZZZZ
|
||||||
ZZZZ ZZZZZZ
|
ZZZZ ZZZZZZ
|
||||||
ZZZZ ZZZZZZZZ 777 7777 7777777777
|
ZZZZ ZZZZZZZZ 777 7777 7777777777
|
||||||
ZZ ZZZZ ZZZZZZZZ 777 77777777 77777777777
|
ZZ ZZZZ ZZZZZZZZ 777 77777777 77777777777
|
||||||
ZZZZZZZ ZZZZ ZZZZZZZ 777 7777 7777 777
|
ZZZZZZZ ZZZZ ZZZZZZZ 777 7777 7777 777
|
||||||
ZZZZZZZZZ ZZZZ Z 777 777 777 777
|
ZZZZZZZZZ ZZZZ Z 777 777 777 777
|
||||||
ZZZZZZ ZZZZ 777 777 777 777
|
ZZZZZZ ZZZZ 777 777 777 777
|
||||||
ZZZZZ ZZZZ 777 777 777 777
|
ZZZZZ ZZZZ 777 777 777 777
|
||||||
ZZZZZ ZZZZZ ZZZZ 777 777 777 777
|
ZZZZZ ZZZZZ ZZZZ 777 777 777 777
|
||||||
ZZZZ ZZZZZ ZZZZZ 777 777 777 777
|
ZZZZ ZZZZZ ZZZZZ 777 777 777 777
|
||||||
ZZZZ ZZZZZ ZZZZZ 777 777 777 777
|
ZZZZ ZZZZZ ZZZZZ 777 777 777 777
|
||||||
ZZZZ ZZZZ ZZZZZ 777 777 777 777
|
ZZZZ ZZZZ ZZZZZ 777 777 777 777
|
||||||
ZZZZZ ZZZZZ ZZZZZ 777 777 777 777
|
ZZZZZ ZZZZZ ZZZZZ 777 777 777 777
|
||||||
ZZZZZZ ZZZZZZ ZZZZZ 777 7777777777 777
|
ZZZZZZ ZZZZZZ ZZZZZ 777 7777777777 777
|
||||||
ZZZZZZZZZZZZZZZ ZZZZ 777 77777777 777
|
ZZZZZZZZZZZZZZZ ZZZZ 777 77777777 777
|
||||||
ZZZZZZZZZZZ Z
|
ZZZZZZZZZZZ Z
|
||||||
ZZZZZ
|
ZZZZZ
|
||||||
|
|
||||||
The friendly Operating System for IoT!
|
The friendly Operating System for IoT!
|
||||||
|
|
||||||
## FEATURES
|
## FEATURES
|
||||||
@ -43,7 +43,7 @@ Its features comprise
|
|||||||
* TCP and UDP
|
* TCP and UDP
|
||||||
* 6LoWPAN
|
* 6LoWPAN
|
||||||
* RPL
|
* RPL
|
||||||
|
|
||||||
## GETTING STARTED
|
## GETTING STARTED
|
||||||
* You want to start the RIOT? Just follow our [Getting started documentation](https://github.com/RIOT-OS/RIOT/wiki/Introduction)
|
* You want to start the RIOT? Just follow our [Getting started documentation](https://github.com/RIOT-OS/RIOT/wiki/Introduction)
|
||||||
* The RIOT API itself can be built from the code using doxygen. The latest version is uploaded daily to http://riot-os.org/api.
|
* The RIOT API itself can be built from the code using doxygen. The latest version is uploaded daily to http://riot-os.org/api.
|
||||||
@ -96,7 +96,7 @@ For example, you can use it to the test the native networking by running the `./
|
|||||||
Free Software Foundation.
|
Free Software Foundation.
|
||||||
* Some external sources, especially files developed by SICS are published under
|
* Some external sources, especially files developed by SICS are published under
|
||||||
a separate license.
|
a separate license.
|
||||||
|
|
||||||
All code files contain licensing information.
|
All code files contain licensing information.
|
||||||
|
|
||||||
For more information, see the RIOT website:
|
For more information, see the RIOT website:
|
||||||
|
@ -197,4 +197,3 @@ void bl_init_ports(void)
|
|||||||
PINMODE4 |= (BIT23) | (BIT25) | (BIT27); // no resistors
|
PINMODE4 |= (BIT23) | (BIT25) | (BIT27); // no resistors
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ void cc1100_spi_init(void)
|
|||||||
while (SPI_RX_AVAIL) { // while RNE (Receive FIFO Not Empty)...
|
while (SPI_RX_AVAIL) { // while RNE (Receive FIFO Not Empty)...
|
||||||
dummy = SSP1DR; // read data
|
dummy = SSP1DR; // read data
|
||||||
}
|
}
|
||||||
|
|
||||||
/* to suppress unused-but-set-variable */
|
/* to suppress unused-but-set-variable */
|
||||||
(void) dummy;
|
(void) dummy;
|
||||||
}
|
}
|
||||||
@ -253,4 +253,3 @@ void cc1100_init_interrupts(void)
|
|||||||
// Enable external interrupt on low edge (for GDO0)
|
// Enable external interrupt on low edge (for GDO0)
|
||||||
FIO2DIR &= ~BIT6;
|
FIO2DIR &= ~BIT6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1331,5 +1331,3 @@ unsigned char SMB380_readGainTemp(uint16_t *gain)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ uint8_t SSP0Prepare(uint8_t chip, uint8_t datasize, uint8_t cpol, uint8_t cpha,
|
|||||||
for (uint32_t i = 0; i < FIFOSIZE; i++) {
|
for (uint32_t i = 0; i < FIFOSIZE; i++) {
|
||||||
dummy = SSP0DR; // clear the RxFIFO
|
dummy = SSP0DR; // clear the RxFIFO
|
||||||
}
|
}
|
||||||
|
|
||||||
/* to suppress unused-but-set-variable */
|
/* to suppress unused-but-set-variable */
|
||||||
(void) dummy;
|
(void) dummy;
|
||||||
|
|
||||||
@ -425,4 +425,3 @@ unsigned short acam_trx(const uint8_t data)
|
|||||||
SSP0_write(data, ACAMDMS);
|
SSP0_write(data, ACAMDMS);
|
||||||
return SSP0_read(ACAMDMS);
|
return SSP0_read(ACAMDMS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,4 +115,3 @@ unsigned short acam_trx(const uint8_t data);
|
|||||||
void SSP0Handler(void);
|
void SSP0Handler(void);
|
||||||
|
|
||||||
#endif /* __SSP_H__ */
|
#endif /* __SSP_H__ */
|
||||||
|
|
||||||
|
@ -30,4 +30,3 @@ int putchar(int c)
|
|||||||
_putchar(c);
|
_putchar(c);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
/**
|
/**
|
||||||
* @defgroup boards Boards
|
* @defgroup boards Boards
|
||||||
* @brief Board specific definitions and implementations
|
* @brief Board specific definitions and implementations
|
||||||
*
|
*
|
||||||
* The boards module contains all definitions and implementations, that are specific to a certain board. Boards
|
* The boards module contains all definitions and implementations, that are specific to a certain board. Boards
|
||||||
* generally consist of a fixed configuration of a controller and some external devices as sensors or radios. All
|
* generally consist of a fixed configuration of a controller and some external devices as sensors or radios. All
|
||||||
* aspects concerning pin-configurion, mcu clock and driver configuration should go into this module.
|
* aspects concerning pin-configurion, mcu clock and driver configuration should go into this module.
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*----------------------------------------------------------------------------
|
*----------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 ARM Limited. All rights reserved.
|
* Copyright (C) 2009 ARM Limited. All rights reserved.
|
||||||
* Copyright (C) 2013 Oliver Hahm <oliver.hahm@fu-berlin.de>
|
* Copyright (C) 2013 Oliver Hahm <oliver.hahm@fu-berlin.de>
|
||||||
*
|
*
|
||||||
* ARM Limited (ARM) is supplying this software for use with Cortex-M3
|
* ARM Limited (ARM) is supplying this software for use with Cortex-M3
|
||||||
* processor based microcontrollers. This file can be freely distributed
|
* processor based microcontrollers. This file can be freely distributed
|
||||||
|
@ -35,6 +35,6 @@ endif
|
|||||||
|
|
||||||
export FFLAGS += "prog $(HEXFILE)"
|
export FFLAGS += "prog $(HEXFILE)"
|
||||||
|
|
||||||
export USEMODULE += msp430_common
|
export USEMODULE += msp430_common
|
||||||
export INCLUDES += -I $(RIOTCPU)/msp430-common/include/ -I$(RIOTBOARD)/msb-430-common/include -I$(RIOTBOARD)/msb-430-common/drivers/include
|
export INCLUDES += -I $(RIOTCPU)/msp430-common/include/ -I$(RIOTBOARD)/msb-430-common/include -I$(RIOTBOARD)/msb-430-common/drivers/include
|
||||||
export OFLAGS = -O ihex
|
export OFLAGS = -O ihex
|
||||||
|
@ -74,4 +74,3 @@ interrupt(USART1RX_VECTOR) usart0irq(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
MODULE =$(BOARD)_base
|
MODULE =$(BOARD)_base
|
||||||
|
|
||||||
DIRS = $(RIOTBOARD)/msb-430-common
|
DIRS = $(RIOTBOARD)/msb-430-common
|
||||||
|
|
||||||
all: $(BINDIR)$(MODULE).a
|
all: $(BINDIR)$(MODULE).a
|
||||||
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
|
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
MODULE =$(BOARD)_base
|
MODULE =$(BOARD)_base
|
||||||
|
|
||||||
DIRS = $(RIOTBOARD)/msb-430-common
|
DIRS = $(RIOTBOARD)/msb-430-common
|
||||||
|
|
||||||
all: $(BINDIR)$(MODULE).a
|
all: $(BINDIR)$(MODULE).a
|
||||||
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
|
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
|
||||||
|
@ -3,4 +3,3 @@ ifneq (,$(findstring cc110x_ng,$(USEMODULE)))
|
|||||||
USEMODULE += cc110x_spi
|
USEMODULE += cc110x_spi
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -2,4 +2,3 @@ MODULE =$(BOARD)_base
|
|||||||
include $(RIOTBOARD)/$(BOARD)/Makefile.include
|
include $(RIOTBOARD)/$(BOARD)/Makefile.include
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.base
|
include $(RIOTBASE)/Makefile.base
|
||||||
|
|
||||||
|
@ -227,4 +227,3 @@ bl_uart_init(void)
|
|||||||
U0IER |= BIT0; // enable only RX irq
|
U0IER |= BIT0; // enable only RX irq
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,4 +48,3 @@ unsigned int benchmark_read_stop(void)
|
|||||||
T3TCR = 0; // disable timer
|
T3TCR = 0; // disable timer
|
||||||
return T3TC;
|
return T3TC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,6 +18,3 @@ Added 2103 chip to chip list. ID numbers for 2101 and 2102 unknown
|
|||||||
Added support for other chips
|
Added support for other chips
|
||||||
Added soft boot code
|
Added soft boot code
|
||||||
Added user configurable crystal value (for baud sync protocol)
|
Added user configurable crystal value (for baud sync protocol)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all.
|
|||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
The precise terms and conditions for copying, distribution and
|
||||||
modification follow.
|
modification follow.
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
|
|||||||
License. (Exception: if the Program itself is interactive but
|
License. (Exception: if the Program itself is interactive but
|
||||||
does not normally print such an announcement, your work based on
|
does not normally print such an announcement, your work based on
|
||||||
the Program is not required to print an announcement.)
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
These requirements apply to the modified work as a whole. If
|
||||||
identifiable sections of that work are not derived from the Program,
|
identifiable sections of that work are not derived from the Program,
|
||||||
and can be reasonably considered independent and separate works in
|
and can be reasonably considered independent and separate works in
|
||||||
@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
|
|||||||
access to copy the source code from the same place counts as
|
access to copy the source code from the same place counts as
|
||||||
distribution of the source code, even though third parties are not
|
distribution of the source code, even though third parties are not
|
||||||
compelled to copy the source along with the object code.
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
except as expressly provided under this License. Any attempt
|
except as expressly provided under this License. Any attempt
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
@ -225,7 +225,7 @@ impose that choice.
|
|||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
This section is intended to make thoroughly clear what is believed to
|
||||||
be a consequence of the rest of this License.
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
original copyright holder who places the Program under this License
|
original copyright holder who places the Program under this License
|
||||||
@ -278,7 +278,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
|||||||
POSSIBILITY OF SUCH DAMAGES.
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
Appendix: How to Apply These Terms to Your New Programs
|
Appendix: How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
@ -18,7 +18,7 @@ lpc2k_pgm: $(OBJS)
|
|||||||
|
|
||||||
pseudoterm: $(PSEUDOTERM_OBJS)
|
pseudoterm: $(PSEUDOTERM_OBJS)
|
||||||
mkdir -p $(TARGETDIR)
|
mkdir -p $(TARGETDIR)
|
||||||
$(CC) -o $(TARGETDIR)/pseudoterm $(PSEUDOTERM_OBJS) -lpthread
|
$(CC) -o $(TARGETDIR)/pseudoterm $(PSEUDOTERM_OBJS) -lpthread
|
||||||
|
|
||||||
chipinfo.o: boot_2xxx.h boot_23xx.h
|
chipinfo.o: boot_2xxx.h boot_23xx.h
|
||||||
|
|
||||||
|
@ -140,5 +140,3 @@ of the following:
|
|||||||
|
|
||||||
If you get "Command not found" when trying to run "gtk-config", this
|
If you get "Command not found" when trying to run "gtk-config", this
|
||||||
is a sure sign that you do not have GTK+ 1.2 installed.
|
is a sure sign that you do not have GTK+ 1.2 installed.
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
This directory contains flash & terminal-utilities for use with
|
This directory contains flash & terminal-utilities for use with
|
||||||
the msb_av2 platform used by the FeuerWhere-Project.
|
the msb_av2 platform used by the FeuerWhere-Project.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
fm.exe "COM(%1, 230400) DEVICE(LPC2387, 16.000000) HARDWARE(BOOTEXEC, 50, 100) HIGHSPEED(0, 230400) ERASEUSED(%2, PROTECTISP) HEXFILE(%2, NOCHECKSUMS, NOFILL, PROTECTISP) RESET"
|
fm.exe "COM(%1, 230400) DEVICE(LPC2387, 16.000000) HARDWARE(BOOTEXEC, 50, 100) HIGHSPEED(0, 230400) ERASEUSED(%2, PROTECTISP) HEXFILE(%2, NOCHECKSUMS, NOFILL, PROTECTISP) RESET"
|
||||||
sleep 2
|
sleep 2
|
||||||
|
@ -18,7 +18,7 @@ windows_flash_fm() {
|
|||||||
echo " target mismatch: target board is \"${FTDI_ID}\", connected is ${BOARDCHECK}"
|
echo " target mismatch: target board is \"${FTDI_ID}\", connected is ${BOARDCHECK}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Flashing ${HEXFILE} to COM${1} (${BOARDCHECK} serial ${SERIAL})"
|
echo "Flashing ${HEXFILE} to COM${1} (${BOARDCHECK} serial ${SERIAL})"
|
||||||
# Using FlashMagic on Windows (in separate window)
|
# Using FlashMagic on Windows (in separate window)
|
||||||
cmd /C start "FlashMagic ${HEXFILE} to ${BOARDCHECK} on COM${1}" fm.exe "COM(${1}, 230400) DEVICE(LPC2387, 16.000000) HARDWARE(BOOTEXEC, 50, 100) HIGHSPEED(0, 230400) ERASEUSED(${HEXFILE}, PROTECTISP) HEXFILE(${HEXFILE}, NOCHECKSUMS, NOFILL, PROTECTISP) RESET"
|
cmd /C start "FlashMagic ${HEXFILE} to ${BOARDCHECK} on COM${1}" fm.exe "COM(${1}, 230400) DEVICE(LPC2387, 16.000000) HARDWARE(BOOTEXEC, 50, 100) HIGHSPEED(0, 230400) ERASEUSED(${HEXFILE}, PROTECTISP) HEXFILE(${HEXFILE}, NOCHECKSUMS, NOFILL, PROTECTISP) RESET"
|
||||||
@ -75,7 +75,7 @@ pids=""
|
|||||||
if [ ${PORTS} = "openocd" ]; then
|
if [ ${PORTS} = "openocd" ]; then
|
||||||
[ "$OPENOCD" != "" ] || exit 1
|
[ "$OPENOCD" != "" ] || exit 1
|
||||||
[ "$OPENOCD_IF" != "" ] || exit 1
|
[ "$OPENOCD_IF" != "" ] || exit 1
|
||||||
# echo -n "Is the board connected to the JTAG a '${FTDI_ID}' (y/n)? "
|
# echo -n "Is the board connected to the JTAG a '${FTDI_ID}' (y/n)? "
|
||||||
# read REPLY
|
# read REPLY
|
||||||
# [ "$REPLY" = "y" ] || exit 1
|
# [ "$REPLY" = "y" ] || exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -24,5 +24,3 @@ print C "const unsigned int ${ARGV[0]}[] = {\n";
|
|||||||
print C "\t", join(', ', @data), "\n";
|
print C "\t", join(', ', @data), "\n";
|
||||||
print C "};\n";
|
print C "};\n";
|
||||||
close C;
|
close C;
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,4 +44,3 @@ for ($i=0; $i<@arg; $i++) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
|
@ -3,7 +3,3 @@ typedef struct {
|
|||||||
int size;
|
int size;
|
||||||
const int *prog;
|
const int *prog;
|
||||||
} boot_t;
|
} boot_t;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,5 +28,3 @@ const:
|
|||||||
.int 0xE01FC040 /* MEMMAP register */
|
.int 0xE01FC040 /* MEMMAP register */
|
||||||
.int 0xE01FC080 /* PLLCON */
|
.int 0xE01FC080 /* PLLCON */
|
||||||
.int 0xE01FC08C /* PLLFEED */
|
.int 0xE01FC08C /* PLLFEED */
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,7 +9,3 @@ begin:
|
|||||||
mov pc, #0 /* and then jump to the user's code */
|
mov pc, #0 /* and then jump to the user's code */
|
||||||
const:
|
const:
|
||||||
.int 0xE01FC040 /* MEMMAP register */
|
.int 0xE01FC040 /* MEMMAP register */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -153,4 +153,3 @@ char *lpc_return_strings[] = {
|
|||||||
"INVALID_CODE", "INVALID_BAUD_RATE", "INVALID_STOP_BIT",
|
"INVALID_CODE", "INVALID_BAUD_RATE", "INVALID_STOP_BIT",
|
||||||
"CODE_READ_PROTECTION_ENABLED"
|
"CODE_READ_PROTECTION_ENABLED"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -16,5 +16,3 @@ struct chip_info_struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern struct chip_info_struct chip_info[];
|
extern struct chip_info_struct chip_info[];
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,8 +78,3 @@ int main()
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,4 +5,3 @@ void hard_reset_to_bootloader(void);
|
|||||||
void hard_reset_to_user_code(void);
|
void hard_reset_to_user_code(void);
|
||||||
|
|
||||||
#endif // ..._H
|
#endif // ..._H
|
||||||
|
|
||||||
|
@ -1189,5 +1189,3 @@ void download_rx_term(const unsigned char *buf, int num)
|
|||||||
// while we are in the middle of downloading. Maybe
|
// while we are in the middle of downloading. Maybe
|
||||||
// we should look for CTRL-C and abort??
|
// we should look for CTRL-C and abort??
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -302,14 +302,3 @@ void put_ihex_data(int addr, int len, const unsigned char *bytes)
|
|||||||
addr++;
|
addr++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,6 +2,3 @@ extern int read_intel_hex(const char *filename);
|
|||||||
extern int bytes_within_range(int begin, int end);
|
extern int bytes_within_range(int begin, int end);
|
||||||
extern void get_ihex_data(int addr, int len, unsigned char *bytes);
|
extern void get_ihex_data(int addr, int len, unsigned char *bytes);
|
||||||
extern void put_ihex_data(int addr, int len, const unsigned char *bytes);
|
extern void put_ihex_data(int addr, int len, const unsigned char *bytes);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -100,4 +100,3 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
return programming_status;
|
return programming_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,5 +177,3 @@ int main(int argc, char **argv)
|
|||||||
close_serial_port();
|
close_serial_port();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -444,9 +444,3 @@ void set_dtr(int val)
|
|||||||
printf("Error %i while setting port io flags\n", errno);
|
printf("Error %i while setting port io flags\n", errno);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -206,4 +206,3 @@ void new_crystal_setting(const char *new_xtal)
|
|||||||
write_settings_file();
|
write_settings_file();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,6 +118,3 @@ static char uuchar(unsigned int val)
|
|||||||
|
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
extern void uuencode(char *str, const unsigned char *data, int num);
|
extern void uuencode(char *str, const unsigned char *data, int num);
|
||||||
extern int uudecode(const char *str, unsigned char *data, int max);
|
extern int uudecode(const char *str, unsigned char *data, int max);
|
||||||
|
|
||||||
|
@ -18,5 +18,5 @@ else
|
|||||||
echo "Usage:";
|
echo "Usage:";
|
||||||
echo "termctrl.sh continue/pause/stop";
|
echo "termctrl.sh continue/pause/stop";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
MODULE =$(BOARD)_base
|
MODULE =$(BOARD)_base
|
||||||
INCLUDES += -I$(RIOTBASE)/drivers/cc110x
|
INCLUDES += -I$(RIOTBASE)/drivers/cc110x
|
||||||
|
|
||||||
DIRS = $(RIOTBOARD)/msba2-common
|
DIRS = $(RIOTBOARD)/msba2-common
|
||||||
|
|
||||||
all: $(BINDIR)$(MODULE).a
|
all: $(BINDIR)$(MODULE).a
|
||||||
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
|
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
export INCLUDES += -I$(RIOTBOARD)/msba2/include
|
export INCLUDES += -I$(RIOTBOARD)/msba2/include
|
||||||
|
|
||||||
include $(RIOTBOARD)/msba2-common/Makefile.include
|
include $(RIOTBOARD)/msba2-common/Makefile.include
|
||||||
|
|
||||||
|
@ -3,4 +3,3 @@ ifneq (,$(findstring ltc4150,$(USEMODULE)))
|
|||||||
USEMODULE += hwtimer
|
USEMODULE += hwtimer
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -48,4 +48,3 @@ void _native_LED_RED_TOGGLE(void)
|
|||||||
{
|
{
|
||||||
printf("LED_RED_TOGGLE\n");
|
printf("LED_RED_TOGGLE\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
MODULE =$(BOARD)_base
|
MODULE =$(BOARD)_base
|
||||||
INCLUDES += -I$(RIOTBASE)/drivers/cc110x
|
INCLUDES += -I$(RIOTBASE)/drivers/cc110x
|
||||||
|
|
||||||
DIRS = $(RIOTBOARD)/msba2-common
|
DIRS = $(RIOTBOARD)/msba2-common
|
||||||
|
|
||||||
all: $(BINDIR)$(MODULE).a
|
all: $(BINDIR)$(MODULE).a
|
||||||
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
|
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
export INCLUDES += -I$(RIOTBOARD)/pttu/include
|
export INCLUDES += -I$(RIOTBOARD)/pttu/include
|
||||||
|
|
||||||
include $(RIOTBOARD)/msba2-common/Makefile.include
|
include $(RIOTBOARD)/msba2-common/Makefile.include
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#
|
#
|
||||||
set CPUTAPID 0x4f1f0f0f
|
set CPUTAPID 0x4f1f0f0f
|
||||||
|
|
||||||
jtag_speed 100
|
jtag_speed 100
|
||||||
@ -6,4 +6,3 @@ jtag_speed 100
|
|||||||
source [find interface/olimex-arm-usb-ocd.cfg]
|
source [find interface/olimex-arm-usb-ocd.cfg]
|
||||||
#source [find target/lpc2148.cfg]
|
#source [find target/lpc2148.cfg]
|
||||||
source lpc2378.cfg
|
source lpc2378.cfg
|
||||||
|
|
||||||
|
@ -21,38 +21,38 @@ proc mt_internal_rc {} {
|
|||||||
halt
|
halt
|
||||||
wait_halt 2
|
wait_halt 2
|
||||||
# PLL disconnect PLLCON
|
# PLL disconnect PLLCON
|
||||||
mww 0xE01FC080 0x01
|
mww 0xE01FC080 0x01
|
||||||
mww 0xE01FC08C 0xAA
|
mww 0xE01FC08C 0xAA
|
||||||
mww 0xE01FC08C 0x55
|
mww 0xE01FC08C 0x55
|
||||||
# PLL disable PLLCON
|
# PLL disable PLLCON
|
||||||
mww 0xE01FC080 0x00
|
mww 0xE01FC080 0x00
|
||||||
mww 0xE01FC08C 0xAA
|
mww 0xE01FC08C 0xAA
|
||||||
mww 0xE01FC08C 0x55
|
mww 0xE01FC08C 0x55
|
||||||
# no prescaler CCLKCFG
|
# no prescaler CCLKCFG
|
||||||
mww 0xE01FC104 0x00
|
mww 0xE01FC104 0x00
|
||||||
# internal RC CLKSRCSEL
|
# internal RC CLKSRCSEL
|
||||||
mww 0xE01FC10C 0x00
|
mww 0xE01FC10C 0x00
|
||||||
#### main oscil. CLKSRCSEL
|
#### main oscil. CLKSRCSEL
|
||||||
#### mww 0xE01FC10C 0x01
|
#### mww 0xE01FC10C 0x01
|
||||||
# remap to internal flash
|
# remap to internal flash
|
||||||
mww 0xE01FC040 0x01
|
mww 0xE01FC040 0x01
|
||||||
sleep 100
|
sleep 100
|
||||||
jtag_khz 500
|
jtag_khz 500
|
||||||
flash probe 0
|
flash probe 0
|
||||||
}
|
}
|
||||||
|
|
||||||
proc mt_flash_bin {IMGFILE OFFSET} {
|
proc mt_flash_bin {IMGFILE OFFSET} {
|
||||||
mt_internal_rc
|
mt_internal_rc
|
||||||
flash write_image erase $IMGFILE $OFFSET
|
flash write_image erase $IMGFILE $OFFSET
|
||||||
sleep 100
|
sleep 100
|
||||||
verify_image $IMGFILE $OFFSET
|
verify_image $IMGFILE $OFFSET
|
||||||
sleep 100
|
sleep 100
|
||||||
}
|
}
|
||||||
|
|
||||||
proc mt_flash_v {IMGFILE} {
|
proc mt_flash_v {IMGFILE} {
|
||||||
mt_internal_rc
|
mt_internal_rc
|
||||||
flash write_image erase $IMGFILE
|
flash write_image erase $IMGFILE
|
||||||
sleep 100
|
sleep 100
|
||||||
verify_image $IMGFILE
|
verify_image $IMGFILE
|
||||||
sleep 100
|
sleep 100
|
||||||
}
|
}
|
||||||
@ -64,7 +64,7 @@ proc mt_flash {IMGFILE} {
|
|||||||
|
|
||||||
flash bank lpc2000 0x0 0x7d000 0 0 0 lpc2000_v2 4000 calc_checksum
|
flash bank lpc2000 0x0 0x7d000 0 0 0 lpc2000_v2 4000 calc_checksum
|
||||||
|
|
||||||
arm7_9 dcc_downloads enable
|
arm7_9 dcc_downloads enable
|
||||||
|
|
||||||
gdb_flash_program enable
|
gdb_flash_program enable
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#winheight regs 11
|
#winheight regs 11
|
||||||
set history save on
|
set history save on
|
||||||
set history size 1000
|
set history size 1000
|
||||||
target remote localhost:3333
|
target remote localhost:3333
|
||||||
monitor mt_internal_rc
|
monitor mt_internal_rc
|
||||||
load
|
load
|
||||||
compare-sections
|
compare-sections
|
||||||
@ -12,4 +12,3 @@ monitor debug_level 0
|
|||||||
break bootloader
|
break bootloader
|
||||||
continue
|
continue
|
||||||
d b 1
|
d b 1
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ export CFLAGS += -std=gnu99 -march=armv4t -mtune=arm7tdmi-s -mlong-calls \
|
|||||||
-msoft-float -mthumb-interwork -fno-strict-aliasing -fno-common \
|
-msoft-float -mthumb-interwork -fno-strict-aliasing -fno-common \
|
||||||
-ffixed-r8 -ffunction-sections -ffreestanding -fno-builtin \
|
-ffixed-r8 -ffunction-sections -ffreestanding -fno-builtin \
|
||||||
-nodefaultlibs -Wcast-align -Wall -Wstrict-prototypes -Wextra \
|
-nodefaultlibs -Wcast-align -Wall -Wstrict-prototypes -Wextra \
|
||||||
-Os -pipe
|
-Os -pipe
|
||||||
export CFLAGS_MTHUMB ?= -mthumb
|
export CFLAGS_MTHUMB ?= -mthumb
|
||||||
$(warning TODO add -mthumb)
|
$(warning TODO add -mthumb)
|
||||||
export AFLAGS = -Wa,-gstabs $(CFLAGS)
|
export AFLAGS = -Wa,-gstabs $(CFLAGS)
|
||||||
|
@ -82,7 +82,7 @@ struct UART_struct {
|
|||||||
uint32_t : 27;
|
uint32_t : 27;
|
||||||
} CTSbits;
|
} CTSbits;
|
||||||
};
|
};
|
||||||
|
|
||||||
uint32_t BR; /*< BR is 32bit access only */
|
uint32_t BR; /*< BR is 32bit access only */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
|
|
||||||
#include "nvm.h"
|
#include "nvm.h"
|
||||||
|
|
||||||
nvm_err_t (*nvm_detect) (nvm_interface_t nvm_interface, nvm_type_t* p_nvm_type)
|
nvm_err_t (*nvm_detect) (nvm_interface_t nvm_interface, nvm_type_t* p_nvm_type)
|
||||||
= (void*) 0x00006cb9;
|
= (void*) 0x00006cb9;
|
||||||
nvm_err_t (*nvm_read) (nvm_interface_t nvm_interface, nvm_type_t nvm_type, void *p_dest, uint32_t address, uint32_t num_bytes)
|
nvm_err_t (*nvm_read) (nvm_interface_t nvm_interface, nvm_type_t nvm_type, void *p_dest, uint32_t address, uint32_t num_bytes)
|
||||||
= (void*) 0x00006d69;
|
= (void*) 0x00006d69;
|
||||||
nvm_err_t (*nvm_write) (nvm_interface_t nvm_interface, nvm_type_t nvm_type, void *p_src, uint32_t address, uint32_t numb_bytes)
|
nvm_err_t (*nvm_write) (nvm_interface_t nvm_interface, nvm_type_t nvm_type, void *p_src, uint32_t address, uint32_t numb_bytes)
|
||||||
= (void*) 0x00006ec5;
|
= (void*) 0x00006ec5;
|
||||||
|
@ -26,7 +26,7 @@ void uart_set_baudrate(volatile struct UART_struct *uart, uint32_t baudrate)
|
|||||||
/* multiply by another 10 to get a fixed point*/
|
/* multiply by another 10 to get a fixed point*/
|
||||||
inc = ((uint64_t) baudrate * DIV_ * MOD_ * 10 / CLK_) - 10;
|
inc = ((uint64_t) baudrate * DIV_ * MOD_ * 10 / CLK_) - 10;
|
||||||
/* add 5 and div by 10 to get a proper rounding */
|
/* add 5 and div by 10 to get a proper rounding */
|
||||||
inc = (inc + 5) / 10;
|
inc = (inc + 5) / 10;
|
||||||
|
|
||||||
/* disable UARTx to set baudrate */
|
/* disable UARTx to set baudrate */
|
||||||
uart->CONbits.TXE = 0;
|
uart->CONbits.TXE = 0;
|
||||||
@ -183,4 +183,3 @@ void bl_uart_init(void)
|
|||||||
{
|
{
|
||||||
uart_init(UART1, BAUTRATE_UART1);
|
uart_init(UART1, BAUTRATE_UART1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,4 +28,3 @@
|
|||||||
typedef uint8_t radio_packet_length_t;
|
typedef uint8_t radio_packet_length_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@ my $zerolen;
|
|||||||
GetOptions ('file=s' => \$filename,
|
GetOptions ('file=s' => \$filename,
|
||||||
'secondfile=s' => \$second,
|
'secondfile=s' => \$second,
|
||||||
'zerolen' => \$zerolen,
|
'zerolen' => \$zerolen,
|
||||||
'terminal=s' => \$term,
|
'terminal=s' => \$term,
|
||||||
'verbose' => \$verbose,
|
'verbose' => \$verbose,
|
||||||
'u|baud=s' => \$baud,
|
'u|baud=s' => \$baud,
|
||||||
'rts=s' => \$rts,
|
'rts=s' => \$rts,
|
||||||
'command=s' => \$command,
|
'command=s' => \$command,
|
||||||
@ -77,12 +77,12 @@ my $s = 0;
|
|||||||
my $reset = 0;
|
my $reset = 0;
|
||||||
my $size = 0;
|
my $size = 0;
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
|
|
||||||
my $c; my $count; my $ret = ''; my $test='';
|
my $c; my $count; my $ret = ''; my $test='';
|
||||||
|
|
||||||
if($s == 1) { print "secondary send...\n"; }
|
if($s == 1) { print "secondary send...\n"; }
|
||||||
|
|
||||||
$ob->write(pack('C','0'));
|
$ob->write(pack('C','0'));
|
||||||
|
|
||||||
if(($command ne '') &&
|
if(($command ne '') &&
|
||||||
@ -91,25 +91,25 @@ while(1) {
|
|||||||
system($command);
|
system($command);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($s == 1) {
|
if($s == 1) {
|
||||||
$test = 'ready';
|
$test = 'ready';
|
||||||
} else {
|
} else {
|
||||||
$test = 'CONNECT';
|
$test = 'CONNECT';
|
||||||
}
|
}
|
||||||
|
|
||||||
until($ret =~ /$test$/) {
|
until($ret =~ /$test$/) {
|
||||||
($count,$c) = $ob->read(1);
|
($count,$c) = $ob->read(1);
|
||||||
if ($count == 0) {
|
if ($count == 0) {
|
||||||
print '.';
|
print '.';
|
||||||
$ob->write(pack('C','0'));
|
$ob->write(pack('C','0'));
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
$ret .= $c;
|
$ret .= $c;
|
||||||
}
|
}
|
||||||
print $ret . "\n";
|
print $ret . "\n";
|
||||||
|
|
||||||
if (-e $filename || (defined($zerolen) && ($s == 1))) {
|
if (-e $filename || (defined($zerolen) && ($s == 1))) {
|
||||||
|
|
||||||
if(defined($zerolen) && ($s == 1)) {
|
if(defined($zerolen) && ($s == 1)) {
|
||||||
$size = 0;
|
$size = 0;
|
||||||
} else {
|
} else {
|
||||||
@ -123,7 +123,7 @@ while(1) {
|
|||||||
((!defined($zerolen)) && ($s == 1))) {
|
((!defined($zerolen)) && ($s == 1))) {
|
||||||
open(FILE, $filename) or die($!);
|
open(FILE, $filename) or die($!);
|
||||||
print "Sending $filename\n";
|
print "Sending $filename\n";
|
||||||
|
|
||||||
my $i = 1;
|
my $i = 1;
|
||||||
while(read(FILE, $c, 1)) {
|
while(read(FILE, $c, 1)) {
|
||||||
$i++;
|
$i++;
|
||||||
@ -133,7 +133,7 @@ while(1) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
last if ($s==1);
|
last if ($s==1);
|
||||||
if((-e $second) || defined($zerolen)) {
|
if((-e $second) || defined($zerolen)) {
|
||||||
$s=1; $filename = $second;
|
$s=1; $filename = $second;
|
||||||
@ -141,7 +141,7 @@ while(1) {
|
|||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print "done sending files.\n";
|
print "done sending files.\n";
|
||||||
|
|
||||||
@ -168,4 +168,3 @@ $ob -> close or die "Close failed: $!\n";
|
|||||||
ReadMode 0;
|
ReadMode 0;
|
||||||
undef $ob; # closes port AND frees memory in perl
|
undef $ob; # closes port AND frees memory in perl
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
@ -1,2 +1 @@
|
|||||||
USEMODULE += msp430_common
|
USEMODULE += msp430_common
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ void cc2420_spi_init(void)
|
|||||||
P3DIR &= ~(0x04); /* P3.2 as input for SOMI */
|
P3DIR &= ~(0x04); /* P3.2 as input for SOMI */
|
||||||
P4OUT |= 0x04; /* P4.2 radio CS, hold high */
|
P4OUT |= 0x04; /* P4.2 radio CS, hold high */
|
||||||
P4DIR |= 0x04; /* P4.2 radio CS, output */
|
P4DIR |= 0x04; /* P4.2 radio CS, output */
|
||||||
|
|
||||||
/* Keep peripheral in reset state */
|
/* Keep peripheral in reset state */
|
||||||
U0CTL = SWRST;
|
U0CTL = SWRST;
|
||||||
|
|
||||||
@ -179,14 +179,14 @@ void cc2420_spi_init(void)
|
|||||||
/* CKPL works also, but not CKPH+CKPL or none of them!! */
|
/* CKPL works also, but not CKPH+CKPL or none of them!! */
|
||||||
U0CTL |= CHAR + SYNC + MM;
|
U0CTL |= CHAR + SYNC + MM;
|
||||||
U0TCTL = CKPH + SSEL1 + SSEL0 + STC + TXEPT;;
|
U0TCTL = CKPH + SSEL1 + SSEL0 + STC + TXEPT;;
|
||||||
|
|
||||||
/* Ignore clockrate argument for now, just use clock source/2 */
|
/* Ignore clockrate argument for now, just use clock source/2 */
|
||||||
/* SMCLK = 8 MHz */
|
/* SMCLK = 8 MHz */
|
||||||
U0BR0 = 0x02; /* Ensure baud rate >= 2 */
|
U0BR0 = 0x02; /* Ensure baud rate >= 2 */
|
||||||
U0BR1 = 0x00;
|
U0BR1 = 0x00;
|
||||||
U0MCTL = 0x00; /* No modulation */
|
U0MCTL = 0x00; /* No modulation */
|
||||||
U0RCTL = 0x00; /* Reset Receive Control Register */
|
U0RCTL = 0x00; /* Reset Receive Control Register */
|
||||||
|
|
||||||
/* Enable SPI mode */
|
/* Enable SPI mode */
|
||||||
ME1 |= USPIE0;
|
ME1 |= USPIE0;
|
||||||
|
|
||||||
|
@ -115,4 +115,3 @@ interrupt(USART1RX_VECTOR) usart1irq(void)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,4 +22,3 @@ export FFLAGS = -d $(PORT) -j uif "prog $(HEXFILE)"
|
|||||||
|
|
||||||
export INCLUDES += -I$(RIOTBOARD)/wsn430-common/include
|
export INCLUDES += -I$(RIOTBOARD)/wsn430-common/include
|
||||||
export OFLAGS = -O ihex
|
export OFLAGS = -O ihex
|
||||||
|
|
||||||
|
@ -145,8 +145,8 @@ void msp430_init_dco(void)
|
|||||||
void board_init() {
|
void board_init() {
|
||||||
msp430_cpu_init();
|
msp430_cpu_init();
|
||||||
msb_ports_init();
|
msb_ports_init();
|
||||||
|
|
||||||
LED_RED_ON;
|
LED_RED_ON;
|
||||||
|
|
||||||
msp430_set_cpu_speed(MCLK_8MHZ_SCLK_8MHZ);
|
msp430_set_cpu_speed(MCLK_8MHZ_SCLK_8MHZ);
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef BOARD_CONF_H
|
#ifndef BOARD_CONF_H
|
||||||
#define BOARD_CONF_H
|
#define BOARD_CONF_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
@ -60,4 +60,3 @@ interrupt(USART0RX_VECTOR) usart0irq(void) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,14 +169,14 @@ void cc110x_spi_init(void)
|
|||||||
// CKPL works also, but not CKPH+CKPL or none of them!!
|
// CKPL works also, but not CKPH+CKPL or none of them!!
|
||||||
U1CTL |= CHAR + SYNC + MM;
|
U1CTL |= CHAR + SYNC + MM;
|
||||||
U1TCTL = CKPH + SSEL1 + SSEL0 + STC;
|
U1TCTL = CKPH + SSEL1 + SSEL0 + STC;
|
||||||
|
|
||||||
// Ignore clockrate argument for now, just use clock source/2
|
// Ignore clockrate argument for now, just use clock source/2
|
||||||
// SMCLK = 8 MHz
|
// SMCLK = 8 MHz
|
||||||
U1BR0 = 0x02; // Ensure baud rate >= 2
|
U1BR0 = 0x02; // Ensure baud rate >= 2
|
||||||
U1BR1 = 0x00;
|
U1BR1 = 0x00;
|
||||||
U1MCTL = 0x00; // No modulation
|
U1MCTL = 0x00; // No modulation
|
||||||
U1RCTL = 0x00; // Reset Receive Control Register
|
U1RCTL = 0x00; // Reset Receive Control Register
|
||||||
|
|
||||||
// Enable SPI mode
|
// Enable SPI mode
|
||||||
ME2 |= USPIE1;
|
ME2 |= USPIE1;
|
||||||
|
|
||||||
|
@ -168,14 +168,14 @@ void cc2420_spi_init(void)
|
|||||||
// CKPL works also, but not CKPH+CKPL or none of them!!
|
// CKPL works also, but not CKPH+CKPL or none of them!!
|
||||||
U1CTL |= CHAR + SYNC + MM;
|
U1CTL |= CHAR + SYNC + MM;
|
||||||
U1TCTL = CKPH + SSEL1 + SSEL0 + STC;
|
U1TCTL = CKPH + SSEL1 + SSEL0 + STC;
|
||||||
|
|
||||||
// Ignore clockrate argument for now, just use clock source/2
|
// Ignore clockrate argument for now, just use clock source/2
|
||||||
// SMCLK = 8 MHz
|
// SMCLK = 8 MHz
|
||||||
U1BR0 = 0x02; // Ensure baud rate >= 2
|
U1BR0 = 0x02; // Ensure baud rate >= 2
|
||||||
U1BR1 = 0x00;
|
U1BR1 = 0x00;
|
||||||
U1MCTL = 0x00; // No modulation
|
U1MCTL = 0x00; // No modulation
|
||||||
U1RCTL = 0x00; // Reset Receive Control Register
|
U1RCTL = 0x00; // Reset Receive Control Register
|
||||||
|
|
||||||
// Enable SPI mode
|
// Enable SPI mode
|
||||||
ME2 |= USPIE1;
|
ME2 |= USPIE1;
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Public License. See the file LICENSE in the top level directory for more
|
* Public License. See the file LICENSE in the top level directory for more
|
||||||
* details.
|
* details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup core_util
|
* @ingroup core_util
|
||||||
* @{
|
* @{
|
||||||
@ -69,4 +69,3 @@ number_of_bits_set(unsigned v)
|
|||||||
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Public License. See the file LICENSE in the top level directory for more
|
* Public License. See the file LICENSE in the top level directory for more
|
||||||
* details.
|
* details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup core_util
|
* @ingroup core_util
|
||||||
* @{
|
* @{
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Public License. See the file LICENSE in the top level directory for more
|
* Public License. See the file LICENSE in the top level directory for more
|
||||||
* details.
|
* details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup core_util
|
* @ingroup core_util
|
||||||
* @{
|
* @{
|
||||||
|
@ -9,17 +9,17 @@
|
|||||||
/**
|
/**
|
||||||
* @defgroup core Kernel
|
* @defgroup core Kernel
|
||||||
* @brief The RIOT micro-kernel containing the core functionality
|
* @brief The RIOT micro-kernel containing the core functionality
|
||||||
*
|
*
|
||||||
* The kernel module contains only the basic OS functionality such as the sheduler, threading, synchronization
|
* The kernel module contains only the basic OS functionality such as the sheduler, threading, synchronization
|
||||||
* and IRQ-handling. The only exception is the integration of the hardware timer into this module.
|
* and IRQ-handling. The only exception is the integration of the hardware timer into this module.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup core_util Kernel utilities
|
* @defgroup core_util Kernel utilities
|
||||||
* @ingroup core
|
* @ingroup core
|
||||||
* @brief Utilies and data structures used by the kernel
|
* @brief Utilies and data structures used by the kernel
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup core_internal Startup and Configuration
|
* @defgroup core_internal Startup and Configuration
|
||||||
* @ingroup core
|
* @ingroup core
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Public License. See the file LICENSE in the top level directory for more
|
* Public License. See the file LICENSE in the top level directory for more
|
||||||
* details.
|
* details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup core_hwtimer
|
* @ingroup core_hwtimer
|
||||||
* @{
|
* @{
|
||||||
@ -141,7 +141,7 @@ void hwtimer_wait(unsigned long ticks)
|
|||||||
hwtimer_spin(ticks);
|
hwtimer_spin(ticks);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* try to lock mutex again will cause the thread to go into
|
/* try to lock mutex again will cause the thread to go into
|
||||||
* STATUS_MUTEX_BLOCKED until hwtimer fires the releasemutex */
|
* STATUS_MUTEX_BLOCKED until hwtimer fires the releasemutex */
|
||||||
mutex_lock(&mutex);
|
mutex_lock(&mutex);
|
||||||
@ -217,4 +217,3 @@ int hwtimer_remove(int n)
|
|||||||
hwtimer_arch_enable_interrupt();
|
hwtimer_arch_enable_interrupt();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Public License. See the file LICENSE in the top level directory for more
|
* Public License. See the file LICENSE in the top level directory for more
|
||||||
* details.
|
* details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup core_util
|
* @addtogroup core_util
|
||||||
* @{
|
* @{
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* details.
|
* details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup core_util
|
* @addtogroup core_util
|
||||||
* @{
|
* @{
|
||||||
*
|
*
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Public License. See the file LICENSE in the top level directory for more
|
* Public License. See the file LICENSE in the top level directory for more
|
||||||
* details.
|
* details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup core_util
|
* @addtogroup core_util
|
||||||
* @{
|
* @{
|
||||||
|
@ -46,4 +46,3 @@ void clist_print(clist_node_t *clist);
|
|||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
#endif // __CLIST_H
|
#endif // __CLIST_H
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Public License. See the file LICENSE in the top level directory for more
|
* Public License. See the file LICENSE in the top level directory for more
|
||||||
* details.
|
* details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup core_util
|
* @addtogroup core_util
|
||||||
* @{
|
* @{
|
||||||
@ -18,10 +18,10 @@
|
|||||||
* @author Freie Universität Berlin, Computer Systems & Telematics
|
* @author Freie Universität Berlin, Computer Systems & Telematics
|
||||||
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DEBUG_H
|
#ifndef __DEBUG_H
|
||||||
#define __DEBUG_H
|
#define __DEBUG_H
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#if ENABLE_DEBUG
|
#if ENABLE_DEBUG
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Public License. See the file LICENSE in the top level directory for more
|
* Public License. See the file LICENSE in the top level directory for more
|
||||||
* details.
|
* details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup core_hwtimer
|
* @addtogroup core_hwtimer
|
||||||
* @{
|
* @{
|
||||||
@ -18,7 +18,7 @@
|
|||||||
* @author Heiko Will <hwill@inf.fu-berlin.de>
|
* @author Heiko Will <hwill@inf.fu-berlin.de>
|
||||||
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HWTIMER_ARCH_H_
|
#ifndef HWTIMER_ARCH_H_
|
||||||
#define HWTIMER_ARCH_H_
|
#define HWTIMER_ARCH_H_
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ void lifo_init(int *array, int n);
|
|||||||
* @brief: insert an element into the lifo
|
* @brief: insert an element into the lifo
|
||||||
*
|
*
|
||||||
* @param array: an integer array of least i+1 size that does not
|
* @param array: an integer array of least i+1 size that does not
|
||||||
* already contain i
|
* already contain i
|
||||||
* @param i: the integer value to store, between 0 and the size
|
* @param i: the integer value to store, between 0 and the size
|
||||||
* of the array -1, must not be stored already
|
* of the array -1, must not be stored already
|
||||||
*
|
*
|
||||||
@ -51,7 +51,7 @@ void lifo_insert(int *array, int i);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief: extract the least recently inserted element from the lifo
|
* @brief: extract the least recently inserted element from the lifo
|
||||||
*
|
*
|
||||||
* @param array: an integer array
|
* @param array: an integer array
|
||||||
*
|
*
|
||||||
* @return: -1 if the lifo is empty, the least recently
|
* @return: -1 if the lifo is empty, the least recently
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
* calling msg_init_queue(msg_t* array, int num). Messages sent to a thread with a non full message
|
* calling msg_init_queue(msg_t* array, int num). Messages sent to a thread with a non full message
|
||||||
* queue are never dropped and the sending never blocks. Threads with a full message queue behaves
|
* queue are never dropped and the sending never blocks. Threads with a full message queue behaves
|
||||||
* like in synchronous mode.
|
* like in synchronous mode.
|
||||||
*
|
*
|
||||||
* @{
|
* @{
|
||||||
*
|
*
|
||||||
* @file msg.h
|
* @file msg.h
|
||||||
|
@ -47,7 +47,7 @@ void sched_run(void);
|
|||||||
/**
|
/**
|
||||||
* @brief Set the status of the specified process
|
* @brief Set the status of the specified process
|
||||||
*
|
*
|
||||||
* @param[in] process Pointer to the thread control block of the
|
* @param[in] process Pointer to the thread control block of the
|
||||||
* targeted process
|
* targeted process
|
||||||
* @param[in] status The new status of this thread
|
* @param[in] status The new status of this thread
|
||||||
*/
|
*/
|
||||||
@ -60,8 +60,8 @@ void sched_set_status(tcb_t *process, unsigned int status);
|
|||||||
*
|
*
|
||||||
* @param[in] current_prio The priority of the current thread
|
* @param[in] current_prio The priority of the current thread
|
||||||
* @param[in] other_prio The priority of the target thread
|
* @param[in] other_prio The priority of the target thread
|
||||||
* @param[in] in_isr 1 if currently in interrupt context, 0 otherwise
|
* @param[in] in_isr 1 if currently in interrupt context, 0 otherwise
|
||||||
*/
|
*/
|
||||||
void sched_switch(uint16_t current_prio, uint16_t other_prio, int in_isr);
|
void sched_switch(uint16_t current_prio, uint16_t other_prio, int in_isr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Public License. See the file LICENSE in the top level directory for more
|
* Public License. See the file LICENSE in the top level directory for more
|
||||||
* details.
|
* details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup core_thread
|
* @addtogroup core_thread
|
||||||
* @{
|
* @{
|
||||||
@ -37,12 +37,12 @@
|
|||||||
#define STATUS_STOPPED (0x0008) /**< has terminated */
|
#define STATUS_STOPPED (0x0008) /**< has terminated */
|
||||||
#define STATUS_SLEEPING (0x0010) /**< sleeping */
|
#define STATUS_SLEEPING (0x0010) /**< sleeping */
|
||||||
#define STATUS_MUTEX_BLOCKED (0x0020) /**< waiting for a locked mutex */
|
#define STATUS_MUTEX_BLOCKED (0x0020) /**< waiting for a locked mutex */
|
||||||
#define STATUS_RECEIVE_BLOCKED (0x0040) /**< waiting for a message */
|
#define STATUS_RECEIVE_BLOCKED (0x0040) /**< waiting for a message */
|
||||||
#define STATUS_SEND_BLOCKED (0x0080) /**< waiting for message to be
|
#define STATUS_SEND_BLOCKED (0x0080) /**< waiting for message to be
|
||||||
* delivered */
|
* delivered */
|
||||||
#define STATUS_REPLY_BLOCKED (0x0100) /**< waiting for a message response */
|
#define STATUS_REPLY_BLOCKED (0x0100) /**< waiting for a message response */
|
||||||
#define STATUS_TIMER_WAITING (0x0200) /**< waiting for a timer to fire
|
#define STATUS_TIMER_WAITING (0x0200) /**< waiting for a timer to fire
|
||||||
* (deprecated) */
|
* (deprecated) */
|
||||||
|
|
||||||
typedef struct tcb_t {
|
typedef struct tcb_t {
|
||||||
char *sp;
|
char *sp;
|
||||||
|
@ -84,4 +84,3 @@ void kernel_init(void)
|
|||||||
|
|
||||||
cpu_switch_context_exit();
|
cpu_switch_context_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
*
|
*
|
||||||
* @file oneway_malloc.c
|
* @file oneway_malloc.c
|
||||||
* @brief Simple malloc wrapper for SBRK
|
* @brief Simple malloc wrapper for SBRK
|
||||||
*
|
*
|
||||||
* Simple malloc implementation for plattforms without malloc in libc.
|
* Simple malloc implementation for plattforms without malloc in libc.
|
||||||
*
|
*
|
||||||
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
||||||
*
|
*
|
||||||
* @}
|
* @}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Public License. See the file LICENSE in the top level directory for more
|
* Public License. See the file LICENSE in the top level directory for more
|
||||||
* details.
|
* details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup core_util
|
* @ingroup core_util
|
||||||
* @{
|
* @{
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*
|
*
|
||||||
* @}
|
* @}
|
||||||
*
|
*
|
||||||
* TODO: setup dependency from SCHEDSTATISTICS to MODULE_HWTIMER
|
* TODO: setup dependency from SCHEDSTATISTICS to MODULE_HWTIMER
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -2,4 +2,3 @@ MODULE =arm_common
|
|||||||
|
|
||||||
CFLAGS += $(CFLAGS_BASIC)
|
CFLAGS += $(CFLAGS_BASIC)
|
||||||
include $(RIOTBASE)/Makefile.base
|
include $(RIOTBASE)/Makefile.base
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
INCLUDES += -I$(MAKEBASE)/cpu/arm_common/include/
|
INCLUDES += -I$(MAKEBASE)/cpu/arm_common/include/
|
||||||
|
|
||||||
export UNDEF += $(BINDIR)syscalls.o
|
export UNDEF += $(BINDIR)syscalls.o
|
||||||
|
|
||||||
|
@ -94,5 +94,3 @@ unsigned enableFIQ(void)
|
|||||||
__set_cpsr(_cpsr & ~FIQ_MASK);
|
__set_cpsr(_cpsr & ~FIQ_MASK);
|
||||||
return _cpsr;
|
return _cpsr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,4 +15,3 @@ atomic_set_return:
|
|||||||
MOV r0, r2
|
MOV r0, r2
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
.endfunc
|
.endfunc
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
.func
|
.func
|
||||||
dINT:
|
dINT:
|
||||||
mrs r0, cpsr
|
mrs r0, cpsr
|
||||||
|
|
||||||
orr r0, r0, #NOINT /* Disable Int */
|
orr r0, r0, #NOINT /* Disable Int */
|
||||||
msr CPSR_c, r0
|
msr CPSR_c, r0
|
||||||
mov pc,lr
|
mov pc,lr
|
||||||
@ -83,9 +83,9 @@ ctx_switch2:
|
|||||||
ldr r1, =active_thread /* r1 = &active_thread */
|
ldr r1, =active_thread /* r1 = &active_thread */
|
||||||
ldr r1, [r1] /* r1 = *r1 = active_thread */
|
ldr r1, [r1] /* r1 = *r1 = active_thread */
|
||||||
|
|
||||||
str lr, [r1] /* store stack pointer in tasks tcb*/
|
str lr, [r1] /* store stack pointer in tasks tcb*/
|
||||||
/* now the calling task has all its registers saved on its stack and it's SP is saved in its tcb */
|
/* now the calling task has all its registers saved on its stack and it's SP is saved in its tcb */
|
||||||
|
|
||||||
|
|
||||||
/* call scheduler so active_thread points to the next task */
|
/* call scheduler so active_thread points to the next task */
|
||||||
bl sched_run
|
bl sched_run
|
||||||
@ -95,7 +95,7 @@ ctx_switch2:
|
|||||||
cpu_switch_context_exit:
|
cpu_switch_context_exit:
|
||||||
mov r0, #NOINT|SVCMODE
|
mov r0, #NOINT|SVCMODE
|
||||||
msr cpsr, r0
|
msr cpsr, r0
|
||||||
|
|
||||||
/* call scheduler so active_thread points to the next task */
|
/* call scheduler so active_thread points to the next task */
|
||||||
bl sched_run
|
bl sched_run
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ task_return:
|
|||||||
ldr r0, =active_thread /* r0 = &active_thread */
|
ldr r0, =active_thread /* r0 = &active_thread */
|
||||||
ldr r0, [r0] /* r0 = *r0 = active_thread */
|
ldr r0, [r0] /* r0 = *r0 = active_thread */
|
||||||
ldr r0, [r0]
|
ldr r0, [r0]
|
||||||
|
|
||||||
/* restore saved spsr and return address from tasks stack */
|
/* restore saved spsr and return address from tasks stack */
|
||||||
ldmfd r0!, {r1,lr}
|
ldmfd r0!, {r1,lr}
|
||||||
msr SPSR, r1
|
msr SPSR, r1
|
||||||
@ -125,7 +125,7 @@ arm_irq_handler:
|
|||||||
|
|
||||||
/* save interrupted tasks PC onto stack */
|
/* save interrupted tasks PC onto stack */
|
||||||
stmfd sp!, {lr}
|
stmfd sp!, {lr}
|
||||||
|
|
||||||
/* save all registers on isr stack */
|
/* save all registers on isr stack */
|
||||||
stmfd sp!, {r0-r12}
|
stmfd sp!, {r0-r12}
|
||||||
|
|
||||||
@ -133,8 +133,8 @@ arm_irq_handler:
|
|||||||
MRS R0, SPSR
|
MRS R0, SPSR
|
||||||
STMFD SP!, {R0}
|
STMFD SP!, {R0}
|
||||||
|
|
||||||
MRS R1, CPSR
|
MRS R1, CPSR
|
||||||
MSR SPSR, R1
|
MSR SPSR, R1
|
||||||
|
|
||||||
.if CPU != mc1322x
|
.if CPU != mc1322x
|
||||||
/* jump into vic interrupt */
|
/* jump into vic interrupt */
|
||||||
@ -147,10 +147,10 @@ arm_irq_handler:
|
|||||||
.endif
|
.endif
|
||||||
|
|
||||||
mov pc, r0
|
mov pc, r0
|
||||||
|
|
||||||
/* restore spsr from stack */
|
/* restore spsr from stack */
|
||||||
LDMFD SP!, {R0}
|
LDMFD SP!, {R0}
|
||||||
MSR SPSR, R0
|
MSR SPSR, R0
|
||||||
|
|
||||||
/* check if context switch was requested by irq */
|
/* check if context switch was requested by irq */
|
||||||
ldr r0, =sched_context_switch_request
|
ldr r0, =sched_context_switch_request
|
||||||
@ -160,7 +160,7 @@ arm_irq_handler:
|
|||||||
bne switch_context_int
|
bne switch_context_int
|
||||||
|
|
||||||
exit_irq_int:
|
exit_irq_int:
|
||||||
/* recover general purpose registers */
|
/* recover general purpose registers */
|
||||||
ldmfd sp!, {r0-r12}
|
ldmfd sp!, {r0-r12}
|
||||||
|
|
||||||
/* recover tasks PC into lr */
|
/* recover tasks PC into lr */
|
||||||
@ -170,8 +170,7 @@ exit_irq_int:
|
|||||||
movs pc, lr
|
movs pc, lr
|
||||||
|
|
||||||
switch_context_int:
|
switch_context_int:
|
||||||
/* recover general purpose registers */
|
/* recover general purpose registers */
|
||||||
ldmfd sp!, {r0-r12}
|
ldmfd sp!, {r0-r12}
|
||||||
|
|
||||||
b ctx_switch2
|
b ctx_switch2
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
INCLUDES += -I$(MAKEBASE)/cpu/cc430/include/
|
INCLUDES += -I$(MAKEBASE)/cpu/cc430/include/
|
||||||
|
|
||||||
include $(RIOTCPU)/msp430-common/Makefile.include
|
include $(RIOTCPU)/msp430-common/Makefile.include
|
||||||
|
|
||||||
|
@ -159,5 +159,3 @@ interrupt(ADC12_VECTOR) __attribute__((naked)) adc_isr(void)
|
|||||||
|
|
||||||
__exit_isr();
|
__exit_isr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -241,4 +241,3 @@ interrupt(PORT2_VECTOR) __attribute__((naked)) port2_isr(void)
|
|||||||
P2IE = int_enable;
|
P2IE = int_enable;
|
||||||
__exit_isr();
|
__exit_isr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
/**
|
/**
|
||||||
* @defgroup cpu CPU
|
* @defgroup cpu CPU
|
||||||
* @brief CPU specific implementations
|
* @brief CPU specific implementations
|
||||||
*
|
*
|
||||||
* This module contains all CPU specific source files. In case of multiple CPUs
|
* This module contains all CPU specific source files. In case of multiple CPUs
|
||||||
* sharing the same architecture, the implementation is split in a cpu specific
|
* sharing the same architecture, the implementation is split in a cpu specific
|
||||||
* and a architecture specific part (eg. arm-common and lpc2387).
|
* and a architecture specific part (eg. arm-common and lpc2387).
|
||||||
|
@ -14,7 +14,7 @@ MEMORY
|
|||||||
* with other linker script that defines memory regions FLASH and RAM.
|
* with other linker script that defines memory regions FLASH and RAM.
|
||||||
* It references following symbols, which must be defined in code:
|
* It references following symbols, which must be defined in code:
|
||||||
* Reset_Handler : Entry of reset handler
|
* Reset_Handler : Entry of reset handler
|
||||||
*
|
*
|
||||||
* It defines following symbols, which code can use without definition:
|
* It defines following symbols, which code can use without definition:
|
||||||
* __exidx_start
|
* __exidx_start
|
||||||
* __exidx_end
|
* __exidx_end
|
||||||
@ -67,7 +67,7 @@ SECTIONS
|
|||||||
KEEP(*(.eh_frame*))
|
KEEP(*(.eh_frame*))
|
||||||
} > FLASH
|
} > FLASH
|
||||||
|
|
||||||
.ARM.extab :
|
.ARM.extab :
|
||||||
{
|
{
|
||||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
} > FLASH
|
} > FLASH
|
||||||
@ -81,7 +81,7 @@ SECTIONS
|
|||||||
|
|
||||||
__etext = .;
|
__etext = .;
|
||||||
__sidata = __etext;
|
__sidata = __etext;
|
||||||
|
|
||||||
.data : AT (__etext)
|
.data : AT (__etext)
|
||||||
{
|
{
|
||||||
__data_start__ = .;
|
__data_start__ = .;
|
||||||
@ -122,7 +122,7 @@ SECTIONS
|
|||||||
*(COMMON)
|
*(COMMON)
|
||||||
__bss_end__ = .;
|
__bss_end__ = .;
|
||||||
} > RAM
|
} > RAM
|
||||||
|
|
||||||
__heap_size = ORIGIN(RAM) + LENGTH(RAM) - . ;/*- __stack_size;*/
|
__heap_size = ORIGIN(RAM) + LENGTH(RAM) - . ;/*- __stack_size;*/
|
||||||
.heap :
|
.heap :
|
||||||
{
|
{
|
||||||
@ -131,7 +131,7 @@ SECTIONS
|
|||||||
end = __end__;
|
end = __end__;
|
||||||
*(.heap*)
|
*(.heap*)
|
||||||
. = . + __heap_size;
|
. = . + __heap_size;
|
||||||
PROVIDE(__heap_max = .);
|
PROVIDE(__heap_max = .);
|
||||||
__HeapLimit = .;
|
__HeapLimit = .;
|
||||||
} > RAM
|
} > RAM
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ SECTIONS
|
|||||||
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
|
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
|
||||||
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
|
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
|
||||||
PROVIDE(__stack = __StackTop);
|
PROVIDE(__stack = __StackTop);
|
||||||
|
|
||||||
/* Check if data + heap + stack exceeds RAM limit */
|
/* Check if data + heap + stack exceeds RAM limit */
|
||||||
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
|
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user