Skip to content

Commit b0dcd27

Browse files
committed
Add TI board
Added a brief README with a link to the Uniflash part in the baremetal tutorial
1 parent 07de60c commit b0dcd27

File tree

20 files changed

+19676
-0
lines changed

20 files changed

+19676
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
CFLAGS ?= -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion \
2+
-Wformat-truncation -fno-common -Wconversion \
3+
-g3 -Os -ffunction-sections -fdata-sections -I. -Iinclude \
4+
-mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 $(EXTRA_CFLAGS)
5+
LDFLAGS ?= -Tlink.ld -nostartfiles -nostdlib --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map
6+
SOURCES = main.c startup.c syscalls.c mongoose.c net.c packed_fs.c
7+
8+
ifeq ($(OS),Windows_NT)
9+
RM = cmd /C del /Q /F
10+
else
11+
RM = rm -f
12+
endif
13+
14+
build: firmware.bin
15+
16+
firmware.elf: $(SOURCES)
17+
arm-none-eabi-gcc $(SOURCES) $(CFLAGS) $(LDFLAGS) -o $@
18+
19+
firmware.bin: firmware.elf
20+
$(DOCKER) arm-none-eabi-objcopy -O binary $< $@
21+
22+
flash: firmware.bin
23+
st-flash --reset write firmware.bin 0x8000000
24+
25+
clean:
26+
$(RM) firmware.*
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Additional Requirements
2+
3+
- [Uniflash](https://mongoose.ws/tutorials/ti/ek-tm4c1294xl-baremetal/#build-and-run) for flashing
4+
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/**************************************************************************//**
2+
* @file TM4C129.h
3+
* @brief CMSIS Device System Header File for
4+
* Texas Instruments Tiva TM4C129 Device Series
5+
* @version V12591
6+
* @date 12. February 2014
7+
*
8+
* @note
9+
*
10+
******************************************************************************/
11+
12+
#ifndef TM4C129_H
13+
#define TM4C129_H
14+
15+
#if defined(SC4CE290NCPZ)
16+
#include "SC4CE290NCPZ.h"
17+
#elif defined(TM4C1290NCPDT)
18+
#include "TM4C1290NCPDT.h"
19+
#elif defined(TM4C1290NCZAD)
20+
#include "TM4C1290NCZAD.h"
21+
#elif defined(TM4C1292NCPDT)
22+
#include "TM4C1292NCPDT.h"
23+
#elif defined(TM4C1292NCZAD)
24+
#include "TM4C1292NCZAD.h"
25+
#elif defined(TM4C1294KCPDT)
26+
#include "TM4C1294KCPDT.h"
27+
#elif defined(TM4C1294NCPDT)
28+
#include "TM4C1294NCPDT.h"
29+
#elif defined(TM4C1294NCZAD)
30+
#include "TM4C1294NCZAD.h"
31+
#elif defined(TM4C1297NCZAD)
32+
#include "TM4C1297NCZAD.h"
33+
#elif defined(TM4C1299KCZAD)
34+
#include "TM4C1299KCZAD.h"
35+
#elif defined(TM4C1299NCZAD)
36+
#include "TM4C1299NCZAD.h"
37+
#elif defined(TM4C129CNCPDT)
38+
#include "TM4C129CNCPDT.h"
39+
#elif defined(TM4C129CNCZAD)
40+
#include "TM4C129CNCZAD.h"
41+
#elif defined(TM4C129DNCPDT)
42+
#include "TM4C129DNCPDT.h"
43+
#elif defined(TM4C129DNCZAD)
44+
#include "TM4C129DNCZAD.h"
45+
#elif defined(TM4C129EKCPDT)
46+
#include "TM4C129EKCPDT.h"
47+
#elif defined(TM4C129ENCPDT)
48+
#include "TM4C129ENCPDT.h"
49+
#elif defined(TM4C129ENCZAD)
50+
#include "TM4C129ENCZAD.h"
51+
#elif defined(TM4C129LNCZAD)
52+
#include "TM4C129LNCZAD.h"
53+
#elif defined(TM4C129XKCZAD)
54+
#include "TM4C129XKCZAD.h"
55+
#elif defined(TM4C129XNCZAD)
56+
#include "TM4C129XNCZAD.h"
57+
#else
58+
#error "TM4C129.h: TM4C129 Device NOT specified"
59+
#endif
60+
61+
#endif /* TM4C129_H */

step-7-webserver/ek-tm4c1294xl/include/TM4C1294NCPDT.h

Lines changed: 2061 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
/**************************************************************************//**
2+
* @file cmsis_compiler.h
3+
* @brief CMSIS compiler generic header file
4+
* @version V5.0.4
5+
* @date 10. January 2018
6+
******************************************************************************/
7+
/*
8+
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
9+
*
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the License); you may
13+
* not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
20+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
*/
24+
25+
#ifndef __CMSIS_COMPILER_H
26+
#define __CMSIS_COMPILER_H
27+
28+
#include <stdint.h>
29+
30+
/*
31+
* Arm Compiler 4/5
32+
*/
33+
#if defined ( __CC_ARM )
34+
#include "cmsis_armcc.h"
35+
36+
37+
/*
38+
* Arm Compiler 6 (armclang)
39+
*/
40+
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
41+
#include "cmsis_armclang.h"
42+
43+
44+
/*
45+
* GNU Compiler
46+
*/
47+
#elif defined ( __GNUC__ )
48+
#include "cmsis_gcc.h"
49+
50+
51+
/*
52+
* IAR Compiler
53+
*/
54+
#elif defined ( __ICCARM__ )
55+
#include <cmsis_iccarm.h>
56+
57+
58+
/*
59+
* TI Arm Compiler
60+
*/
61+
#elif defined ( __TI_ARM__ )
62+
#include <cmsis_ccs.h>
63+
64+
#ifndef __ASM
65+
#define __ASM __asm
66+
#endif
67+
#ifndef __INLINE
68+
#define __INLINE inline
69+
#endif
70+
#ifndef __STATIC_INLINE
71+
#define __STATIC_INLINE static inline
72+
#endif
73+
#ifndef __STATIC_FORCEINLINE
74+
#define __STATIC_FORCEINLINE __STATIC_INLINE
75+
#endif
76+
#ifndef __NO_RETURN
77+
#define __NO_RETURN __attribute__((noreturn))
78+
#endif
79+
#ifndef __USED
80+
#define __USED __attribute__((used))
81+
#endif
82+
#ifndef __WEAK
83+
#define __WEAK __attribute__((weak))
84+
#endif
85+
#ifndef __PACKED
86+
#define __PACKED __attribute__((packed))
87+
#endif
88+
#ifndef __PACKED_STRUCT
89+
#define __PACKED_STRUCT struct __attribute__((packed))
90+
#endif
91+
#ifndef __PACKED_UNION
92+
#define __PACKED_UNION union __attribute__((packed))
93+
#endif
94+
#ifndef __UNALIGNED_UINT32 /* deprecated */
95+
struct __attribute__((packed)) T_UINT32 { uint32_t v; };
96+
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
97+
#endif
98+
#ifndef __UNALIGNED_UINT16_WRITE
99+
__PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
100+
#define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void*)(addr))->v) = (val))
101+
#endif
102+
#ifndef __UNALIGNED_UINT16_READ
103+
__PACKED_STRUCT T_UINT16_READ { uint16_t v; };
104+
#define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
105+
#endif
106+
#ifndef __UNALIGNED_UINT32_WRITE
107+
__PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
108+
#define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
109+
#endif
110+
#ifndef __UNALIGNED_UINT32_READ
111+
__PACKED_STRUCT T_UINT32_READ { uint32_t v; };
112+
#define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
113+
#endif
114+
#ifndef __ALIGNED
115+
#define __ALIGNED(x) __attribute__((aligned(x)))
116+
#endif
117+
#ifndef __RESTRICT
118+
#warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
119+
#define __RESTRICT
120+
#endif
121+
122+
123+
/*
124+
* TASKING Compiler
125+
*/
126+
#elif defined ( __TASKING__ )
127+
/*
128+
* The CMSIS functions have been implemented as intrinsics in the compiler.
129+
* Please use "carm -?i" to get an up to date list of all intrinsics,
130+
* Including the CMSIS ones.
131+
*/
132+
133+
#ifndef __ASM
134+
#define __ASM __asm
135+
#endif
136+
#ifndef __INLINE
137+
#define __INLINE inline
138+
#endif
139+
#ifndef __STATIC_INLINE
140+
#define __STATIC_INLINE static inline
141+
#endif
142+
#ifndef __STATIC_FORCEINLINE
143+
#define __STATIC_FORCEINLINE __STATIC_INLINE
144+
#endif
145+
#ifndef __NO_RETURN
146+
#define __NO_RETURN __attribute__((noreturn))
147+
#endif
148+
#ifndef __USED
149+
#define __USED __attribute__((used))
150+
#endif
151+
#ifndef __WEAK
152+
#define __WEAK __attribute__((weak))
153+
#endif
154+
#ifndef __PACKED
155+
#define __PACKED __packed__
156+
#endif
157+
#ifndef __PACKED_STRUCT
158+
#define __PACKED_STRUCT struct __packed__
159+
#endif
160+
#ifndef __PACKED_UNION
161+
#define __PACKED_UNION union __packed__
162+
#endif
163+
#ifndef __UNALIGNED_UINT32 /* deprecated */
164+
struct __packed__ T_UINT32 { uint32_t v; };
165+
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
166+
#endif
167+
#ifndef __UNALIGNED_UINT16_WRITE
168+
__PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
169+
#define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
170+
#endif
171+
#ifndef __UNALIGNED_UINT16_READ
172+
__PACKED_STRUCT T_UINT16_READ { uint16_t v; };
173+
#define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
174+
#endif
175+
#ifndef __UNALIGNED_UINT32_WRITE
176+
__PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
177+
#define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
178+
#endif
179+
#ifndef __UNALIGNED_UINT32_READ
180+
__PACKED_STRUCT T_UINT32_READ { uint32_t v; };
181+
#define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
182+
#endif
183+
#ifndef __ALIGNED
184+
#define __ALIGNED(x) __align(x)
185+
#endif
186+
#ifndef __RESTRICT
187+
#warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
188+
#define __RESTRICT
189+
#endif
190+
191+
192+
/*
193+
* COSMIC Compiler
194+
*/
195+
#elif defined ( __CSMC__ )
196+
#include <cmsis_csm.h>
197+
198+
#ifndef __ASM
199+
#define __ASM _asm
200+
#endif
201+
#ifndef __INLINE
202+
#define __INLINE inline
203+
#endif
204+
#ifndef __STATIC_INLINE
205+
#define __STATIC_INLINE static inline
206+
#endif
207+
#ifndef __STATIC_FORCEINLINE
208+
#define __STATIC_FORCEINLINE __STATIC_INLINE
209+
#endif
210+
#ifndef __NO_RETURN
211+
// NO RETURN is automatically detected hence no warning here
212+
#define __NO_RETURN
213+
#endif
214+
#ifndef __USED
215+
#warning No compiler specific solution for __USED. __USED is ignored.
216+
#define __USED
217+
#endif
218+
#ifndef __WEAK
219+
#define __WEAK __weak
220+
#endif
221+
#ifndef __PACKED
222+
#define __PACKED @packed
223+
#endif
224+
#ifndef __PACKED_STRUCT
225+
#define __PACKED_STRUCT @packed struct
226+
#endif
227+
#ifndef __PACKED_UNION
228+
#define __PACKED_UNION @packed union
229+
#endif
230+
#ifndef __UNALIGNED_UINT32 /* deprecated */
231+
@packed struct T_UINT32 { uint32_t v; };
232+
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
233+
#endif
234+
#ifndef __UNALIGNED_UINT16_WRITE
235+
__PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
236+
#define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
237+
#endif
238+
#ifndef __UNALIGNED_UINT16_READ
239+
__PACKED_STRUCT T_UINT16_READ { uint16_t v; };
240+
#define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
241+
#endif
242+
#ifndef __UNALIGNED_UINT32_WRITE
243+
__PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
244+
#define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
245+
#endif
246+
#ifndef __UNALIGNED_UINT32_READ
247+
__PACKED_STRUCT T_UINT32_READ { uint32_t v; };
248+
#define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
249+
#endif
250+
#ifndef __ALIGNED
251+
#warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored.
252+
#define __ALIGNED(x)
253+
#endif
254+
#ifndef __RESTRICT
255+
#warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
256+
#define __RESTRICT
257+
#endif
258+
259+
260+
#else
261+
#error Unknown compiler.
262+
#endif
263+
264+
265+
#endif /* __CMSIS_COMPILER_H */
266+

0 commit comments

Comments
 (0)