Skip to content

Commit 3f7718c

Browse files
committed
Adding MAXWSNENV platform.
1 parent dc0b26d commit 3f7718c

Some content is hidden

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

76 files changed

+12036
-12
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
; MAX32610
3+
; 256KB FLASH (0x40000) @ 0x000000000
4+
; 2KB RAM (0x8000) @ 0x20000000
5+
6+
7+
; MAX32610: 256KB FLASH (0x40000) + 32KB RAM (0x8000)
8+
9+
LR_IROM1 0x00000000 0x40000 { ; load region size_region
10+
ER_IROM1 0x00000000 0x40000 { ; load address = execution address
11+
*.o (RESET, +First)
12+
*(InRoot$$Sections)
13+
.ANY (+RO)
14+
}
15+
16+
; [RAM] Vector table dynamic copy: 79 vectors * 4 bytes = (0x140) - alignment
17+
RW_IRAM1 (0x20000000+0x140) (0x8000-0x140) { ; RW data
18+
.ANY (+RW +ZI)
19+
}
20+
21+
}
Lines changed: 256 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,256 @@
1+
/*******************************************************************************
2+
* Copyright (C) 2015 Maxim Integrated Products, Inc., All Rights Reserved.
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included
12+
* in all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+
* IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
18+
* OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+
* OTHER DEALINGS IN THE SOFTWARE.
21+
*
22+
* Except as contained in this notice, the name of Maxim Integrated
23+
* Products, Inc. shall not be used except as stated in the Maxim Integrated
24+
* Products, Inc. Branding Policy.
25+
*
26+
* The mere transfer of this software does not imply any licenses
27+
* of trade secrets, proprietary technology, copyrights, patents,
28+
* trademarks, maskwork rights, or any other form of intellectual
29+
* property whatsoever. Maxim Integrated Products, Inc. retains all
30+
* ownership rights.
31+
*******************************************************************************
32+
*/
33+
34+
__initial_sp EQU 0x20008000 ; Top of RAM
35+
36+
PRESERVE8
37+
THUMB
38+
39+
40+
; Vector Table Mapped to Address 0 at Reset
41+
42+
AREA RESET, DATA, READONLY
43+
EXPORT __Vectors
44+
EXPORT __Vectors_End
45+
EXPORT __Vectors_Size
46+
47+
__Vectors DCD __initial_sp /* Top of Stack */
48+
DCD Reset_Handler /* Reset Handler */
49+
DCD NMI_Handler /* NMI Handler */
50+
DCD HardFault_Handler /* Hard Fault Handler */
51+
DCD DefaultIRQ_Handler /* MPU Fault Handler */
52+
DCD DefaultIRQ_Handler /* Bus Fault Handler */
53+
DCD DefaultIRQ_Handler /* Usage Fault Handler */
54+
DCD 0 /* Reserved */
55+
DCD 0 /* Reserved */
56+
DCD 0 /* Reserved */
57+
DCD 0 /* Reserved */
58+
DCD DefaultIRQ_Handler /* SVCall Handler */
59+
DCD DebugMon_Handler /* Debug Monitor Handler */
60+
DCD 0 /* Reserved */
61+
DCD DefaultIRQ_Handler /* PendSV Handler */
62+
DCD SysTick_IRQHandler /* SysTick Handler */
63+
64+
/* Maxim 32610 Externals interrupts */
65+
DCD UART0_IRQHandler /* 16: 1 UART0 */
66+
DCD UART1_IRQHandler /* 17: 2 UART1 */
67+
DCD I2CM0_IRQHandler /* 18: 3 I2C Master 0 */
68+
DCD I2CS_IRQHandler /* 19: 4 I2C Slave */
69+
DCD USB_IRQHandler /* 20: 5 USB */
70+
DCD PMU_IRQHandler /* 21: 6 DMA */
71+
DCD AFE_IRQHandler /* 22: 7 AFE */
72+
DCD MAA_IRQHandler /* 23: 8 MAA */
73+
DCD AES_IRQHandler /* 24: 9 AES */
74+
DCD SPI0_IRQHandler /* 25:10 SPI0 */
75+
DCD SPI1_IRQHandler /* 26:11 SPI1 */
76+
DCD SPI2_IRQHandler /* 27:12 SPI2 */
77+
DCD TMR0_IRQHandler /* 28:13 Timer32-0 */
78+
DCD TMR1_IRQHandler /* 29:14 Timer32-1 */
79+
DCD TMR2_IRQHandler /* 30:15 Timer32-1 */
80+
DCD TMR3_IRQHandler /* 31:16 Timer32-2 */
81+
DCD RSVD0_IRQHandler /* 32:17 RSVD */
82+
DCD RSVD1_IRQHandler /* 33:18 RSVD */
83+
DCD DAC0_IRQHandler /* 34:19 DAC0 (12-bit DAC) */
84+
DCD DAC1_IRQHandler /* 35:20 DAC1 (12-bit DAC) */
85+
DCD DAC2_IRQHandler /* 36:21 DAC2 (8-bit DAC) */
86+
DCD DAC3_IRQHandler /* 37:22 DAC3 (8-bit DAC) */
87+
DCD ADC_IRQHandler /* 38:23 ADC */
88+
DCD FLC_IRQHandler /* 39:24 Flash Controller */
89+
DCD PWRMAN_IRQHandler /* 40:25 PWRMAN */
90+
DCD CLKMAN_IRQHandler /* 41:26 CLKMAN */
91+
DCD RTC0_IRQHandler /* 42:27 RTC INT0 */
92+
DCD RTC1_IRQHandler /* 43:28 RTC INT1 */
93+
DCD RTC2_IRQHandler /* 44:29 RTC INT2 */
94+
DCD RTC3_IRQHandler /* 45:30 RTC INT3 */
95+
DCD WDT0_IRQHandler /* 46:31 WATCHDOG0 */
96+
DCD WDT0_P_IRQHandler /* 47:32 WATCHDOG0 PRE-WINDOW */
97+
DCD WDT1_IRQHandler /* 48:33 WATCHDOG1 */
98+
DCD WDT1_P_IRQHandler /* 49:34 WATCHDOG1 PRE-WINDOW */
99+
DCD GPIO_P0_IRQHandler /* 50:35 GPIO Port 0 */
100+
DCD GPIO_P1_IRQHandler /* 51:36 GPIO Port 1 */
101+
DCD GPIO_P2_IRQHandler /* 52:37 GPIO Port 2 */
102+
DCD GPIO_P3_IRQHandler /* 53:38 GPIO Port 3 */
103+
DCD GPIO_P4_IRQHandler /* 54:39 GPIO Port 4 */
104+
DCD GPIO_P5_IRQHandler /* 55:40 GPIO Port 5 */
105+
DCD GPIO_P6_IRQHandler /* 56:41 GPIO Port 6 */
106+
DCD GPIO_P7_IRQHandler /* 57:42 GPIO Port 7 */
107+
DCD TMR16_0_IRQHandler /* 58:43 Timer16-s0 */
108+
DCD TMR16_1_IRQHandler /* 59:44 Timer16-s1 */
109+
DCD TMR16_2_IRQHandler /* 60:45 Timer16-s2 */
110+
DCD TMR16_3_IRQHandler /* 61:46 Timer16-s3 */
111+
DCD I2CM1_IRQHandler /* 62:47 I2C Master 1 */
112+
__Vectors_End
113+
114+
__Vectors_Size EQU __Vectors_End - __Vectors
115+
116+
AREA |.text|, CODE, READONLY
117+
118+
Reset_Handler PROC
119+
EXPORT Reset_Handler [WEAK]
120+
IMPORT SystemInit
121+
IMPORT __main
122+
LDR R0, =SystemInit
123+
BLX R0
124+
LDR R0, =__main
125+
BX R0
126+
ENDP
127+
128+
; Dummy Exception Handlers (infinite loops which can be modified)
129+
130+
NMI_Handler PROC
131+
EXPORT NMI_Handler [WEAK]
132+
B NMI_Handler
133+
ENDP
134+
135+
HardFault_Handler PROC
136+
EXPORT HardFault_Handler [WEAK]
137+
B HardFault_Handler
138+
ENDP
139+
140+
DefaultIRQ_Handler PROC
141+
EXPORT DefaultIRQ_Handler [WEAK]
142+
B DefaultIRQ_Handler
143+
ENDP
144+
145+
DebugMon_Handler PROC
146+
EXPORT DebugMon_Handler [WEAK]
147+
B DebugMon_Handler
148+
ENDP
149+
150+
SysTick_IRQHandler PROC
151+
EXPORT SysTick_IRQHandler [WEAK]
152+
B SysTick_IRQHandler
153+
ENDP
154+
155+
Default_Handler PROC
156+
157+
EXPORT UART0_IRQHandler [WEAK]
158+
EXPORT UART1_IRQHandler [WEAK]
159+
EXPORT I2CM0_IRQHandler [WEAK]
160+
EXPORT I2CS_IRQHandler [WEAK]
161+
EXPORT USB_IRQHandler [WEAK]
162+
EXPORT PMU_IRQHandler [WEAK]
163+
EXPORT AFE_IRQHandler [WEAK]
164+
EXPORT MAA_IRQHandler [WEAK]
165+
EXPORT AES_IRQHandler [WEAK]
166+
EXPORT SPI0_IRQHandler [WEAK]
167+
EXPORT SPI1_IRQHandler [WEAK]
168+
EXPORT SPI2_IRQHandler [WEAK]
169+
EXPORT TMR0_IRQHandler [WEAK]
170+
EXPORT TMR1_IRQHandler [WEAK]
171+
EXPORT TMR2_IRQHandler [WEAK]
172+
EXPORT TMR3_IRQHandler [WEAK]
173+
EXPORT RSVD0_IRQHandler [WEAK]
174+
EXPORT RSVD1_IRQHandler [WEAK]
175+
EXPORT DAC0_IRQHandler [WEAK]
176+
EXPORT DAC1_IRQHandler [WEAK]
177+
EXPORT DAC2_IRQHandler [WEAK]
178+
EXPORT DAC3_IRQHandler [WEAK]
179+
EXPORT ADC_IRQHandler [WEAK]
180+
EXPORT FLC_IRQHandler [WEAK]
181+
EXPORT PWRMAN_IRQHandler [WEAK]
182+
EXPORT CLKMAN_IRQHandler [WEAK]
183+
EXPORT RTC0_IRQHandler [WEAK]
184+
EXPORT RTC1_IRQHandler [WEAK]
185+
EXPORT RTC2_IRQHandler [WEAK]
186+
EXPORT RTC3_IRQHandler [WEAK]
187+
EXPORT WDT0_IRQHandler [WEAK]
188+
EXPORT WDT0_P_IRQHandler [WEAK]
189+
EXPORT WDT1_IRQHandler [WEAK]
190+
EXPORT WDT1_P_IRQHandler [WEAK]
191+
EXPORT GPIO_P0_IRQHandler [WEAK]
192+
EXPORT GPIO_P1_IRQHandler [WEAK]
193+
EXPORT GPIO_P2_IRQHandler [WEAK]
194+
EXPORT GPIO_P3_IRQHandler [WEAK]
195+
EXPORT GPIO_P4_IRQHandler [WEAK]
196+
EXPORT GPIO_P5_IRQHandler [WEAK]
197+
EXPORT GPIO_P6_IRQHandler [WEAK]
198+
EXPORT GPIO_P7_IRQHandler [WEAK]
199+
EXPORT TMR16_0_IRQHandler [WEAK]
200+
EXPORT TMR16_1_IRQHandler [WEAK]
201+
EXPORT TMR16_2_IRQHandler [WEAK]
202+
EXPORT TMR16_3_IRQHandler [WEAK]
203+
EXPORT I2CM1_IRQHandler [WEAK]
204+
205+
UART0_IRQHandler
206+
UART1_IRQHandler
207+
I2CM0_IRQHandler
208+
I2CS_IRQHandler
209+
USB_IRQHandler
210+
PMU_IRQHandler
211+
AFE_IRQHandler
212+
MAA_IRQHandler
213+
AES_IRQHandler
214+
SPI0_IRQHandler
215+
SPI1_IRQHandler
216+
SPI2_IRQHandler
217+
TMR0_IRQHandler
218+
TMR1_IRQHandler
219+
TMR2_IRQHandler
220+
TMR3_IRQHandler
221+
RSVD0_IRQHandler
222+
RSVD1_IRQHandler
223+
DAC0_IRQHandler
224+
DAC1_IRQHandler
225+
DAC2_IRQHandler
226+
DAC3_IRQHandler
227+
ADC_IRQHandler
228+
FLC_IRQHandler
229+
PWRMAN_IRQHandler
230+
CLKMAN_IRQHandler
231+
RTC0_IRQHandler
232+
RTC1_IRQHandler
233+
RTC2_IRQHandler
234+
RTC3_IRQHandler
235+
WDT0_IRQHandler
236+
WDT0_P_IRQHandler
237+
WDT1_IRQHandler
238+
WDT1_P_IRQHandler
239+
GPIO_P0_IRQHandler
240+
GPIO_P1_IRQHandler
241+
GPIO_P2_IRQHandler
242+
GPIO_P3_IRQHandler
243+
GPIO_P4_IRQHandler
244+
GPIO_P5_IRQHandler
245+
GPIO_P6_IRQHandler
246+
GPIO_P7_IRQHandler
247+
TMR16_0_IRQHandler
248+
TMR16_1_IRQHandler
249+
TMR16_2_IRQHandler
250+
TMR16_3_IRQHandler
251+
I2CM1_IRQHandler
252+
253+
B .
254+
ENDP
255+
ALIGN
256+
END
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*******************************************************************************
2+
* Copyright (C) 2015 Maxim Integrated Products, Inc., All Rights Reserved.
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included
12+
* in all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+
* IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
18+
* OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+
* OTHER DEALINGS IN THE SOFTWARE.
21+
*
22+
* Except as contained in this notice, the name of Maxim Integrated
23+
* Products, Inc. shall not be used except as stated in the Maxim Integrated
24+
* Products, Inc. Branding Policy.
25+
*
26+
* The mere transfer of this software does not imply any licenses
27+
* of trade secrets, proprietary technology, copyrights, patents,
28+
* trademarks, maskwork rights, or any other form of intellectual
29+
* property whatsoever. Maxim Integrated Products, Inc. retains all
30+
* ownership rights.
31+
*******************************************************************************
32+
*/
33+
34+
#ifdef __cplusplus
35+
extern "C" {
36+
#endif
37+
38+
#include <rt_misc.h>
39+
#include <stdint.h>
40+
41+
extern char Image$$RW_IRAM1$$ZI$$Limit[];
42+
43+
extern __value_in_regs struct __initial_stackheap __user_setup_stackheap(uint32_t R0, uint32_t R1, uint32_t R2, uint32_t R3) {
44+
uint32_t zi_limit = (uint32_t)Image$$RW_IRAM1$$ZI$$Limit;
45+
uint32_t sp_limit = __current_sp();
46+
47+
zi_limit = (zi_limit + 7) & ~0x7; // ensure zi_limit is 8-byte aligned
48+
49+
struct __initial_stackheap r;
50+
r.heap_base = zi_limit;
51+
r.heap_limit = sp_limit;
52+
return r;
53+
}
54+
55+
#ifdef __cplusplus
56+
}
57+
#endif

0 commit comments

Comments
 (0)