source: rtems/c/src/lib/libbsp/arm/nds/Makefile.am @ 24bf11e

4.115
Last change on this file since 24bf11e was 24bf11e, checked in by Sebastian Huber <sebastian.huber@…>, on 02/12/14 at 09:31:38

score: Add CPU counter support

Add a CPU counter interface to allow access to a free-running counter.
It is useful to measure short time intervals. This can be used for
example to enable profiling of critical low-level functions.

Add two busy wait functions rtems_counter_delay_ticks() and
rtems_counter_delay_nanoseconds() implemented via the CPU counter.

  • Property mode set to 100644
File size: 9.8 KB
Line 
1ACLOCAL_AMFLAGS = -I ../../../../aclocal
2
3SUBDIRS = . tools
4
5include $(top_srcdir)/../../../../automake/compile.am
6
7include_bspdir = $(includedir)/bsp
8
9dist_project_lib_DATA = bsp_specs
10
11include_HEADERS = include/bsp.h
12include_HEADERS += ../../shared/include/tm27.h
13
14nodist_include_HEADERS = include/bspopts.h
15nodist_include_HEADERS += ../../shared/include/coverhd.h
16
17nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
18DISTCLEANFILES = include/bspopts.h
19noinst_PROGRAMS =
20
21noinst_LIBRARIES = libbspstart.a
22libbspstart_a_SOURCES = start/start.S
23project_lib_DATA = start.$(OBJEXT)
24
25dist_project_lib_DATA += startup/linkcmds
26
27noinst_LIBRARIES += libbsp.a
28libbsp_a_SOURCES =
29
30include_ndsdir = $(includedir)/nds
31include_nds_HEADERS = touchscreen/touchscreen.h sound/sound.h
32
33noinst_PROGRAMS += startup.rel
34startup_rel_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
35    startup/bspstart.c ../../shared/bspclean.c startup/bspreset.c \
36    ../../shared/bspgetworkarea.c ../../shared/bsppredriverhook.c \
37    ../../shared/bsppretaskinghook.c ../../shared/bootcard.c
38libbsp_a_SOURCES += ../../shared/cpucounterread.c
39libbsp_a_SOURCES += ../../shared/cpucounterdiff.c
40startup_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
41startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
42
43noinst_PROGRAMS += gnatsupp.rel
44gnatsupp_rel_SOURCES = ../../shared/gnatinstallhandler.c
45gnatsupp_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
46gnatsupp_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
47
48noinst_PROGRAMS += clock.rel
49clock_rel_SOURCES = clock/clock.c
50clock_rel_SOURCES += ../../shared/clockdrv_shell.h
51clock_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
52clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
53
54noinst_PROGRAMS += rtc.rel
55rtc_rel_SOURCES = rtc/rtc.c ../../shared/tod.c
56rtc_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
57rtc_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
58
59noinst_PROGRAMS += console.rel
60console_rel_SOURCES = console/console.c
61console_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include -I$(srcdir)/include
62console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
63
64noinst_PROGRAMS += fb.rel
65fb_rel_SOURCES = fb/fb.c
66fb_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
67fb_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
68
69noinst_PROGRAMS += touchscreen.rel
70touchscreen_rel_SOURCES = touchscreen/touchscreen.c touchscreen/parser.c \
71                          touchscreen/reco.c
72touchscreen_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
73touchscreen_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
74
75noinst_PROGRAMS += timer.rel
76timer_rel_SOURCES = timer/timer.c
77timer_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
78timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
79
80noinst_PROGRAMS += sound.rel
81sound_rel_SOURCES = sound/sound.c
82sound_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
83sound_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
84
85noinst_PROGRAMS += block.rel
86block_rel_SOURCES = block/block.c
87block_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include -DNDS -I$(srcdir)/libfat/source/disc_io
88block_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
89
90noinst_PROGRAMS += irq.rel
91irq_rel_SOURCES = irq/irq.c
92irq_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
93irq_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
94
95if HAS_NETWORKING
96noinst_PROGRAMS += wifi.rel
97wifi_rel_SOURCES =      wifi/wifi.c                                     \
98                        wifi/compat.c
99wifi_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/dswifi/include -I$(srcdir)/libnds/include -I$(srcdir)/dswifi/include -D_KERNEL -D__BSD_VISIBLE
100wifi_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
101endif
102
103# libnds, ARM9 side
104noinst_PROGRAMS += libnds9.rel
105bin2s:  $(srcdir)/tools/bin2s.c
106        cc -o $(srcdir)/tools/bin2s $(srcdir)/tools/bin2s.c
107
108SUFFIXES = .bin
109
110%.s:    %.bin bin2s
111        $(srcdir)/tools/bin2s $< > $(srcdir)/$@
112
113libnds9_rel_SOURCES =   libnds/source/common/biosCalls.S                \
114                        libnds/source/common/card.c                     \
115                        libnds/source/common/gbfs.c                     \
116                        libnds/source/common/interruptDispatcher.S      \
117                        libnds/source/common/interrupts.c               \
118                        libnds/source/arm9/boxtest.c                    \
119                        libnds/source/arm9/default_font.S               \
120                        libnds/source/arm9/console.c                    \
121                        libnds/source/arm9/COS.S                        \
122                        libnds/source/arm9/dcache.S                     \
123                        libnds/source/arm9/exceptionHandler.S           \
124                        libnds/source/arm9/exceptions.c                 \
125                        libnds/source/arm9/gurumeditation.c             \
126                        libnds/source/arm9/icache.S                     \
127                        libnds/source/arm9/image.c                      \
128                        libnds/source/arm9/initSystem.c                 \
129                        libnds/source/arm9/keys.c                       \
130                        libnds/source/arm9/ndsmotion.c                  \
131                        libnds/source/arm9/pcx.c                        \
132                        libnds/source/arm9/rumble.c                     \
133                        libnds/source/arm9/SIN.S                        \
134                        libnds/source/arm9/sound.c                      \
135                        libnds/source/arm9/system.c                     \
136                        libnds/source/arm9/TAN.S                        \
137                        libnds/source/arm9/touch.c                      \
138                        libnds/source/arm9/video.c                      \
139                        libnds/source/arm9/videoGL.c
140libnds9_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include -I$(srcdir)/include
141libnds9_rel_CCASFLAGS = $(AM_CCASFLAGS) -DARM9 -I$(srcdir)/libnds/include
142libnds9_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
143
144if HAS_NETWORKING
145# dswifi, ARM9 side
146noinst_PROGRAMS += dswifi9.rel
147dswifi9_rel_SOURCES =   dswifi/arm9/source/wifi_arm9.c                  \
148                        dswifi/common/source/spinlock.S
149dswifi9_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/dswifi/include -I$(srcdir)/libnds/include -I$(srcdir)/dswifi/common/source -I$(srcdir)/wifi -D_KERNEL
150dswifi9_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
151endif
152
153# dldi
154noinst_PROGRAMS += libdldi.rel
155libdldi_rel_SOURCES =   libfat/source/disc_io/disc.c                    \
156                        libfat/source/disc_io/io_cf_common.c            \
157                        libfat/source/disc_io/io_efa2.c                 \
158                        libfat/source/disc_io/io_fcsr.c                 \
159                        libfat/source/disc_io/io_m3cf.c                 \
160                        libfat/source/disc_io/io_m3_common.c            \
161                        libfat/source/disc_io/io_m3sd.c                 \
162                        libfat/source/disc_io/io_mpcf.c                 \
163                        libfat/source/disc_io/io_njsd.c                 \
164                        libfat/source/disc_io/io_nmmc.c                 \
165                        libfat/source/disc_io/io_sccf.c                 \
166                        libfat/source/disc_io/io_sc_common.c            \
167                        libfat/source/disc_io/io_scsd.c                 \
168                        libfat/source/disc_io/io_sd_common.c            \
169                        libfat/source/disc_io/io_dldi.S                 \
170                        libfat/source/disc_io/io_scsd_s.S
171libdldi_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include -I$(srcdir)/libfat/source/disc_io
172libdldi_rel_CCASFLAGS = $(AM_CCASFLAGS) -DARM9 -I$(srcdir)/libnds/include -I$(srcdir)/libfat/source/disc_io
173libdldi_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
174
175# libnds, ARM7 side
176noinst_PROGRAMS += libnds7.rel
177libnds7_rel_SOURCES =   libnds/source/common/biosCalls.S                \
178                        libnds/source/common/card.c                     \
179                        libnds/source/common/gbfs.c                     \
180                        libnds/source/common/interruptDispatcher.S      \
181                        libnds/source/common/interrupts.c               \
182                        libnds/source/arm7/audio.c                      \
183                        libnds/source/arm7/clock.c                      \
184                        libnds/source/arm7/microphone.c                 \
185                        libnds/source/arm7/spi.c                        \
186                        libnds/source/arm7/touch.c                      \
187                        libnds/source/arm7/userSettings.c
188libnds7_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM7 -I$(srcdir)/libnds/include
189libnds7_rel_CFLAGS = -mcpu=arm7tdmi -mfpu=vfp -mfloat-abi=soft
190libnds7_rel_CCASFLAGS = -mcpu=arm7tdmi -mfpu=vfp -mfloat-abi=soft
191libnds7_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
192
193if HAS_NETWORKING
194# dswifi, ARM7 side
195noinst_PROGRAMS += dswifi7.rel
196dswifi7_rel_SOURCES =   dswifi/arm7/source/wifi_arm7.c                  \
197                        dswifi/common/source/spinlock.S
198dswifi7_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM7 -I$(srcdir)/dswifi/include -I$(srcdir)/libnds/include -I$(srcdir)/dswifi/common/source
199dswifi7_rel_CFLAGS = -mcpu=arm7tdmi -mfpu=vfp -mfloat-abi=soft
200dswifi7_rel_CCASFLAGS = -mcpu=arm7tdmi -mfpu=vfp -mfloat-abi=soft
201dswifi7_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
202endif
203
204# include libnds to dist so the user program can include it
205include_libndsdir = $(includedir)/libnds
206include_libnds_HEADERS =        libnds/include/gbfs.h                   \
207                                libnds/include/nds.h
208
209include_libndsndsdir = $(includedir)/libnds/nds
210include_libndsnds_HEADERS =     libnds/include/nds/memory.h             \
211                                libnds/include/nds/system.h             \
212                                libnds/include/nds/bios.h               \
213                                libnds/include/nds/registers_alt.h      \
214                                libnds/include/nds/interrupts.h         \
215                                libnds/include/nds/card.h               \
216                                libnds/include/nds/ipc.h                \
217                                libnds/include/nds/timers.h             \
218                                libnds/include/nds/dma.h                \
219                                libnds/include/nds/reload.h             \
220                                libnds/include/nds/jtypes.h
221
222include_libndsnds9dir = $(includedir)/libnds/nds/arm9
223include_libndsnds9_HEADERS =    libnds/include/nds/arm9/ndsmotion.h     \
224                                libnds/include/nds/arm9/pcx.h           \
225                                libnds/include/nds/arm9/input.h         \
226                                libnds/include/nds/arm9/math.h          \
227                                libnds/include/nds/arm9/console.h       \
228                                libnds/include/nds/arm9/sprite.h        \
229                                libnds/include/nds/arm9/videoGL.h       \
230                                libnds/include/nds/arm9/cache.h         \
231                                libnds/include/nds/arm9/image.h         \
232                                libnds/include/nds/arm9/trig_lut.h      \
233                                libnds/include/nds/arm9/video.h         \
234                                libnds/include/nds/arm9/exceptions.h    \
235                                libnds/include/nds/arm9/rumble.h        \
236                                libnds/include/nds/arm9/background.h    \
237                                libnds/include/nds/arm9/boxtest.h       \
238                                libnds/include/nds/arm9/postest.h       \
239                                libnds/include/nds/arm9/sound.h
240
241include_libndsnds7dir = $(includedir)/libnds/nds/arm7
242include_libndsnds7_HEADERS =    libnds/include/nds/arm7/serial.h        \
243                                libnds/include/nds/arm7/audio.h         \
244                                libnds/include/nds/arm7/clock.h         \
245                                libnds/include/nds/arm7/touch.h
246EXTRA_DIST = coproc/coproc.S coproc/coproc.c
247if HAS_NETWORKING
248coproc.bin: coproc/coproc.S coproc/coproc.c libnds7.rel dswifi7.rel
249        @CC@ -o coproc.elf -mcpu=arm7tdmi -mfpu=vfp -mfloat-abi=soft -O2 -DARM7 -I$(srcdir)/libnds/include -I$(srcdir)/dswifi/include -DENABLE_WIFI -T $(srcdir)/coproc/coproc.ld $^ -lc
250        $(OBJCOPY) -O binary coproc.elf coproc.bin
251else
252coproc.bin: coproc/coproc.S coproc/coproc.c libnds7.rel
253        @CC@ -o coproc.elf -mcpu=arm7tdmi -mfpu=vfp -mfloat-abi=soft -O2 -DARM7 -I$(srcdir)/libnds/include -T $(srcdir)/coproc/coproc.ld $^ -lc
254        $(OBJCOPY) -O binary coproc.elf coproc.bin
255endif
256project_lib_DATA += coproc.bin
257
258libbsp_a_LIBADD = clock.rel console.rel gnatsupp.rel startup.rel irq.rel \
259    timer.rel libnds9.rel rtc.rel fb.rel touchscreen.rel sound.rel \
260    block.rel libdldi.rel
261
262if HAS_NETWORKING
263    libbsp_a_LIBADD += wifi.rel dswifi9.rel
264endif
265
266include $(srcdir)/preinstall.am
267include $(top_srcdir)/../../../../automake/local.am
Note: See TracBrowser for help on using the repository browser.