Skip to content

Commit 5c60a5a

Browse files
authored
Merge pull request arduino#130 from brentru/add-pybadge-airlift-m4
Add PyBadge AirLift
2 parents fd0d925 + 135eb71 commit 5c60a5a

File tree

9 files changed

+996
-1
lines changed

9 files changed

+996
-1
lines changed

boards.txt

+66-1
Original file line numberDiff line numberDiff line change
@@ -1059,4 +1059,69 @@ adafruit_pygamer_advance_m4.menu.usbstack.tinyusb=TinyUSB
10591059
adafruit_pygamer_advance_m4.menu.usbstack.tinyusb.build.flags.usbstack=-DUSE_TINYUSB
10601060
adafruit_pygamer_advance_m4.menu.debug.off=Off
10611061
adafruit_pygamer_advance_m4.menu.debug.on=On
1062-
adafruit_pygamer_advance_m4.menu.debug.on.build.flags.debug=-g
1062+
adafruit_pygamer_advance_m4.menu.debug.on.build.flags.debug=-g
1063+
1064+
# Adafruit pyBadge AirLift M4 (SAMD51)
1065+
# ------------------------------
1066+
adafruit_pybadge_airlift_m4.name=Adafruit pyBadge AirLift M4 (SAMD51)
1067+
adafruit_pybadge_airlift_m4.vid.0=0x239A
1068+
adafruit_pybadge_airlift_m4.pid.0=0x8043
1069+
adafruit_pybadge_airlift_m4.vid.1=0x239A
1070+
adafruit_pybadge_airlift_m4.pid.1=0x0033
1071+
adafruit_pybadge_airlift_m4.vid.1=0x239A
1072+
adafruit_pybadge_airlift_m4.pid.1=0x8043
1073+
adafruit_pybadge_airlift_m4.upload.tool=bossac18
1074+
adafruit_pybadge_airlift_m4.upload.protocol=sam-ba
1075+
adafruit_pybadge_airlift_m4.upload.maximum_size=1032192
1076+
adafruit_pybadge_airlift_m4.upload.offset=0x4000
1077+
adafruit_pybadge_airlift_m4.upload.use_1200bps_touch=true
1078+
adafruit_pybadge_airlift_m4.upload.wait_for_upload_port=true
1079+
adafruit_pybadge_airlift_m4.upload.native_usb=true
1080+
adafruit_pybadge_airlift_m4.build.mcu=cortex-m4
1081+
#adafruit_pybadge_airlift_m4.build.f_cpu=120000000L
1082+
adafruit_pybadge_airlift_m4.build.usb_product="Adafruit pyBadge AirLift M4"
1083+
adafruit_pybadge_airlift_m4.build.usb_manufacturer="Adafruit LLC"
1084+
adafruit_pybadge_airlift_m4.build.board=PYBADGE_AIRLIFT_M4
1085+
adafruit_pybadge_airlift_m4.build.core=arduino
1086+
adafruit_pybadge_airlift_m4.build.extra_flags=-D__SAMD51J20A__ -DADAFRUIT_PYBADGE_AIRLIFT_M4 -DCRYSTALLESS -D__SAMD51__ {build.usb_flags} -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16
1087+
adafruit_pybadge_airlift_m4.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld
1088+
adafruit_pybadge_airlift_m4.build.openocdscript=openocd_scripts/arduino_zero.cfg
1089+
adafruit_pybadge_airlift_m4.build.variant=pybadge_airlift_m4
1090+
adafruit_pybadge_airlift_m4.build.variant_system_lib=
1091+
adafruit_pybadge_airlift_m4.build.vid=0x239A
1092+
adafruit_pybadge_airlift_m4.build.pid=0x8043
1093+
adafruit_pybadge_airlift_m4.bootloader.tool=openocd
1094+
adafruit_pybadge_airlift_m4.bootloader.file=featherM4/bootloader-feather_m4-v2.0.0-adafruit.5.bin
1095+
adafruit_pybadge_airlift_m4.compiler.arm.cmsis.ldflags="-L{build.variant.path}" -larm_cortexM4lf_math -mfloat-abi=hard -mfpu=fpv4-sp-d16
1096+
adafruit_pybadge_airlift_m4.menu.cache.on=Enabled
1097+
adafruit_pybadge_airlift_m4.menu.cache.on.build.cache_flags=-DENABLE_CACHE
1098+
adafruit_pybadge_airlift_m4.menu.cache.off=Disabled
1099+
adafruit_pybadge_airlift_m4.menu.cache.off.build.cache_flags=
1100+
adafruit_pybadge_airlift_m4.menu.speed.120=120 MHz (standard)
1101+
adafruit_pybadge_airlift_m4.menu.speed.120.build.f_cpu=120000000L
1102+
adafruit_pybadge_airlift_m4.menu.speed.150=150 MHz (overclock)
1103+
adafruit_pybadge_airlift_m4.menu.speed.150.build.f_cpu=150000000L
1104+
adafruit_pybadge_airlift_m4.menu.speed.180=180 MHz (overclock)
1105+
adafruit_pybadge_airlift_m4.menu.speed.180.build.f_cpu=180000000L
1106+
adafruit_pybadge_airlift_m4.menu.speed.200=200 MHz (overclock)
1107+
adafruit_pybadge_airlift_m4.menu.speed.200.build.f_cpu=200000000L
1108+
adafruit_pybadge_airlift_m4.menu.opt.small=Small (-Os) (standard)
1109+
adafruit_pybadge_airlift_m4.menu.opt.small.build.flags.optimize=-Os
1110+
adafruit_pybadge_airlift_m4.menu.opt.fast=Fast (-O2)
1111+
adafruit_pybadge_airlift_m4.menu.opt.fast.build.flags.optimize=-O2
1112+
adafruit_pybadge_airlift_m4.menu.opt.faster=Faster (-O3)
1113+
adafruit_pybadge_airlift_m4.menu.opt.faster.build.flags.optimize=-O3
1114+
adafruit_pybadge_airlift_m4.menu.opt.fastest=Fastest (-Ofast)
1115+
adafruit_pybadge_airlift_m4.menu.opt.fastest.build.flags.optimize=-Ofast
1116+
adafruit_pybadge_airlift_m4.menu.opt.dragons=Here be dragons (-Ofast -funroll-loops)
1117+
adafruit_pybadge_airlift_m4.menu.opt.dragons.build.flags.optimize=-Ofast -funroll-loops
1118+
adafruit_pybadge_airlift_m4.menu.maxqspi.50=50 MHz (standard)
1119+
adafruit_pybadge_airlift_m4.menu.maxqspi.50.build.flags.maxqspi=-DVARIANT_QSPI_BAUD_DEFAULT=50000000
1120+
adafruit_pybadge_airlift_m4.menu.maxqspi.fcpu=CPU Speed / 2
1121+
adafruit_pybadge_airlift_m4.menu.maxqspi.fcpu.build.flags.maxqspi=-DVARIANT_QSPI_BAUD_DEFAULT=({build.f_cpu})
1122+
adafruit_pybadge_airlift_m4.menu.usbstack.arduino=Arduino
1123+
adafruit_pybadge_airlift_m4.menu.usbstack.tinyusb=TinyUSB
1124+
adafruit_pybadge_airlift_m4.menu.usbstack.tinyusb.build.flags.usbstack=-DUSE_TINYUSB
1125+
adafruit_pybadge_airlift_m4.menu.debug.off=Off
1126+
adafruit_pybadge_airlift_m4.menu.debug.on=On
1127+
adafruit_pybadge_airlift_m4.menu.debug.on.build.flags.debug=-g
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# Arduino Zero OpenOCD script.
3+
#
4+
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
5+
#
6+
# This library is free software; you can redistribute it and/or
7+
# modify it under the terms of the GNU Lesser General Public
8+
# License as published by the Free Software Foundation; either
9+
# version 2.1 of the License, or (at your option) any later version.
10+
#
11+
# This library is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14+
# See the GNU Lesser General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU Lesser General Public
17+
# License along with this library; if not, write to the Free Software
18+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19+
#
20+
21+
# Define 'reset' command
22+
define reset
23+
24+
info reg
25+
26+
break main
27+
28+
# End of 'reset' command
29+
end
30+
31+
target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log"
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
4+
This library is free software; you can redistribute it and/or
5+
modify it under the terms of the GNU Lesser General Public
6+
License as published by the Free Software Foundation; either
7+
version 2.1 of the License, or (at your option) any later version.
8+
9+
This library is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12+
See the GNU Lesser General Public License for more details.
13+
14+
You should have received a copy of the GNU Lesser General Public
15+
License along with this library; if not, write to the Free Software
16+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17+
*/
18+
19+
/* Linker script to configure memory regions.
20+
* Need modifying for a specific board.
21+
* FLASH.ORIGIN: starting address of flash
22+
* FLASH.LENGTH: length of flash
23+
* RAM.ORIGIN: starting address of RAM bank 0
24+
* RAM.LENGTH: length of RAM bank 0
25+
*/
26+
MEMORY
27+
{
28+
FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00080000-0x4000 /* First 16KB used by bootloader */
29+
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00030000
30+
}
31+
32+
/* Linker script to place sections and symbol values. Should be used together
33+
* with other linker script that defines memory regions FLASH and RAM.
34+
* It references following symbols, which must be defined in code:
35+
* Reset_Handler : Entry of reset handler
36+
*
37+
* It defines following symbols, which code can use without definition:
38+
* __exidx_start
39+
* __exidx_end
40+
* __copy_table_start__
41+
* __copy_table_end__
42+
* __zero_table_start__
43+
* __zero_table_end__
44+
* __etext
45+
* __data_start__
46+
* __preinit_array_start
47+
* __preinit_array_end
48+
* __init_array_start
49+
* __init_array_end
50+
* __fini_array_start
51+
* __fini_array_end
52+
* __data_end__
53+
* __bss_start__
54+
* __bss_end__
55+
* __end__
56+
* end
57+
* __HeapLimit
58+
* __StackLimit
59+
* __StackTop
60+
* __stack
61+
*/
62+
ENTRY(Reset_Handler)
63+
64+
SECTIONS
65+
{
66+
.text :
67+
{
68+
__text_start__ = .;
69+
70+
KEEP(*(.sketch_boot))
71+
72+
. = ALIGN(0x4000);
73+
KEEP(*(.isr_vector))
74+
*(.text*)
75+
76+
KEEP(*(.init))
77+
KEEP(*(.fini))
78+
79+
/* .ctors */
80+
*crtbegin.o(.ctors)
81+
*crtbegin?.o(.ctors)
82+
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
83+
*(SORT(.ctors.*))
84+
*(.ctors)
85+
86+
/* .dtors */
87+
*crtbegin.o(.dtors)
88+
*crtbegin?.o(.dtors)
89+
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
90+
*(SORT(.dtors.*))
91+
*(.dtors)
92+
93+
*(.rodata*)
94+
95+
KEEP(*(.eh_frame*))
96+
} > FLASH
97+
98+
.ARM.extab :
99+
{
100+
*(.ARM.extab* .gnu.linkonce.armextab.*)
101+
} > FLASH
102+
103+
__exidx_start = .;
104+
.ARM.exidx :
105+
{
106+
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
107+
} > FLASH
108+
__exidx_end = .;
109+
110+
/* To copy multiple ROM to RAM sections,
111+
* uncomment .copy.table section and,
112+
* define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */
113+
/*
114+
.copy.table :
115+
{
116+
. = ALIGN(4);
117+
__copy_table_start__ = .;
118+
LONG (__etext)
119+
LONG (__data_start__)
120+
LONG (__data_end__ - __data_start__)
121+
LONG (__etext2)
122+
LONG (__data2_start__)
123+
LONG (__data2_end__ - __data2_start__)
124+
__copy_table_end__ = .;
125+
} > FLASH
126+
*/
127+
128+
/* To clear multiple BSS sections,
129+
* uncomment .zero.table section and,
130+
* define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */
131+
/*
132+
.zero.table :
133+
{
134+
. = ALIGN(4);
135+
__zero_table_start__ = .;
136+
LONG (__bss_start__)
137+
LONG (__bss_end__ - __bss_start__)
138+
LONG (__bss2_start__)
139+
LONG (__bss2_end__ - __bss2_start__)
140+
__zero_table_end__ = .;
141+
} > FLASH
142+
*/
143+
144+
__etext = .;
145+
146+
.data : AT (__etext)
147+
{
148+
__data_start__ = .;
149+
*(vtable)
150+
*(.data*)
151+
152+
. = ALIGN(4);
153+
/* preinit data */
154+
PROVIDE_HIDDEN (__preinit_array_start = .);
155+
KEEP(*(.preinit_array))
156+
PROVIDE_HIDDEN (__preinit_array_end = .);
157+
158+
. = ALIGN(4);
159+
/* init data */
160+
PROVIDE_HIDDEN (__init_array_start = .);
161+
KEEP(*(SORT(.init_array.*)))
162+
KEEP(*(.init_array))
163+
PROVIDE_HIDDEN (__init_array_end = .);
164+
165+
166+
. = ALIGN(4);
167+
/* finit data */
168+
PROVIDE_HIDDEN (__fini_array_start = .);
169+
KEEP(*(SORT(.fini_array.*)))
170+
KEEP(*(.fini_array))
171+
PROVIDE_HIDDEN (__fini_array_end = .);
172+
173+
KEEP(*(.jcr*))
174+
. = ALIGN(16);
175+
/* All data end */
176+
__data_end__ = .;
177+
178+
} > RAM
179+
180+
.bss :
181+
{
182+
. = ALIGN(4);
183+
__bss_start__ = .;
184+
*(.bss*)
185+
*(COMMON)
186+
. = ALIGN(4);
187+
__bss_end__ = .;
188+
} > RAM
189+
190+
.heap (COPY):
191+
{
192+
__end__ = .;
193+
PROVIDE(end = .);
194+
*(.heap*)
195+
__HeapLimit = .;
196+
} > RAM
197+
198+
/* .stack_dummy section doesn't contains any symbols. It is only
199+
* used for linker to calculate size of stack sections, and assign
200+
* values to stack symbols later */
201+
.stack_dummy (COPY):
202+
{
203+
*(.stack*)
204+
} > RAM
205+
206+
/* Set stack top to end of RAM, and stack limit move down by
207+
* size of stack_dummy section */
208+
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
209+
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
210+
PROVIDE(__stack = __StackTop);
211+
212+
__ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ;
213+
214+
/* Check if data + heap + stack exceeds RAM limit */
215+
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
216+
}

0 commit comments

Comments
 (0)