Move cpu, dev and platform into a new top-level directory: drivers

This commit is contained in:
Simon Duquennoy 2017-05-15 16:58:13 +02:00
parent 16611693e3
commit 54d6756815
1084 changed files with 67 additions and 4392 deletions

8
.gitmodules vendored
View File

@ -4,11 +4,11 @@
[submodule "tools/cc2538-bsl"]
path = tools/cc2538-bsl
url = https://github.com/JelmerT/cc2538-bsl.git
[submodule "cpu/cc26xx-cc13xx/lib/cc26xxware"]
path = cpu/cc26xx-cc13xx/lib/cc26xxware
[submodule "drivers/cpu/cc26xx-cc13xx/lib/cc26xxware"]
path = drivers/cpu/cc26xx-cc13xx/lib/cc26xxware
url = https://github.com/contiki-os/cc26xxware.git
[submodule "cpu/cc26xx-cc13xx/lib/cc13xxware"]
path = cpu/cc26xx-cc13xx/lib/cc13xxware
[submodule "drivers/cpu/cc26xx-cc13xx/lib/cc13xxware"]
path = drivers/cpu/cc26xx-cc13xx/lib/cc13xxware
url = https://github.com/contiki-os/cc13xxware.git
[submodule "tools/sensniff"]
path = tools/sensniff

View File

@ -42,7 +42,7 @@ usage:
@echo "make MAKETARGETS... [TARGET=(TARGET)] [savetarget] [targets]"
targets:
@ls -1 $(CONTIKI)/platform $(TARGETDIRS) | grep -v CVS
@ls -1 $(CONTIKI)/drivers/platform $(TARGETDIRS) | grep -v CVS
savetarget:
-@rm -f Makefile.target
@ -116,7 +116,7 @@ uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
ifdef APPS
APPDS = ${wildcard ${foreach DIR, $(APPDIRS), ${addprefix $(DIR)/, $(APPS)}}} \
${wildcard ${addprefix $(CONTIKI)/apps/, $(APPS)} \
${addprefix $(CONTIKI)/platform/$(TARGET)/apps/, $(APPS)} \
${addprefix $(CONTIKI)/drivers/platform/$(TARGET)/apps/, $(APPS)} \
$(APPS)}
APPINCLUDES = ${foreach APP, $(APPS), ${wildcard ${foreach DIR, $(APPDS), $(DIR)/Makefile.$(APP)}}}
-include $(APPINCLUDES)
@ -126,7 +126,7 @@ endif
### Include target makefile (TODO Unsafe?)
target_makefile := $(wildcard $(CONTIKI)/platform/$(TARGET)/Makefile.$(TARGET) ${foreach TDIR, $(TARGETDIRS), $(TDIR)/$(TARGET)/Makefile.$(TARGET)})
target_makefile := $(wildcard $(CONTIKI)/drivers/platform/$(TARGET)/Makefile.$(TARGET) ${foreach TDIR, $(TARGETDIRS), $(TDIR)/$(TARGET)/Makefile.$(TARGET)})
# Check if the target makefile exists, and create the object directory if necessary.
ifeq ($(strip $(target_makefile)),)
@ -173,8 +173,9 @@ CONTIKI_TARGET_DIRS_CONCAT = ${addprefix ${dir $(target_makefile)}, \
$(CONTIKI_TARGET_DIRS)}
CONTIKI_CPU_DIRS_CONCAT = ${addprefix $(CONTIKI_CPU)/, \
$(CONTIKI_CPU_DIRS)}
CONTIKI_DRIVERS_DIRS = ${addprefix $(CONTIKI)/, drivers}
SOURCEDIRS = . $(PROJECTDIRS) $(CONTIKI_TARGET_DIRS_CONCAT) \
SOURCEDIRS = . $(PROJECTDIRS) $(CONTIKI_TARGET_DIRS_CONCAT) $(CONTIKI_DRIVERS_DIRS) \
$(CONTIKI_CPU_DIRS_CONCAT) $(CONTIKIDIRS) $(APPDS) $(EXTERNALDIRS) ${dir $(target_makefile)}
vpath %.c $(SOURCEDIRS)
@ -219,7 +220,7 @@ clean:
distclean: clean
-rm -f ${addsuffix .$(TARGET),$(CONTIKI_PROJECT)}
-include $(CONTIKI)/platform/$(TARGET)/Makefile.customrules-$(TARGET)
-include $(CONTIKI)/drivers/platform/$(TARGET)/Makefile.customrules-$(TARGET)
ifndef CUSTOM_RULE_C_TO_CE
%.ce: %.c

