Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards: arduino_due: Added DTS to the Arduino Due. #30

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
86b0260
kconfig: Move debugging-related options from misc/ to subsys/debug/
lpereira Apr 27, 2017
2dc9ae4
ci: update to build 2 parallel jobs per run
nashif Apr 29, 2017
e7a54dc
doc: Add README.rst to project root
dbkinder Apr 29, 2017
acb872f
Bluetooth: HCI: Fix alignment of struct members
Apr 21, 2017
97f0241
Bluetooth: Fix alignment issues resulting from new integer types
Apr 21, 2017
d1bb961
Bluetooth: Remove unnecessary bt_dev_esco struct
Apr 21, 2017
a6e157b
Bluetooth: Controller: Fix alignment issues from new integer types
carlescufi Apr 21, 2017
3807a95
Bluetooth: l2cap: Dont use BT namespace in internal MPS/MTU macro
cvinayak Apr 25, 2017
27bad87
Bluetooth: l2cap: Decouple segmentation size
cvinayak Apr 25, 2017
512d2ac
Bluetooth: L2CAP: Fix unnecessary NULL check
Apr 26, 2017
890bf82
Bluetooth: conn: Remove shadow iterator variable
Apr 26, 2017
65e0709
Bluetooth: l2cap: Use global conn tx pool for segmentation
cvinayak Apr 26, 2017
a03e068
Bluetooth: shell: Don't attempt to reuse channel
Vudentz Apr 26, 2017
56f8af9
Bluetooth: controller: Low Duty Cycle Directed Advertising
cvinayak Apr 27, 2017
9fcd082
Bluetooth: controller: Explicit AC and DC packet configure
cvinayak Apr 26, 2017
3666fb8
Bluetooth: hci: Consistently use bt_hci_evt_*
cvinayak Apr 27, 2017
c8cb20a
bluetooth: host: fix compile break with CONFIG_ASSERT in gatt.c
Apr 27, 2017
b29b3e2
Bluetooth: controller: Rename ll_address_* to ll_addr_*
cvinayak Apr 28, 2017
068766f
drivers: i2c: clean up Kconfig file
mnkp Apr 24, 2017
81e1b19
arch: sam3x: update Kconfig options after move to SAM SoC family tree
fallrisk Apr 27, 2017
dcc4bc6
boards: arduino_due: Added DTS to the Arduino Due.
fallrisk Apr 28, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .shippable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ env:
- USE_CCACHE=1
- secure: CaE0YOxMfS71yTJsLOUMAXyvrOfgPbT6NLakwXShPHFF+aqqu9UyrmwFE1UfNxDrFOa3h0gxmbMRJAdGPLdKeLmGlLiL96XMhpaZIWYmAD2/Kfx9wb+1zfYISrh9k11QIifbB5JpeiFzNrrwYLOv5Gqn2fkAgvSe0BEKoh6weCvMXHgxwJR/I5gtQYwZXI6arvOTWlVgRpXeqURcJbthsmp7/Bc4MctgiRXmBxeyvi+OTVe1u/sNPVf51ZYcNdaqw+xRp9xFeg09EP87QPlDHV+g9dPWuGvGHAwQ86TD8hkpjurLO3O8GHCXena7Ft0/t9iL4RBecUIBplISNuaK6Q==
matrix:
- ARCH="" RUN_COMPLIANCE="1"
- ARCH="-a x86 -a riscv32 -a nios2" RUN_COMPLIANCE="1"
- ARCH="-a arm -a arc"
#- ARCH="-a x86" RUN_COMPLIANCE="1"
#- ARCH="-a arm"
#- ARCH="-a arc -a riscv32 -a nios2"

