Skip to content

Commit 1b5a0b5

Browse files
committed
Merge pull request ARMmbed#5 in MBED/drivers-atmel from licenseknr to atmel
* commit '799d2d61c3ee0fc04ba34b595b0a1300806c9306': * Updated cmsis files for KnR Coding Standards. * updated year in ARM mbed license.
2 parents 1ac74c3 + 799d2d6 commit 1b5a0b5

File tree

155 files changed

+11721
-11780
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+11721
-11780
lines changed

libraries/mbed/targets/cmsis/TARGET_Atmel/TARGET_SAM_CortexM0+/TARGET_SAMD21/TARGET_SAMD21J18A/TOOLCHAIN_GCC_ARM/samd21j18a.ld

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ OUTPUT_ARCH(arm)
33
SEARCH_DIR(.)
44

55
/* Memory Spaces Definitions */
6-
MEMORY
7-
{
8-
rom (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000
9-
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000
10-
}
6+
MEMORY {
7+
rom (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000
8+
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000
9+
}
1110

12-
/* The stack size used by the application. NOTE: you need to adjust according to your application. */
13-
STACK_SIZE = DEFINED(STACK_SIZE) ? STACK_SIZE : DEFINED(__stack_size__) ? __stack_size__ : 0x2000;
11+
/* The stack size used by the application. NOTE: you need to adjust according to your application. */
12+
STACK_SIZE = DEFINED(STACK_SIZE) ? STACK_SIZE : DEFINED(__stack_size__) ? __stack_size__ : 0x2000;
1413

15-
/* Section Definitions */
16-
SECTIONS
17-
{
18-
.text :
14+
/* Section Definitions */
15+
SECTIONS {
16+
.text :
1917
{
2018
. = ALIGN(4);
2119
_sfixed = .;
@@ -66,23 +64,24 @@ SECTIONS
6664

6765
/* .ARM.exidx is sorted, so has to go in its own output section. */
6866
PROVIDE_HIDDEN (__exidx_start = .);
69-
.ARM.exidx :
67+
.ARM.exidx :
7068
{
71-
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
69+
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
7270
} > rom
7371
PROVIDE_HIDDEN (__exidx_end = .);
7472

7573
. = ALIGN(4);
7674
_etext = .;
77-
78-
.dvectors (NOLOAD) :
79-
{
80-
_sdvectors = .;
81-
. = . + 0xB0;
82-
_edvectors = .;
83-
} > ram
84-
85-
.relocate : AT (_etext)
75+
76+
.dvectors (NOLOAD) :
77+
{
78+
_sdvectors = .;
79+
. = . + 0xB0;
80+
_edvectors = .;
81+
} > ram
82+
83+
.relocate :
84+
AT (_etext)
8685
{
8786
. = ALIGN(4);
8887
_srelocate = .;
@@ -105,12 +104,12 @@ SECTIONS
105104
_ezero = .;
106105
} > ram
107106

108-
.heap (NOLOAD) :
109-
{
110-
. = ALIGN(4);
111-
__end__ = . ;
112-
. = ORIGIN(ram) + LENGTH(ram) - STACK_SIZE;
113-
} > ram
107+
.heap (NOLOAD) :
108+
{
109+
. = ALIGN(4);
110+
__end__ = . ;
111+
. = ORIGIN(ram) + LENGTH(ram) - STACK_SIZE;
112+
} > ram
114113

115114
/* stack section */
116115
.stack (NOLOAD):

libraries/mbed/targets/cmsis/TARGET_Atmel/TARGET_SAM_CortexM0+/TARGET_SAMR21/TARGET_SAMR21G18A/TOOLCHAIN_GCC_ARM/samr21g18a.ld

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ OUTPUT_ARCH(arm)
33
SEARCH_DIR(.)
44

55
/* Memory Spaces Definitions */
6-
MEMORY
7-
{
8-
rom (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000
9-
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000
10-
}
6+
MEMORY {
7+
rom (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000
8+
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000
9+
}
1110

12-
/* The stack size used by the application. NOTE: you need to adjust according to your application. */
13-
STACK_SIZE = DEFINED(STACK_SIZE) ? STACK_SIZE : DEFINED(__stack_size__) ? __stack_size__ : 0x2000;
11+
/* The stack size used by the application. NOTE: you need to adjust according to your application. */
12+
STACK_SIZE = DEFINED(STACK_SIZE) ? STACK_SIZE : DEFINED(__stack_size__) ? __stack_size__ : 0x2000;
1413

15-
/* Section Definitions */
16-
SECTIONS
17-
{
18-
.text :
14+
/* Section Definitions */
15+
SECTIONS {
16+
.text :
1917
{
2018
. = ALIGN(4);
2119
_sfixed = .;
@@ -66,23 +64,24 @@ SECTIONS
6664

6765
/* .ARM.exidx is sorted, so has to go in its own output section. */
6866
PROVIDE_HIDDEN (__exidx_start = .);
69-
.ARM.exidx :
67+
.ARM.exidx :
7068
{
71-
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
69+
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
7270
} > rom
7371
PROVIDE_HIDDEN (__exidx_end = .);
7472

7573
. = ALIGN(4);
7674
_etext = .;
77-
78-
.dvectors (NOLOAD) :
79-
{
80-
_sdvectors = .;
81-
. = . + 0xB0;
82-
_edvectors = .;
83-
} > ram
84-
85-
.relocate : AT (_etext)
75+
76+
.dvectors (NOLOAD) :
77+
{
78+
_sdvectors = .;
79+
. = . + 0xB0;
80+
_edvectors = .;
81+
} > ram
82+
83+
.relocate :
84+
AT (_etext)
8685
{
8786
. = ALIGN(4);
8887
_srelocate = .;
@@ -105,12 +104,12 @@ SECTIONS
105104
_ezero = .;
106105
} > ram
107106

108-
.heap (NOLOAD) :
109-
{
110-
. = ALIGN(4);
111-
__end__ = . ;
112-
. = ORIGIN(ram) + LENGTH(ram) - STACK_SIZE;
113-
} > ram
107+
.heap (NOLOAD) :
108+
{
109+
. = ALIGN(4);
110+
__end__ = . ;
111+
. = ORIGIN(ram) + LENGTH(ram) - STACK_SIZE;
112+
} > ram
114113

115114
/* stack section */
116115
.stack (NOLOAD):

libraries/mbed/targets/cmsis/TARGET_Atmel/TARGET_SAM_CortexM0+/TARGET_SAMR21/TARGET_SAMR21G18A/TOOLCHAIN_IAR/startup_samr21.c

Lines changed: 76 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@
4242
#include "samr21.h"
4343

4444
typedef void (*intfunc) (void);
45-
typedef union { intfunc __fun; void * __ptr; } intvec_elem;
45+
typedef union {
46+
intfunc __fun;
47+
void * __ptr;
48+
} intvec_elem;
4649

4750
void __iar_program_start(void);
4851
int __low_level_init(void);
@@ -116,89 +119,89 @@ void Dummy_Handler(void);
116119
#pragma section = ".intvec"
117120
#pragma location = ".intvec"
118121
const DeviceVectors __vector_table[] = {
119-
__sfe("CSTACK"),
120-
(void*) __iar_program_start,
121-
(void*) NMI_Handler,
122-
(void*) HardFault_Handler,
123-
(void*) (0UL), /* Reserved */
124-
(void*) (0UL), /* Reserved */
125-
(void*) (0UL), /* Reserved */
126-
(void*) (0UL), /* Reserved */
127-
(void*) (0UL), /* Reserved */
128-
(void*) (0UL), /* Reserved */
129-
(void*) (0UL), /* Reserved */
130-
(void*) SVC_Handler,
131-
(void*) (0UL), /* Reserved */
132-
(void*) (0UL), /* Reserved */
133-
(void*) PendSV_Handler,
134-
(void*) SysTick_Handler,
135-
136-
/* Configurable interrupts */
137-
(void*) PM_Handler, /* 0 Power Manager */
138-
(void*) SYSCTRL_Handler, /* 1 System Control */
139-
(void*) WDT_Handler, /* 2 Watchdog Timer */
140-
(void*) RTC_Handler, /* 3 Real-Time Counter */
141-
(void*) EIC_Handler, /* 4 External Interrupt Controller */
142-
(void*) NVMCTRL_Handler, /* 5 Non-Volatile Memory Controller */
143-
(void*) DMAC_Handler, /* 6 Direct Memory Access Controller */
122+
__sfe("CSTACK"),
123+
(void*) __iar_program_start,
124+
(void*) NMI_Handler,
125+
(void*) HardFault_Handler,
126+
(void*) (0UL), /* Reserved */
127+
(void*) (0UL), /* Reserved */
128+
(void*) (0UL), /* Reserved */
129+
(void*) (0UL), /* Reserved */
130+
(void*) (0UL), /* Reserved */
131+
(void*) (0UL), /* Reserved */
132+
(void*) (0UL), /* Reserved */
133+
(void*) SVC_Handler,
134+
(void*) (0UL), /* Reserved */
135+
(void*) (0UL), /* Reserved */
136+
(void*) PendSV_Handler,
137+
(void*) SysTick_Handler,
138+
139+
/* Configurable interrupts */
140+
(void*) PM_Handler, /* 0 Power Manager */
141+
(void*) SYSCTRL_Handler, /* 1 System Control */
142+
(void*) WDT_Handler, /* 2 Watchdog Timer */
143+
(void*) RTC_Handler, /* 3 Real-Time Counter */
144+
(void*) EIC_Handler, /* 4 External Interrupt Controller */
145+
(void*) NVMCTRL_Handler, /* 5 Non-Volatile Memory Controller */
146+
(void*) DMAC_Handler, /* 6 Direct Memory Access Controller */
144147
#ifdef ID_USB
145-
(void*) USB_Handler, /* 7 Universal Serial Bus */
148+
(void*) USB_Handler, /* 7 Universal Serial Bus */
146149
#else
147-
(void*) (0UL), /* Reserved*/
150+
(void*) (0UL), /* Reserved*/
148151
#endif
149-
(void*) EVSYS_Handler, /* 8 Event System Interface */
150-
(void*) SERCOM0_Handler, /* 9 Serial Communication Interface 0 */
151-
(void*) SERCOM1_Handler, /* 10 Serial Communication Interface 1 */
152-
(void*) SERCOM2_Handler, /* 11 Serial Communication Interface 2 */
153-
(void*) SERCOM3_Handler, /* 12 Serial Communication Interface 3 */
152+
(void*) EVSYS_Handler, /* 8 Event System Interface */
153+
(void*) SERCOM0_Handler, /* 9 Serial Communication Interface 0 */
154+
(void*) SERCOM1_Handler, /* 10 Serial Communication Interface 1 */
155+
(void*) SERCOM2_Handler, /* 11 Serial Communication Interface 2 */
156+
(void*) SERCOM3_Handler, /* 12 Serial Communication Interface 3 */
154157
#ifdef ID_SERCOM4
155-
(void*) SERCOM4_Handler, /* 13 Serial Communication Interface 4 */
158+
(void*) SERCOM4_Handler, /* 13 Serial Communication Interface 4 */
156159
#else
157-
(void*) (0UL), /* Reserved*/
160+
(void*) (0UL), /* Reserved*/
158161
#endif
159162
#ifdef ID_SERCOM5
160-
(void*) SERCOM5_Handler, /* 14 Serial Communication Interface 5 */
163+
(void*) SERCOM5_Handler, /* 14 Serial Communication Interface 5 */
161164
#else
162-
(void*) (0UL), /* Reserved*/
163-
#endif
164-
(void*) TCC0_Handler, /* 15 Timer Counter Control 0 */
165-
(void*) TCC1_Handler, /* 16 Timer Counter Control 1 */
166-
(void*) TCC2_Handler, /* 17 Timer Counter Control 2 */
167-
(void*) TC3_Handler, /* 18 Basic Timer Counter 0 */
168-
(void*) TC4_Handler, /* 19 Basic Timer Counter 1 */
169-
(void*) TC5_Handler, /* 20 Basic Timer Counter 2 */
165+
(void*) (0UL), /* Reserved*/
166+
#endif
167+
(void*) TCC0_Handler, /* 15 Timer Counter Control 0 */
168+
(void*) TCC1_Handler, /* 16 Timer Counter Control 1 */
169+
(void*) TCC2_Handler, /* 17 Timer Counter Control 2 */
170+
(void*) TC3_Handler, /* 18 Basic Timer Counter 0 */
171+
(void*) TC4_Handler, /* 19 Basic Timer Counter 1 */
172+
(void*) TC5_Handler, /* 20 Basic Timer Counter 2 */
170173
#ifdef ID_TC6
171-
(void*) TC6_Handler, /* 21 Basic Timer Counter 3 */
174+
(void*) TC6_Handler, /* 21 Basic Timer Counter 3 */
172175
#else
173-
(void*) (0UL), /* Reserved*/
176+
(void*) (0UL), /* Reserved*/
174177
#endif
175178
#ifdef ID_TC7
176-
(void*) TC7_Handler, /* 22 Basic Timer Counter 4 */
179+
(void*) TC7_Handler, /* 22 Basic Timer Counter 4 */
177180
#else
178-
(void*) (0UL), /* Reserved*/
181+
(void*) (0UL), /* Reserved*/
179182
#endif
180183
#ifdef ID_ADC
181-
(void*) ADC_Handler, /* 23 Analog Digital Converter */
184+
(void*) ADC_Handler, /* 23 Analog Digital Converter */
182185
#else
183-
(void*) (0UL), /* Reserved*/
186+
(void*) (0UL), /* Reserved*/
184187
#endif
185188
#ifdef ID_AC
186-
(void*) AC_Handler, /* 24 Analog Comparators */
189+
(void*) AC_Handler, /* 24 Analog Comparators */
187190
#else
188-
(void*) (0UL), /* Reserved*/
191+
(void*) (0UL), /* Reserved*/
189192
#endif
190193
#ifdef ID_DAC
191-
(void*) DAC_Handler, /* 25 Digital Analog Converter */
194+
(void*) DAC_Handler, /* 25 Digital Analog Converter */
192195
#else
193-
(void*) (0UL), /* Reserved*/
196+
(void*) (0UL), /* Reserved*/
194197
#endif
195198
#ifdef ID_PTC
196-
(void*) PTC_Handler, /* 26 Peripheral Touch Controller */
199+
(void*) PTC_Handler, /* 26 Peripheral Touch Controller */
197200
#else
198-
(void*) (0UL), /* Reserved*/
201+
(void*) (0UL), /* Reserved*/
199202
#endif
200-
(void*) I2S_Handler, /* 27 Inter-IC Sound Interface */
201-
(void*) (0UL), /* Reserved */
203+
(void*) I2S_Handler, /* 27 Inter-IC Sound Interface */
204+
(void*) (0UL), /* Reserved */
202205
};
203206

204207
/**------------------------------------------------------------------------------
@@ -207,11 +210,11 @@ const DeviceVectors __vector_table[] = {
207210
*------------------------------------------------------------------------------*/
208211
int __low_level_init(void)
209212
{
210-
uint32_t *pSrc = __section_begin(".intvec");
213+
uint32_t *pSrc = __section_begin(".intvec");
211214

212-
SCB->VTOR = ((uint32_t) pSrc & SCB_VTOR_TBLOFF_Msk);
215+
SCB->VTOR = ((uint32_t) pSrc & SCB_VTOR_TBLOFF_Msk);
213216

214-
return 1; /* if return 0, the data sections will not be initialized */
217+
return 1; /* if return 0, the data sections will not be initialized */
215218
}
216219

217220
/**------------------------------------------------------------------------------
@@ -220,27 +223,27 @@ int __low_level_init(void)
220223
*------------------------------------------------------------------------------*/
221224
void Reset_Handler(void)
222225
{
223-
/* Change default QOS values to have the best performance and correct USB behaviour */
224-
SBMATRIX->SFR[SBMATRIX_SLAVE_HMCRAMC0].reg = 2;
226+
/* Change default QOS values to have the best performance and correct USB behaviour */
227+
SBMATRIX->SFR[SBMATRIX_SLAVE_HMCRAMC0].reg = 2;
225228
#if defined(ID_USB)
226-
USB->DEVICE.QOSCTRL.bit.CQOS = 2;
227-
USB->DEVICE.QOSCTRL.bit.DQOS = 2;
229+
USB->DEVICE.QOSCTRL.bit.CQOS = 2;
230+
USB->DEVICE.QOSCTRL.bit.DQOS = 2;
228231
#endif
229-
DMAC->QOSCTRL.bit.DQOS = 2;
230-
DMAC->QOSCTRL.bit.FQOS = 2;
231-
DMAC->QOSCTRL.bit.WRBQOS = 2;
232+
DMAC->QOSCTRL.bit.DQOS = 2;
233+
DMAC->QOSCTRL.bit.FQOS = 2;
234+
DMAC->QOSCTRL.bit.WRBQOS = 2;
232235

233-
/* Overwriting the default value of the NVMCTRL.CTRLB.MANW bit (errata reference 13134) */
234-
NVMCTRL->CTRLB.bit.MANW = 1;
236+
/* Overwriting the default value of the NVMCTRL.CTRLB.MANW bit (errata reference 13134) */
237+
NVMCTRL->CTRLB.bit.MANW = 1;
235238

236-
__iar_program_start();
239+
__iar_program_start();
237240
}
238241

239242
/**
240243
* \brief Default interrupt handler for unused IRQs.
241244
*/
242245
void Dummy_Handler(void)
243246
{
244-
while (1) {
245-
}
247+
while (1) {
248+
}
246249
}

0 commit comments

Comments
 (0)