View File

@ -1,312 +0,0 @@
; Copyright (c) 2014, Analog Devices, Inc. All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted (subject to the limitations in the
; disclaimer below) provided that the following conditions are met:
;
; - Redistributions of source code must retain the above copyright
; notice, this list of conditions and the following disclaimer.
;
; - Redistributions in binary form must reproduce the above copyright
; notice, this list of conditions and the following disclaimer in the
; documentation and/or other materials provided with the
; distribution.
;
; - Neither the name of Analog Devices, Inc. nor the names of its
; contributors may be used to endorse or promote products derived
; from this software without specific prior written permission.
;
; NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
; GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
; HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
; WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
; Module : startup_ADuCRF101.s
; Description : Cortex-M3 startup file - ADuCRF101 - RealView Version
; Date : 14 January 2013
; Version : v1.01
; Changelog : v1.01 Added call to SystemInit
; Changelog : v1.00 Initial
IMPORT __use_no_semihosting_swi
; Amount of memory (in bytes) allocated for Stack
; Tailor this value to your application needs
; <h> Stack Configuration
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Stack_Size EQU 0x00000400
AREA STACK, NOINIT, READWRITE, ALIGN=3
Stack_Mem SPACE Stack_Size
__initial_sp
; <h> Heap Configuration
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Heap_Size EQU 0x00000200
AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem SPACE Heap_Size
__heap_limit
PRESERVE8
THUMB
; Vector Table Mapped to Address 0 at Reset
AREA RESET, DATA, READONLY
EXPORT __Vectors
EXPORT __Vectors_End
EXPORT __Vectors_Size
__Vectors DCD __initial_sp ; Top of Stack
DCD Reset_Handler ; Reset Handler
DCD NMI_Handler ; The NMI handler
DCD HardFault_Handler ; The hard fault handler
DCD MemManage_Handler ; The MPU fault handler
DCD BusFault_Handler ; The bus fault handler
DCD UsageFault_Handler ; The usage fault handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD SVC_Handler ; SVCall handler
DCD DebugMon_Handler ; Debug monitor handler
DCD 0 ; Reserved
DCD PendSV_Handler ; The PendSV handler
DCD SysTick_Handler ; The SysTick handler
; External Interrupts
DCD WakeUp_Int_Handler ; Wake Up Timer [ 0]
DCD Ext_Int0_Handler ; External Interrupt 0 [ 1]
DCD Ext_Int1_Handler ; External Interrupt 1 [ 2]
DCD Ext_Int2_Handler ; External Interrupt 2 [ 3]
DCD Ext_Int3_Handler ; External Interrupt 3 [ 4]
DCD Ext_Int4_Handler ; External Interrupt 4 [ 5]
DCD Ext_Int5_Handler ; External Interrupt 5 [ 6]
DCD Ext_Int6_Handler ; External Interrupt 6 [ 7]
DCD Ext_Int7_Handler ; External Interrupt 7 [ 8]
DCD Ext_Int8_Handler ; External Interrupt 8 [ 9]
DCD WDog_Tmr_Int_Handler ; Watchdog timer handler [10]
DCD UnUsed_Handler ; Reserved [11]
DCD GP_Tmr0_Int_Handler ; General purpose timer 0 [12]
DCD GP_Tmr1_Int_Handler ; General purpose timer 1 [13]
DCD ADC0_Int_Handler ; ADC Interrupt [14]
DCD Flsh_Int_Handler ; Flash IRQ [15]
DCD UART_Int_Handler ; UART0 [16]
DCD SPI0_Int_Handler ; SPI 0 [17]
DCD SPI1_Int_Handler ; SPI 1 [18]
DCD I2C0_Slave_Int_Handler ; I2C0 Slave [19]
DCD I2C0_Master_Int_Handler ; I2C0 Master [20]
DCD UnUsed_Handler ; Reserved [21]
DCD UnUsed_Handler ; Reserved [22]
DCD DMA_Err_Int_Handler ; DMA Error interrupt [23]
DCD DMA_SPI1_TX_Int_Handler ; DMA SPI1 TX [24]
DCD DMA_SPI1_RX_Int_Handler ; DMA SPI1 RX [25]
DCD DMA_UART_TX_Int_Handler ; DMA UART TX [26]
DCD DMA_UART_RX_Int_Handler ; DMA UART RX [27]
DCD DMA_I2C0_STX_Int_Handler ; DMA I2C0 Slave TX [28]
DCD DMA_I2C0_SRX_Int_Handler ; DMA I2C0 Slave RX [29]
DCD DMA_I2C0_MTX_Int_Handler ; DMA I2C0 Master TX [30]
DCD DMA_I2C0_MRX_Int_Handler ; DMA I2C0 Master RX [31]
DCD UnUsed_Handler ; Reserved [32]
DCD UnUsed_Handler ; Reserved [33]
DCD UnUsed_Handler ; Reserved [34]
DCD DMA_ADC_Int_Handler ; DMA ADC [35]
DCD DMA_SPI0_TX_Int_Handler ; DMA SPI0 TX [36]
DCD DMA_SPI0_RX_Int_Handler ; DMA SPI0 RX [37]
DCD PWMTrip_Int_Handler ; PWM Trip [38]
DCD PWM0_Int_Handler ; PWM 0 [39]
DCD PWM1_Int_Handler ; PWM 1 [40]
DCD PWM2_Int_Handler ; PWM 2 [41]
DCD PWM3_Int_Handler ; PWM 3 [42]
DCD UnUsed_Handler ; Unused [43]
__Vectors_End
__Vectors_Size EQU __Vectors_End - __Vectors
AREA |.text|, CODE, READONLY
; Reset handler
Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
IMPORT SystemInit
IMPORT __main
LDR R0, =SystemInit ; Defined in system_ADuCRF101.c
BLX R0
LDR R0, =__main
BX R0
ENDP
; Dummy Exception Handlers (infinite loops which can be modified)
NMI_Handler PROC
EXPORT NMI_Handler [WEAK]
B .
ENDP
HardFault_Handler\
PROC
EXPORT HardFault_Handler [WEAK]
B .
ENDP
MemManage_Handler\
PROC
EXPORT MemManage_Handler [WEAK]
B .
ENDP
BusFault_Handler\
PROC
EXPORT BusFault_Handler [WEAK]
B .
ENDP
UsageFault_Handler\
PROC
EXPORT UsageFault_Handler [WEAK]
B .
ENDP
SVC_Handler PROC
EXPORT SVC_Handler [WEAK]
B .
ENDP
DebugMon_Handler\
PROC
EXPORT DebugMon_Handler [WEAK]
B .
ENDP
PendSV_Handler PROC
EXPORT PendSV_Handler [WEAK]
B .
ENDP
SysTick_Handler PROC
EXPORT SysTick_Handler [WEAK]
B .
ENDP
Default_Handler PROC
EXPORT WakeUp_Int_Handler [WEAK]
EXPORT Ext_Int0_Handler [WEAK]
EXPORT Ext_Int1_Handler [WEAK]
EXPORT Ext_Int2_Handler [WEAK]
EXPORT Ext_Int3_Handler [WEAK]
EXPORT Ext_Int4_Handler [WEAK]
EXPORT Ext_Int5_Handler [WEAK]
EXPORT Ext_Int6_Handler [WEAK]
EXPORT Ext_Int7_Handler [WEAK]
EXPORT Ext_Int8_Handler [WEAK]
EXPORT WDog_Tmr_Int_Handler [WEAK]
EXPORT GP_Tmr0_Int_Handler [WEAK]
EXPORT GP_Tmr1_Int_Handler [WEAK]
EXPORT ADC0_Int_Handler [WEAK]
EXPORT Flsh_Int_Handler [WEAK]
EXPORT UART_Int_Handler [WEAK]
EXPORT SPI0_Int_Handler [WEAK]
EXPORT SPI1_Int_Handler [WEAK]
EXPORT I2C0_Slave_Int_Handler [WEAK]
EXPORT I2C0_Master_Int_Handler [WEAK]
EXPORT DMA_Err_Int_Handler [WEAK]
EXPORT DMA_SPI1_TX_Int_Handler [WEAK]
EXPORT DMA_SPI1_RX_Int_Handler [WEAK]
EXPORT DMA_UART_TX_Int_Handler [WEAK]
EXPORT DMA_UART_RX_Int_Handler [WEAK]
EXPORT DMA_I2C0_STX_Int_Handler [WEAK]
EXPORT DMA_I2C0_SRX_Int_Handler [WEAK]
EXPORT DMA_I2C0_MTX_Int_Handler [WEAK]
EXPORT DMA_I2C0_MRX_Int_Handler [WEAK]
EXPORT DMA_ADC_Int_Handler [WEAK]
EXPORT DMA_SPI0_TX_Int_Handler [WEAK]
EXPORT DMA_SPI0_RX_Int_Handler [WEAK]
EXPORT PWMTrip_Int_Handler [WEAK]
EXPORT PWM0_Int_Handler [WEAK]
EXPORT PWM1_Int_Handler [WEAK]
EXPORT PWM2_Int_Handler [WEAK]
EXPORT PWM3_Int_Handler [WEAK]
EXPORT UnUsed_Handler [WEAK]
WakeUp_Int_Handler
Ext_Int0_Handler
Ext_Int1_Handler
Ext_Int2_Handler
Ext_Int3_Handler
Ext_Int4_Handler
Ext_Int5_Handler
Ext_Int6_Handler
Ext_Int7_Handler
Ext_Int8_Handler
WDog_Tmr_Int_Handler
GP_Tmr0_Int_Handler
GP_Tmr1_Int_Handler
ADC0_Int_Handler
Flsh_Int_Handler
UART_Int_Handler
SPI0_Int_Handler
SPI1_Int_Handler
I2C0_Slave_Int_Handler
I2C0_Master_Int_Handler
DMA_Err_Int_Handler
DMA_SPI1_TX_Int_Handler
DMA_SPI1_RX_Int_Handler
DMA_UART_TX_Int_Handler
DMA_UART_RX_Int_Handler
DMA_I2C0_STX_Int_Handler
DMA_I2C0_SRX_Int_Handler
DMA_I2C0_MTX_Int_Handler
DMA_I2C0_MRX_Int_Handler
DMA_ADC_Int_Handler
DMA_SPI0_TX_Int_Handler
DMA_SPI0_RX_Int_Handler
PWMTrip_Int_Handler
PWM0_Int_Handler
PWM1_Int_Handler
PWM2_Int_Handler
PWM3_Int_Handler
UnUsed_Handler
B .
ENDP
ALIGN
;*******************************************************************************
; User Stack and Heap initialization
;*******************************************************************************
IF :DEF:__MICROLIB
EXPORT __initial_sp
EXPORT __heap_base
EXPORT __heap_limit
ELSE
IMPORT __use_two_region_memory
EXPORT __user_initial_stackheap
__user_initial_stackheap
LDR R0, = Heap_Mem
LDR R1, =(Stack_Mem + Stack_Size)
LDR R2, = (Heap_Mem + Heap_Size)
LDR R3, = Stack_Mem
BX LR
ALIGN
ENDIF
END