build:
Expand All @@ -37,19 +37,23 @@ build:
- export PREBUILT_HOST_TOOLS=${ZEPHYR_BASE}/bin
- >
if [ "$RUN_COMPLIANCE" = "1" -a "$IS_PULL_REQUEST" = "true"]; then
echo "Building a Pull Request";
errors=$(./scripts/ci/check-compliance.py);
cat compliance.xml
fi;
- >
if [ "$JOB_TRIGGERED_BY_NAME" = "daily-verify-asserts" ]; then
echo "Building with --all --enable-slow -R";
COVERAGE="--all --enable-slow -R";
fi;
- >
if [ "$JOB_TRIGGERED_BY_NAME" = "daily-verify" ]; then
echo "Building with --all --enable-slow";
COVERAGE="--all --enable-slow";
fi;
- >
if [ "$JOB_TRIGGERED_BY_NAME" = "code-scan" ]; then
echo "Building basic sanitycheck";
wget https://scan.coverity.com/download/linux64 --post-data "token=${COVERITY_TOKEN}&project=Zephyr" -O coverity_tool.tgz;
tar xvf coverity_tool.tgz;
rm -f coverity_tool.tgz;
Expand Down
87 changes: 87 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
:orphan:

Zephyr™ Project
###############

The Zephyr™ Project is a scalable real-time operating system (RTOS) supporting
multiple hardware architectures, optimized for resource constrained devices,
and built with security in mind.

The Zephyr OS is based on a small-footprint kernel designed for use on
resource-constrained systems: from simple embedded environmental sensors and
LED wearables to sophisticated smart watches and IoT wireless gateways.

The Zephyr kernel supports multiple architectures, including ARM Cortex-M,
Intel x86, ARC, NIOS II and RISC V, and a large number of
`supported boards`_.

Community Support
*****************

The Zephyr Project Developer Community includes developers from member
organizations and the general community all joining in the development of
software within the Zephyr Project. Members contribute and discuss ideas,
submit bugs and bug fixes, and provide training. They also help those in need
through the community's forums such as mailing lists and IRC channels. Anyone
can join the developer community and the community is always willing to help
its members and the User Community to get the most out of the Zephyr Project.

Welcome to the Zephyr community!

Resources
*********

Here’s a quick summary of resources to find your way around the Zephyr Project
support systems:

* **Zephyr Project Website**: The https://zephyrproject.org website is the
central source of information about the Zephyr Project. On this site, you’ll
find background and current information about the project as well as all the
relevant links to project material. For a quick start, refer to the
`Zephyr Introduction`_ and `Getting Started Guide`_.

* **Releases**: Source code for Zephyr kernel releases are available at
https://zephyrproject.org/downloads. On this page,
you'll find release information, and links to download or clone source
code from our GitHub repository. You'll also find links for the Zephyr
SDK, a moderated collection of tools and libraries used to develop your
applications.

* **Source Code in GitHub**: Zephyr Project source code is maintained on a
public GitHub repository at https://github.com/zephyrproject-rtos/zephyr.
You'll find information about getting access to the repository and how to
contribute to the project in this `Contribution Guide`_ wiki article.

* **Samples Code**: In addition to the kernel source code, there are also
many documented `Sample and Demo Code Examples`_ that can help show you
how to use Zephyr services and subsystems.

* **Documentation**: Extensive Project technical documentation is developed
along with the Zephyr kernel itself, and can be found at
https://zephyrproject.org/doc. Additional documentation is maintained in
the `Zephyr GitHub wiki`_.

* **Issue Reporting and Tracking**: Requirements and Issue tracking is done in
our JIRA system: https://jira.zephyrproject.org. You can browse through the
reported issues and submit issues of your own.

* **Mailing List**: The `Zephyr Mailing Lists`_ are perhaps the most convenient
way to track developer discussions and to ask your own support questions to
the Zephyr project community.
You can also read through message archives to follow
past posts and discussions, a good thing to do to discover more about the
Zephyr project.

* **IRC Chatting**: You can chat online with the Zephyr project developer
community and other users in our IRC channel #zephyrproject on the
freenode.net IRC server. You can use the http://webchat.freenode.net web
client or use a client-side application such as pidgin.