@ -1 +0,0 @@
Subproject commit 0f44f949b4a7862ae3273739279df6297a4a4e45

@ -1 +0,0 @@
Subproject commit e816e3508b87744186acae2c5f792ad378836ae3

View File

@ -1,2 +0,0 @@
erase
q

View File

@ -1,4 +0,0 @@
loadfile #OUTPUT_FILENAME#
r
g
q

View File

@ -1,4 +1,4 @@
basedirs := core cpu platform apps
basedirs := core drivers/cpu drivers/platform apps
manuals := $(shell find ./ -name "*.txt")
filetypes := -iwholename "*/doc/*.txt"
empty :=

View File

@ -34,7 +34,7 @@
# Author: Jim Paris <jim.paris@rigado.com>
CONTIKI_CPU = $(CONTIKI)/cpu/arm/aducrf101
CONTIKI_CPU = $(CONTIKI)/drivers/cpu/arm/aducrf101
ifdef IAR
include $(CONTIKI_CPU)/Makefile.aducrf101.iar

View File

@ -5,7 +5,7 @@ SUBTARGET = 64
### Code common for all ARM CPUs
CONTIKI_CPU_ARM=$(CONTIKI)/cpu/arm/
CONTIKI_CPU_ARM=$(CONTIKI)/drivers/cpu/arm/
CONTIKI_CPU_ARM_COMMON=$(CONTIKI_CPU_ARM)/common
### Defin the CPU directory
@ -71,7 +71,7 @@ ARM_FLAGS=
CFLAGSNO = -I. -I$(CONTIKI)/core -I$(CONTIKI_CPU) \
-I$(CONTIKI_CPU)/dbg-io \
-I$(CONTIKI)/platform/$(TARGET) \
-I$(CONTIKI)/drivers/platform/$(TARGET) \
${addprefix -I,$(APPDIRS)} \
-DWITH_ASCII -DMCK=$(MCK) \
-Wall $(ARCH_FLAGS) -g -D SUBTARGET=$(SUBTARGET)

Some files were not shown because too many files have changed in this diff Show More