.. _supported boards: https://www.zephyrproject.org/doc/boards/boards.html
.. _Zephyr Introduction: https://www.zephyrproject.org/doc/introduction/introducing_zephyr.html
.. _Getting Started Guide: https://www.zephyrproject.org/doc/getting_started/getting_started.html
.. _Contribution Guide: https://github.com/zephyrproject-rtos/zephyr/wiki/Contribution-Guide
.. _Zephyr GitHub wiki: https://github.com/zephyrproject-rtos/zephyr/wiki
.. _Zephyr Mailing Lists: https://lists.zephyrproject.org/
.. _Sample and Demo Code Examples: https://www.zephyrproject.org/doc/samples/samples.html
5 changes: 0 additions & 5 deletions arch/arm/soc/atmel_sam/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,5 @@
# SPDX-License-Identifier: Apache-2.0
#

config SOC_ATMEL_SAM3
bool
depends on ARM
default n

# Select SoC Part No. and configuration options
source "arch/arm/soc/atmel_sam/*/Kconfig.soc"
2 changes: 1 addition & 1 deletion arch/arm/soc/atmel_sam/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ config SOC_FAMILY
default atmel_sam

config WATCHDOG
def_bool y if !SOC_ATMEL_SAM3X8E
def_bool y

endif #SOC_FAMILY_SAM

Expand Down
69 changes: 13 additions & 56 deletions arch/arm/soc/atmel_sam/sam3x/Kconfig.defconfig.series
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@
# SPDX-License-Identifier: Apache-2.0
#

if SOC_SERIES_SAM3X || SOC_ATMEL_SAM3X8E
if SOC_SERIES_SAM3X

config SOC_SERIES
string
default sam3x

config SOC_PART_NUMBER
string
default sam3x8e if SOC_PART_NUMBER_SAM3X8E || SOC_ATMEL_SAM3X8E

config NUM_IRQ_PRIO_BITS
int
default 3
default sam3x8e if SOC_PART_NUMBER_SAM3X8E

#
# SAM3 family has total 45 peripherals capable of
Expand All @@ -32,6 +28,12 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
int
default 84000000

config NUM_IRQ_PRIO_BITS
int
default 3

if !HAS_DTS

#
# SRAM address depends on the processor.
#
Expand All @@ -42,66 +44,21 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
# to provide one continuous 96K block.
#
config SRAM_SIZE
default 96 if SOC_PART_NUMBER_SAM3X8E || SOC_ATMEL_SAM3X8E
default 96 if SOC_PART_NUMBER_SAM3X8E

config SRAM_BASE_ADDRESS
default 0x20000000 if !SOC_PART_NUMBER_SAM3X8E && !SOC_ATMEL_SAM3X8E
default 0x20070000 if SOC_PART_NUMBER_SAM3X8E || SOC_ATMEL_SAM3X8E
default 0x20000000 if !SOC_PART_NUMBER_SAM3X8E
default 0x20070000 if SOC_PART_NUMBER_SAM3X8E

#
# Atmel SAM3X family has flash starting @ 0x00080000.
#
config FLASH_SIZE
default 512 if SOC_PART_NUMBER_SAM3X8E || SOC_ATMEL_SAM3X8E
default 512 if SOC_PART_NUMBER_SAM3X8E

config FLASH_BASE_ADDRESS
default 0x00080000

if UART_ATMEL_SAM3

config UART_ATMEL_SAM3_BAUD_RATE
default 115200

config UART_ATMEL_SAM3_CLK_FREQ
default 84000000

endif # UART_ATMEL_SAM3

if GPIO

config GPIO_ATMEL_SAM3
def_bool y

config GPIO_ATMEL_SAM3_PORTA
default y

config GPIO_ATMEL_SAM3_PORTB
default y

config GPIO_ATMEL_SAM3_PORTC
default y

config GPIO_ATMEL_SAM3_PORTD
default y

endif # GPIO

if I2C

config I2C_ATMEL_SAM3
def_bool y

config I2C_0
default y
config I2C_0_IRQ_PRI
default 0

config I2C_1
default y

config I2C_1_IRQ_PRI
default 0

endif # I2C
endif # !HAS_DTS

endif # SOC_SERIES_SAM3X
10 changes: 0 additions & 10 deletions arch/arm/soc/atmel_sam/sam3x/Kconfig.series
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,3 @@ config SOC_SERIES_SAM3X
help
Enable support for Atmel SAM3X Cortex-M3 microcontrollers.
Part No.: SAM3X8E

config SOC_ATMEL_SAM3X8E
bool "Atmel SAM3X8E Processor"
select SOC_PART_NUMBER_SAM3X8E
select CPU_CORTEX_M
select CPU_CORTEX_M3
select SOC_FAMILY_SAM
select SYS_POWER_LOW_POWER_STATE_SUPPORTED
select CPU_HAS_SYSTICK
select SOC_ATMEL_SAM3
2 changes: 1 addition & 1 deletion arch/arm/soc/atmel_sam/sam3x/Kconfig.soc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ choice
bool "SAM3X8E"
endchoice

if SOC_SERIES_SAM3X || SOC_ATMEL_SAM3X8E
if SOC_SERIES_SAM3X

config SOC_ATMEL_SAM3X_EXT_SLCK
bool "Atmel SAM3 to use external crystal oscillator for slow clock"
Expand Down
7 changes: 6 additions & 1 deletion boards/arm/arduino_due/Kconfig.board
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Kconfig - Arduino Due Board configuration
#
# Copyright (c) 2017 Justin Watson
# SPDX-License-Identifier: Apache-2.0
#

config BOARD_ARDUINO_DUE
bool "Arduino Due Board"
depends on SOC_ATMEL_SAM3X8E
depends on SOC_PART_NUMBER_SAM3X8E
45 changes: 45 additions & 0 deletions boards/arm/arduino_due/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -1,14 +1,59 @@
# Kconfig - Arduino Due Board configuration
#
# Copyright (c) 2017 Justin Watson
# SPDX-License-Identifier: Apache-2.0
#

if BOARD_ARDUINO_DUE

config BOARD
default arduino_due

if UART_ATMEL_SAM3

config UART_ATMEL_SAM3_BAUD_RATE
default 115200

config UART_ATMEL_SAM3_CLK_FREQ
default 84000000

endif # UART_ATMEL_SAM3

if GPIO

config GPIO_ATMEL_SAM3
def_bool y

config GPIO_ATMEL_SAM3_PORTA
default y

config GPIO_ATMEL_SAM3_PORTB
default y

config GPIO_ATMEL_SAM3_PORTC
default y

config GPIO_ATMEL_SAM3_PORTD
default y

endif # GPIO

if I2C

config I2C_ATMEL_SAM3
def_bool y

config I2C_0
default y
config I2C_0_IRQ_PRI
default 0

config I2C_1
default y

config I2C_1_IRQ_PRI
default 0

endif # I2C

endif # BOARD_ARDUINO_DUE
8 changes: 6 additions & 2 deletions boards/arm/arduino_due/arduino_due_defconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
CONFIG_ARM=y
CONFIG_SOC_ATMEL_SAM3X8E=y
CONFIG_SOC_FAMILY_SAM=y
CONFIG_SOC_SERIES_SAM3X=y
CONFIG_SOC_PART_NUMBER_SAM3X8E=y
CONFIG_BOARD_ARDUINO_DUE=y
CONFIG_CORTEX_M_SYSTICK=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_ATMEL_SAM3=y
CONFIG_SOC_ATMEL_SAM3_EXT_MAINCK=y
CONFIG_SOC_ATMEL_SAM3X_EXT_MAINCK=y
CONFIG_PINMUX=y
CONFIG_WATCHDOG=n
CONFIG_HAS_DTS=y
8 changes: 4 additions & 4 deletions drivers/bluetooth/hci/h4.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ static struct {
struct net_buf *buf;
struct k_fifo fifo;

u16_t remaining;
u16_t discard;
u16_t remaining;
u16_t discard;

bool have_hdr;
bool discardable;

u8_t hdr_len;
u8_t hdr_len;

u8_t type;
u8_t type;
union {
struct bt_hci_evt_hdr evt;
struct bt_hci_acl_hdr acl;
Expand Down
Loading