• R/O
  • SSH
  • HTTPS

chibios: Commit


Commit MetaInfo

Revision13100 (tree)
Time2019-10-15 22:26:09
Authorroccomarco

Log Message

Added a base demo for ADICUP360 relying on PAL driver and ST only (still incomplete)

Change Summary

Incremental Difference

--- trunk/demos/ADI/RT-ADUCM360-ADICUP360/cfg/chconf.h (nonexistent)
+++ trunk/demos/ADI/RT-ADUCM360-ADICUP360/cfg/chconf.h (revision 13100)
@@ -0,0 +1,725 @@
1+/*
2+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+*/
16+
17+/**
18+ * @file rt/templates/chconf.h
19+ * @brief Configuration file template.
20+ * @details A copy of this file must be placed in each project directory, it
21+ * contains the application specific kernel settings.
22+ *
23+ * @addtogroup config
24+ * @details Kernel related settings and hooks.
25+ * @{
26+ */
27+
28+#ifndef CHCONF_H
29+#define CHCONF_H
30+
31+#define _CHIBIOS_RT_CONF_
32+#define _CHIBIOS_RT_CONF_VER_6_1_
33+
34+/*===========================================================================*/
35+/**
36+ * @name System timers settings
37+ * @{
38+ */
39+/*===========================================================================*/
40+
41+/**
42+ * @brief System time counter resolution.
43+ * @note Allowed values are 16 or 32 bits.
44+ */
45+#if !defined(CH_CFG_ST_RESOLUTION)
46+#define CH_CFG_ST_RESOLUTION 32
47+#endif
48+
49+/**
50+ * @brief System tick frequency.
51+ * @details Frequency of the system timer that drives the system ticks. This
52+ * setting also defines the system tick time unit.
53+ */
54+#if !defined(CH_CFG_ST_FREQUENCY)
55+#define CH_CFG_ST_FREQUENCY 10000
56+#endif
57+
58+/**
59+ * @brief Time intervals data size.
60+ * @note Allowed values are 16, 32 or 64 bits.
61+ */
62+#if !defined(CH_CFG_INTERVALS_SIZE)
63+#define CH_CFG_INTERVALS_SIZE 32
64+#endif
65+
66+/**
67+ * @brief Time types data size.
68+ * @note Allowed values are 16 or 32 bits.
69+ */
70+#if !defined(CH_CFG_TIME_TYPES_SIZE)
71+#define CH_CFG_TIME_TYPES_SIZE 32
72+#endif
73+
74+/**
75+ * @brief Time delta constant for the tick-less mode.
76+ * @note If this value is zero then the system uses the classic
77+ * periodic tick. This value represents the minimum number
78+ * of ticks that is safe to specify in a timeout directive.
79+ * The value one is not valid, timeouts are rounded up to
80+ * this value.
81+ */
82+#if !defined(CH_CFG_ST_TIMEDELTA)
83+#define CH_CFG_ST_TIMEDELTA 0
84+#endif
85+
86+/** @} */
87+
88+/*===========================================================================*/
89+/**
90+ * @name Kernel parameters and options
91+ * @{
92+ */
93+/*===========================================================================*/
94+
95+/**
96+ * @brief Round robin interval.
97+ * @details This constant is the number of system ticks allowed for the
98+ * threads before preemption occurs. Setting this value to zero
99+ * disables the preemption for threads with equal priority and the
100+ * round robin becomes cooperative. Note that higher priority
101+ * threads can still preempt, the kernel is always preemptive.
102+ * @note Disabling the round robin preemption makes the kernel more compact
103+ * and generally faster.
104+ * @note The round robin preemption is not supported in tickless mode and
105+ * must be set to zero in that case.
106+ */
107+#if !defined(CH_CFG_TIME_QUANTUM)
108+#define CH_CFG_TIME_QUANTUM 0
109+#endif
110+
111+/**
112+ * @brief Managed RAM size.
113+ * @details Size of the RAM area to be managed by the OS. If set to zero
114+ * then the whole available RAM is used. The core memory is made
115+ * available to the heap allocator and/or can be used directly through
116+ * the simplified core memory allocator.
117+ *
118+ * @note In order to let the OS manage the whole RAM the linker script must
119+ * provide the @p __heap_base__ and @p __heap_end__ symbols.
120+ * @note Requires @p CH_CFG_USE_MEMCORE.
121+ */
122+#if !defined(CH_CFG_MEMCORE_SIZE)
123+#define CH_CFG_MEMCORE_SIZE 0
124+#endif
125+
126+/**
127+ * @brief Idle thread automatic spawn suppression.
128+ * @details When this option is activated the function @p chSysInit()
129+ * does not spawn the idle thread. The application @p main()
130+ * function becomes the idle thread and must implement an
131+ * infinite loop.
132+ */
133+#if !defined(CH_CFG_NO_IDLE_THREAD)
134+#define CH_CFG_NO_IDLE_THREAD FALSE
135+#endif
136+
137+/** @} */
138+
139+/*===========================================================================*/
140+/**
141+ * @name Performance options
142+ * @{
143+ */
144+/*===========================================================================*/
145+
146+/**
147+ * @brief OS optimization.
148+ * @details If enabled then time efficient rather than space efficient code
149+ * is used when two possible implementations exist.
150+ *
151+ * @note This is not related to the compiler optimization options.
152+ * @note The default is @p TRUE.
153+ */
154+#if !defined(CH_CFG_OPTIMIZE_SPEED)
155+#define CH_CFG_OPTIMIZE_SPEED TRUE
156+#endif
157+
158+/** @} */
159+
160+/*===========================================================================*/
161+/**
162+ * @name Subsystem options
163+ * @{
164+ */
165+/*===========================================================================*/
166+
167+/**
168+ * @brief Time Measurement APIs.
169+ * @details If enabled then the time measurement APIs are included in
170+ * the kernel.
171+ *
172+ * @note The default is @p TRUE.
173+ */
174+#if !defined(CH_CFG_USE_TM)
175+#define CH_CFG_USE_TM FALSE
176+#endif
177+
178+/**
179+ * @brief Threads registry APIs.
180+ * @details If enabled then the registry APIs are included in the kernel.
181+ *
182+ * @note The default is @p TRUE.
183+ */
184+#if !defined(CH_CFG_USE_REGISTRY)
185+#define CH_CFG_USE_REGISTRY TRUE
186+#endif
187+
188+/**
189+ * @brief Threads synchronization APIs.
190+ * @details If enabled then the @p chThdWait() function is included in
191+ * the kernel.
192+ *
193+ * @note The default is @p TRUE.
194+ */
195+#if !defined(CH_CFG_USE_WAITEXIT)
196+#define CH_CFG_USE_WAITEXIT TRUE
197+#endif
198+
199+/**
200+ * @brief Semaphores APIs.
201+ * @details If enabled then the Semaphores APIs are included in the kernel.
202+ *
203+ * @note The default is @p TRUE.
204+ */
205+#if !defined(CH_CFG_USE_SEMAPHORES)
206+#define CH_CFG_USE_SEMAPHORES TRUE
207+#endif
208+
209+/**
210+ * @brief Semaphores queuing mode.
211+ * @details If enabled then the threads are enqueued on semaphores by
212+ * priority rather than in FIFO order.
213+ *
214+ * @note The default is @p FALSE. Enable this if you have special
215+ * requirements.
216+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
217+ */
218+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
219+#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
220+#endif
221+
222+/**
223+ * @brief Mutexes APIs.
224+ * @details If enabled then the mutexes APIs are included in the kernel.
225+ *
226+ * @note The default is @p TRUE.
227+ */
228+#if !defined(CH_CFG_USE_MUTEXES)
229+#define CH_CFG_USE_MUTEXES TRUE
230+#endif
231+
232+/**
233+ * @brief Enables recursive behavior on mutexes.
234+ * @note Recursive mutexes are heavier and have an increased
235+ * memory footprint.
236+ *
237+ * @note The default is @p FALSE.
238+ * @note Requires @p CH_CFG_USE_MUTEXES.
239+ */
240+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
241+#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
242+#endif
243+
244+/**
245+ * @brief Conditional Variables APIs.
246+ * @details If enabled then the conditional variables APIs are included
247+ * in the kernel.
248+ *
249+ * @note The default is @p TRUE.
250+ * @note Requires @p CH_CFG_USE_MUTEXES.
251+ */
252+#if !defined(CH_CFG_USE_CONDVARS)
253+#define CH_CFG_USE_CONDVARS TRUE
254+#endif
255+
256+/**
257+ * @brief Conditional Variables APIs with timeout.
258+ * @details If enabled then the conditional variables APIs with timeout
259+ * specification are included in the kernel.
260+ *
261+ * @note The default is @p TRUE.
262+ * @note Requires @p CH_CFG_USE_CONDVARS.
263+ */
264+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
265+#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
266+#endif
267+
268+/**
269+ * @brief Events Flags APIs.
270+ * @details If enabled then the event flags APIs are included in the kernel.
271+ *
272+ * @note The default is @p TRUE.
273+ */
274+#if !defined(CH_CFG_USE_EVENTS)
275+#define CH_CFG_USE_EVENTS TRUE
276+#endif
277+
278+/**
279+ * @brief Events Flags APIs with timeout.
280+ * @details If enabled then the events APIs with timeout specification
281+ * are included in the kernel.
282+ *
283+ * @note The default is @p TRUE.
284+ * @note Requires @p CH_CFG_USE_EVENTS.
285+ */
286+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
287+#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
288+#endif
289+
290+/**
291+ * @brief Synchronous Messages APIs.
292+ * @details If enabled then the synchronous messages APIs are included
293+ * in the kernel.
294+ *
295+ * @note The default is @p TRUE.
296+ */
297+#if !defined(CH_CFG_USE_MESSAGES)
298+#define CH_CFG_USE_MESSAGES TRUE
299+#endif
300+
301+/**
302+ * @brief Synchronous Messages queuing mode.
303+ * @details If enabled then messages are served by priority rather than in
304+ * FIFO order.
305+ *
306+ * @note The default is @p FALSE. Enable this if you have special
307+ * requirements.
308+ * @note Requires @p CH_CFG_USE_MESSAGES.
309+ */
310+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
311+#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
312+#endif
313+
314+/**
315+ * @brief Mailboxes APIs.
316+ * @details If enabled then the asynchronous messages (mailboxes) APIs are
317+ * included in the kernel.
318+ *
319+ * @note The default is @p TRUE.
320+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
321+ */
322+#if !defined(CH_CFG_USE_MAILBOXES)
323+#define CH_CFG_USE_MAILBOXES TRUE
324+#endif
325+
326+/**
327+ * @brief Core Memory Manager APIs.
328+ * @details If enabled then the core memory manager APIs are included
329+ * in the kernel.
330+ *
331+ * @note The default is @p TRUE.
332+ */
333+#if !defined(CH_CFG_USE_MEMCORE)
334+#define CH_CFG_USE_MEMCORE TRUE
335+#endif
336+
337+/**
338+ * @brief Heap Allocator APIs.
339+ * @details If enabled then the memory heap allocator APIs are included
340+ * in the kernel.
341+ *
342+ * @note The default is @p TRUE.
343+ * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
344+ * @p CH_CFG_USE_SEMAPHORES.
345+ * @note Mutexes are recommended.
346+ */
347+#if !defined(CH_CFG_USE_HEAP)
348+#define CH_CFG_USE_HEAP TRUE
349+#endif
350+
351+/**
352+ * @brief Memory Pools Allocator APIs.
353+ * @details If enabled then the memory pools allocator APIs are included
354+ * in the kernel.
355+ *
356+ * @note The default is @p TRUE.
357+ */
358+#if !defined(CH_CFG_USE_MEMPOOLS)
359+#define CH_CFG_USE_MEMPOOLS TRUE
360+#endif
361+
362+/**
363+ * @brief Objects FIFOs APIs.
364+ * @details If enabled then the objects FIFOs APIs are included
365+ * in the kernel.
366+ *
367+ * @note The default is @p TRUE.
368+ */
369+#if !defined(CH_CFG_USE_OBJ_FIFOS)
370+#define CH_CFG_USE_OBJ_FIFOS TRUE
371+#endif
372+
373+/**
374+ * @brief Pipes APIs.
375+ * @details If enabled then the pipes APIs are included
376+ * in the kernel.
377+ *
378+ * @note The default is @p TRUE.
379+ */
380+#if !defined(CH_CFG_USE_PIPES)
381+#define CH_CFG_USE_PIPES TRUE
382+#endif
383+
384+/**
385+ * @brief Objects Caches APIs.
386+ * @details If enabled then the objects caches APIs are included
387+ * in the kernel.
388+ *
389+ * @note The default is @p TRUE.
390+ */
391+#if !defined(CH_CFG_USE_OBJ_CACHES)
392+#define CH_CFG_USE_OBJ_CACHES TRUE
393+#endif
394+
395+/**
396+ * @brief Dynamic Threads APIs.
397+ * @details If enabled then the dynamic threads creation APIs are included
398+ * in the kernel.
399+ *
400+ * @note The default is @p TRUE.
401+ * @note Requires @p CH_CFG_USE_WAITEXIT.
402+ * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
403+ */
404+#if !defined(CH_CFG_USE_DYNAMIC)
405+#define CH_CFG_USE_DYNAMIC TRUE
406+#endif
407+
408+/** @} */
409+
410+/*===========================================================================*/
411+/**
412+ * @name Objects factory options
413+ * @{
414+ */
415+/*===========================================================================*/
416+
417+/**
418+ * @brief Objects Factory APIs.
419+ * @details If enabled then the objects factory APIs are included in the
420+ * kernel.
421+ *
422+ * @note The default is @p FALSE.
423+ */
424+#if !defined(CH_CFG_USE_FACTORY)
425+#define CH_CFG_USE_FACTORY TRUE
426+#endif
427+
428+/**
429+ * @brief Maximum length for object names.
430+ * @details If the specified length is zero then the name is stored by
431+ * pointer but this could have unintended side effects.
432+ */
433+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
434+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
435+#endif
436+
437+/**
438+ * @brief Enables the registry of generic objects.
439+ */
440+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
441+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
442+#endif
443+
444+/**
445+ * @brief Enables factory for generic buffers.
446+ */
447+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
448+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
449+#endif
450+
451+/**
452+ * @brief Enables factory for semaphores.
453+ */
454+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
455+#define CH_CFG_FACTORY_SEMAPHORES TRUE
456+#endif
457+
458+/**
459+ * @brief Enables factory for mailboxes.
460+ */
461+#if !defined(CH_CFG_FACTORY_MAILBOXES)
462+#define CH_CFG_FACTORY_MAILBOXES TRUE
463+#endif
464+
465+/**
466+ * @brief Enables factory for objects FIFOs.
467+ */
468+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
469+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
470+#endif
471+
472+/**
473+ * @brief Enables factory for Pipes.
474+ */
475+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
476+#define CH_CFG_FACTORY_PIPES TRUE
477+#endif
478+
479+/** @} */
480+
481+/*===========================================================================*/
482+/**
483+ * @name Debug options
484+ * @{
485+ */
486+/*===========================================================================*/
487+
488+/**
489+ * @brief Debug option, kernel statistics.
490+ *
491+ * @note The default is @p FALSE.
492+ */
493+#if !defined(CH_DBG_STATISTICS)
494+#define CH_DBG_STATISTICS FALSE
495+#endif
496+
497+/**
498+ * @brief Debug option, system state check.
499+ * @details If enabled the correct call protocol for system APIs is checked
500+ * at runtime.
501+ *
502+ * @note The default is @p FALSE.
503+ */
504+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
505+#define CH_DBG_SYSTEM_STATE_CHECK FALSE
506+#endif
507+
508+/**
509+ * @brief Debug option, parameters checks.
510+ * @details If enabled then the checks on the API functions input
511+ * parameters are activated.
512+ *
513+ * @note The default is @p FALSE.
514+ */
515+#if !defined(CH_DBG_ENABLE_CHECKS)
516+#define CH_DBG_ENABLE_CHECKS FALSE
517+#endif
518+
519+/**
520+ * @brief Debug option, consistency checks.
521+ * @details If enabled then all the assertions in the kernel code are
522+ * activated. This includes consistency checks inside the kernel,
523+ * runtime anomalies and port-defined checks.
524+ *
525+ * @note The default is @p FALSE.
526+ */
527+#if !defined(CH_DBG_ENABLE_ASSERTS)
528+#define CH_DBG_ENABLE_ASSERTS FALSE
529+#endif
530+
531+/**
532+ * @brief Debug option, trace buffer.
533+ * @details If enabled then the trace buffer is activated.
534+ *
535+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
536+ */
537+#if !defined(CH_DBG_TRACE_MASK)
538+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
539+#endif
540+
541+/**
542+ * @brief Trace buffer entries.
543+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
544+ * different from @p CH_DBG_TRACE_MASK_DISABLED.
545+ */
546+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
547+#define CH_DBG_TRACE_BUFFER_SIZE 128
548+#endif
549+
550+/**
551+ * @brief Debug option, stack checks.
552+ * @details If enabled then a runtime stack check is performed.
553+ *
554+ * @note The default is @p FALSE.
555+ * @note The stack check is performed in a architecture/port dependent way.
556+ * It may not be implemented or some ports.
557+ * @note The default failure mode is to halt the system with the global
558+ * @p panic_msg variable set to @p NULL.
559+ */
560+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
561+#define CH_DBG_ENABLE_STACK_CHECK FALSE
562+#endif
563+
564+/**
565+ * @brief Debug option, stacks initialization.
566+ * @details If enabled then the threads working area is filled with a byte
567+ * value when a thread is created. This can be useful for the
568+ * runtime measurement of the used stack.
569+ *
570+ * @note The default is @p FALSE.
571+ */
572+#if !defined(CH_DBG_FILL_THREADS)
573+#define CH_DBG_FILL_THREADS FALSE
574+#endif
575+
576+/**
577+ * @brief Debug option, threads profiling.
578+ * @details If enabled then a field is added to the @p thread_t structure that
579+ * counts the system ticks occurred while executing the thread.
580+ *
581+ * @note The default is @p FALSE.
582+ * @note This debug option is not currently compatible with the
583+ * tickless mode.
584+ */
585+#if !defined(CH_DBG_THREADS_PROFILING)
586+#define CH_DBG_THREADS_PROFILING FALSE
587+#endif
588+
589+/** @} */
590+
591+/*===========================================================================*/
592+/**
593+ * @name Kernel hooks
594+ * @{
595+ */
596+/*===========================================================================*/
597+
598+/**
599+ * @brief System structure extension.
600+ * @details User fields added to the end of the @p ch_system_t structure.
601+ */
602+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
603+ /* Add threads custom fields here.*/
604+
605+/**
606+ * @brief System initialization hook.
607+ * @details User initialization code added to the @p chSysInit() function
608+ * just before interrupts are enabled globally.
609+ */
610+#define CH_CFG_SYSTEM_INIT_HOOK() { \
611+ /* Add threads initialization code here.*/ \
612+}
613+
614+/**
615+ * @brief Threads descriptor structure extension.
616+ * @details User fields added to the end of the @p thread_t structure.
617+ */
618+#define CH_CFG_THREAD_EXTRA_FIELDS \
619+ /* Add threads custom fields here.*/
620+
621+/**
622+ * @brief Threads initialization hook.
623+ * @details User initialization code added to the @p _thread_init() function.
624+ *
625+ * @note It is invoked from within @p _thread_init() and implicitly from all
626+ * the threads creation APIs.
627+ */
628+#define CH_CFG_THREAD_INIT_HOOK(tp) { \
629+ /* Add threads initialization code here.*/ \
630+}
631+
632+/**
633+ * @brief Threads finalization hook.
634+ * @details User finalization code added to the @p chThdExit() API.
635+ */
636+#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
637+ /* Add threads finalization code here.*/ \
638+}
639+
640+/**
641+ * @brief Context switch hook.
642+ * @details This hook is invoked just before switching between threads.
643+ */
644+#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
645+ /* Context switch code here.*/ \
646+}
647+
648+/**
649+ * @brief ISR enter hook.
650+ */
651+#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
652+ /* IRQ prologue code here.*/ \
653+}
654+
655+/**
656+ * @brief ISR exit hook.
657+ */
658+#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
659+ /* IRQ epilogue code here.*/ \
660+}
661+
662+/**
663+ * @brief Idle thread enter hook.
664+ * @note This hook is invoked within a critical zone, no OS functions
665+ * should be invoked from here.
666+ * @note This macro can be used to activate a power saving mode.
667+ */
668+#define CH_CFG_IDLE_ENTER_HOOK() { \
669+ /* Idle-enter code here.*/ \
670+}
671+
672+/**
673+ * @brief Idle thread leave hook.
674+ * @note This hook is invoked within a critical zone, no OS functions
675+ * should be invoked from here.
676+ * @note This macro can be used to deactivate a power saving mode.
677+ */
678+#define CH_CFG_IDLE_LEAVE_HOOK() { \
679+ /* Idle-leave code here.*/ \
680+}
681+
682+/**
683+ * @brief Idle Loop hook.
684+ * @details This hook is continuously invoked by the idle thread loop.
685+ */
686+#define CH_CFG_IDLE_LOOP_HOOK() { \
687+ /* Idle loop code here.*/ \
688+}
689+
690+/**
691+ * @brief System tick event hook.
692+ * @details This hook is invoked in the system tick handler immediately
693+ * after processing the virtual timers queue.
694+ */
695+#define CH_CFG_SYSTEM_TICK_HOOK() { \
696+ /* System tick event code here.*/ \
697+}
698+
699+/**
700+ * @brief System halt hook.
701+ * @details This hook is invoked in case to a system halting error before
702+ * the system is halted.
703+ */
704+#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
705+ /* System halt code here.*/ \
706+}
707+
708+/**
709+ * @brief Trace hook.
710+ * @details This hook is invoked each time a new record is written in the
711+ * trace buffer.
712+ */
713+#define CH_CFG_TRACE_HOOK(tep) { \
714+ /* Trace code here.*/ \
715+}
716+
717+/** @} */
718+
719+/*===========================================================================*/
720+/* Port-specific settings (override port settings defaulted in chcore.h). */
721+/*===========================================================================*/
722+
723+#endif /* CHCONF_H */
724+
725+/** @} */
--- trunk/demos/ADI/RT-ADUCM360-ADICUP360/cfg/halconf.h (nonexistent)
+++ trunk/demos/ADI/RT-ADUCM360-ADICUP360/cfg/halconf.h (revision 13100)
@@ -0,0 +1,541 @@
1+/*
2+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+*/
16+
17+/**
18+ * @file templates/halconf.h
19+ * @brief HAL configuration header.
20+ * @details HAL configuration file, this file allows to enable or disable the
21+ * various device drivers from your application. You may also use
22+ * this file in order to override the device drivers default settings.
23+ *
24+ * @addtogroup HAL_CONF
25+ * @{
26+ */
27+
28+#ifndef HALCONF_H
29+#define HALCONF_H
30+
31+#define _CHIBIOS_HAL_CONF_
32+#define _CHIBIOS_HAL_CONF_VER_7_1_
33+
34+#include "mcuconf.h"
35+
36+/**
37+ * @brief Enables the PAL subsystem.
38+ */
39+#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
40+#define HAL_USE_PAL TRUE
41+#endif
42+
43+/**
44+ * @brief Enables the ADC subsystem.
45+ */
46+#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
47+#define HAL_USE_ADC FALSE
48+#endif
49+
50+/**
51+ * @brief Enables the CAN subsystem.
52+ */
53+#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
54+#define HAL_USE_CAN FALSE
55+#endif
56+
57+/**
58+ * @brief Enables the cryptographic subsystem.
59+ */
60+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
61+#define HAL_USE_CRY FALSE
62+#endif
63+
64+/**
65+ * @brief Enables the DAC subsystem.
66+ */
67+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
68+#define HAL_USE_DAC FALSE
69+#endif
70+
71+/**
72+ * @brief Enables the EFlash subsystem.
73+ */
74+#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__)
75+#define HAL_USE_EFL FALSE
76+#endif
77+
78+/**
79+ * @brief Enables the GPT subsystem.
80+ */
81+#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
82+#define HAL_USE_GPT FALSE
83+#endif
84+
85+/**
86+ * @brief Enables the I2C subsystem.
87+ */
88+#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
89+#define HAL_USE_I2C FALSE
90+#endif
91+
92+/**
93+ * @brief Enables the I2S subsystem.
94+ */
95+#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
96+#define HAL_USE_I2S FALSE
97+#endif
98+
99+/**
100+ * @brief Enables the ICU subsystem.
101+ */
102+#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
103+#define HAL_USE_ICU FALSE
104+#endif
105+
106+/**
107+ * @brief Enables the MAC subsystem.
108+ */
109+#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
110+#define HAL_USE_MAC FALSE
111+#endif
112+
113+/**
114+ * @brief Enables the MMC_SPI subsystem.
115+ */
116+#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
117+#define HAL_USE_MMC_SPI FALSE
118+#endif
119+
120+/**
121+ * @brief Enables the PWM subsystem.
122+ */
123+#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
124+#define HAL_USE_PWM FALSE
125+#endif
126+
127+/**
128+ * @brief Enables the RTC subsystem.
129+ */
130+#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
131+#define HAL_USE_RTC FALSE
132+#endif
133+
134+/**
135+ * @brief Enables the SDC subsystem.
136+ */
137+#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
138+#define HAL_USE_SDC FALSE
139+#endif
140+
141+/**
142+ * @brief Enables the SERIAL subsystem.
143+ */
144+#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
145+#define HAL_USE_SERIAL FALSE
146+#endif
147+
148+/**
149+ * @brief Enables the SERIAL over USB subsystem.
150+ */
151+#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
152+#define HAL_USE_SERIAL_USB FALSE
153+#endif
154+
155+/**
156+ * @brief Enables the SIO subsystem.
157+ */
158+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
159+#define HAL_USE_SIO FALSE
160+#endif
161+
162+/**
163+ * @brief Enables the SPI subsystem.
164+ */
165+#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
166+#define HAL_USE_SPI FALSE
167+#endif
168+
169+/**
170+ * @brief Enables the TRNG subsystem.
171+ */
172+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
173+#define HAL_USE_TRNG FALSE
174+#endif
175+
176+/**
177+ * @brief Enables the UART subsystem.
178+ */
179+#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
180+#define HAL_USE_UART FALSE
181+#endif
182+
183+/**
184+ * @brief Enables the USB subsystem.
185+ */
186+#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
187+#define HAL_USE_USB FALSE
188+#endif
189+
190+/**
191+ * @brief Enables the WDG subsystem.
192+ */
193+#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
194+#define HAL_USE_WDG FALSE
195+#endif
196+
197+/**
198+ * @brief Enables the WSPI subsystem.
199+ */
200+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
201+#define HAL_USE_WSPI FALSE
202+#endif
203+
204+/*===========================================================================*/
205+/* PAL driver related settings. */
206+/*===========================================================================*/
207+
208+/**
209+ * @brief Enables synchronous APIs.
210+ * @note Disabling this option saves both code and data space.
211+ */
212+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
213+#define PAL_USE_CALLBACKS FALSE
214+#endif
215+
216+/**
217+ * @brief Enables synchronous APIs.
218+ * @note Disabling this option saves both code and data space.
219+ */
220+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
221+#define PAL_USE_WAIT FALSE
222+#endif
223+
224+/*===========================================================================*/
225+/* ADC driver related settings. */
226+/*===========================================================================*/
227+
228+/**
229+ * @brief Enables synchronous APIs.
230+ * @note Disabling this option saves both code and data space.
231+ */
232+#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
233+#define ADC_USE_WAIT TRUE
234+#endif
235+
236+/**
237+ * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
238+ * @note Disabling this option saves both code and data space.
239+ */
240+#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
241+#define ADC_USE_MUTUAL_EXCLUSION TRUE
242+#endif
243+
244+/*===========================================================================*/
245+/* CAN driver related settings. */
246+/*===========================================================================*/
247+
248+/**
249+ * @brief Sleep mode related APIs inclusion switch.
250+ */
251+#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
252+#define CAN_USE_SLEEP_MODE TRUE
253+#endif
254+
255+/**
256+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
257+ */
258+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
259+#define CAN_ENFORCE_USE_CALLBACKS FALSE
260+#endif
261+
262+/*===========================================================================*/
263+/* CRY driver related settings. */
264+/*===========================================================================*/
265+
266+/**
267+ * @brief Enables the SW fall-back of the cryptographic driver.
268+ * @details When enabled, this option, activates a fall-back software
269+ * implementation for algorithms not supported by the underlying
270+ * hardware.
271+ * @note Fall-back implementations may not be present for all algorithms.
272+ */
273+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
274+#define HAL_CRY_USE_FALLBACK FALSE
275+#endif
276+
277+/**
278+ * @brief Makes the driver forcibly use the fall-back implementations.
279+ */
280+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
281+#define HAL_CRY_ENFORCE_FALLBACK FALSE
282+#endif
283+
284+/*===========================================================================*/
285+/* DAC driver related settings. */
286+/*===========================================================================*/
287+
288+/**
289+ * @brief Enables synchronous APIs.
290+ * @note Disabling this option saves both code and data space.
291+ */
292+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
293+#define DAC_USE_WAIT TRUE
294+#endif
295+
296+/**
297+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
298+ * @note Disabling this option saves both code and data space.
299+ */
300+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
301+#define DAC_USE_MUTUAL_EXCLUSION TRUE
302+#endif
303+
304+/*===========================================================================*/
305+/* I2C driver related settings. */
306+/*===========================================================================*/
307+
308+/**
309+ * @brief Enables the mutual exclusion APIs on the I2C bus.
310+ */
311+#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
312+#define I2C_USE_MUTUAL_EXCLUSION TRUE
313+#endif
314+
315+/*===========================================================================*/
316+/* MAC driver related settings. */
317+/*===========================================================================*/
318+
319+/**
320+ * @brief Enables the zero-copy API.
321+ */
322+#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
323+#define MAC_USE_ZERO_COPY FALSE
324+#endif
325+
326+/**
327+ * @brief Enables an event sources for incoming packets.
328+ */
329+#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
330+#define MAC_USE_EVENTS TRUE
331+#endif
332+
333+/*===========================================================================*/
334+/* MMC_SPI driver related settings. */
335+/*===========================================================================*/
336+
337+/**
338+ * @brief Delays insertions.
339+ * @details If enabled this options inserts delays into the MMC waiting
340+ * routines releasing some extra CPU time for the threads with
341+ * lower priority, this may slow down the driver a bit however.
342+ * This option is recommended also if the SPI driver does not
343+ * use a DMA channel and heavily loads the CPU.
344+ */
345+#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
346+#define MMC_NICE_WAITING TRUE
347+#endif
348+
349+/*===========================================================================*/
350+/* SDC driver related settings. */
351+/*===========================================================================*/
352+
353+/**
354+ * @brief Number of initialization attempts before rejecting the card.
355+ * @note Attempts are performed at 10mS intervals.
356+ */
357+#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
358+#define SDC_INIT_RETRY 100
359+#endif
360+
361+/**
362+ * @brief Include support for MMC cards.
363+ * @note MMC support is not yet implemented so this option must be kept
364+ * at @p FALSE.
365+ */
366+#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
367+#define SDC_MMC_SUPPORT FALSE
368+#endif
369+
370+/**
371+ * @brief Delays insertions.
372+ * @details If enabled this options inserts delays into the MMC waiting
373+ * routines releasing some extra CPU time for the threads with
374+ * lower priority, this may slow down the driver a bit however.
375+ */
376+#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
377+#define SDC_NICE_WAITING TRUE
378+#endif
379+
380+/**
381+ * @brief OCR initialization constant for V20 cards.
382+ */
383+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
384+#define SDC_INIT_OCR_V20 0x50FF8000U
385+#endif
386+
387+/**
388+ * @brief OCR initialization constant for non-V20 cards.
389+ */
390+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
391+#define SDC_INIT_OCR 0x80100000U
392+#endif
393+
394+/*===========================================================================*/
395+/* SERIAL driver related settings. */
396+/*===========================================================================*/
397+
398+/**
399+ * @brief Default bit rate.
400+ * @details Configuration parameter, this is the baud rate selected for the
401+ * default configuration.
402+ */
403+#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
404+#define SERIAL_DEFAULT_BITRATE 38400
405+#endif
406+
407+/**
408+ * @brief Serial buffers size.
409+ * @details Configuration parameter, you can change the depth of the queue
410+ * buffers depending on the requirements of your application.
411+ * @note The default is 16 bytes for both the transmission and receive
412+ * buffers.
413+ */
414+#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
415+#define SERIAL_BUFFERS_SIZE 16
416+#endif
417+
418+/*===========================================================================*/
419+/* SERIAL_USB driver related setting. */
420+/*===========================================================================*/
421+
422+/**
423+ * @brief Serial over USB buffers size.
424+ * @details Configuration parameter, the buffer size must be a multiple of
425+ * the USB data endpoint maximum packet size.
426+ * @note The default is 256 bytes for both the transmission and receive
427+ * buffers.
428+ */
429+#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
430+#define SERIAL_USB_BUFFERS_SIZE 256
431+#endif
432+
433+/**
434+ * @brief Serial over USB number of buffers.
435+ * @note The default is 2 buffers.
436+ */
437+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
438+#define SERIAL_USB_BUFFERS_NUMBER 2
439+#endif
440+
441+/*===========================================================================*/
442+/* SPI driver related settings. */
443+/*===========================================================================*/
444+
445+/**
446+ * @brief Enables synchronous APIs.
447+ * @note Disabling this option saves both code and data space.
448+ */
449+#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
450+#define SPI_USE_WAIT TRUE
451+#endif
452+
453+/**
454+ * @brief Enables circular transfers APIs.
455+ * @note Disabling this option saves both code and data space.
456+ */
457+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
458+#define SPI_USE_CIRCULAR FALSE
459+#endif
460+
461+/**
462+ * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
463+ * @note Disabling this option saves both code and data space.
464+ */
465+#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
466+#define SPI_USE_MUTUAL_EXCLUSION TRUE
467+#endif
468+
469+/**
470+ * @brief Handling method for SPI CS line.
471+ * @note Disabling this option saves both code and data space.
472+ */
473+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
474+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
475+#endif
476+
477+/*===========================================================================*/
478+/* UART driver related settings. */
479+/*===========================================================================*/
480+
481+/**
482+ * @brief Enables synchronous APIs.
483+ * @note Disabling this option saves both code and data space.
484+ */
485+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
486+#define UART_USE_WAIT FALSE
487+#endif
488+
489+/**
490+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
491+ * @note Disabling this option saves both code and data space.
492+ */
493+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
494+#define UART_USE_MUTUAL_EXCLUSION FALSE
495+#endif
496+
497+/*===========================================================================*/
498+/* USB driver related settings. */
499+/*===========================================================================*/
500+
501+/**
502+ * @brief Enables synchronous APIs.
503+ * @note Disabling this option saves both code and data space.
504+ */
505+#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
506+#define USB_USE_WAIT FALSE
507+#endif
508+
509+/*===========================================================================*/
510+/* WSPI driver related settings. */
511+/*===========================================================================*/
512+
513+/**
514+ * @brief Enables synchronous APIs.
515+ * @note Disabling this option saves both code and data space.
516+ */
517+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
518+#define WSPI_USE_WAIT TRUE
519+#endif
520+
521+/**
522+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
523+ * @note Disabling this option saves both code and data space.
524+ */
525+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
526+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
527+#endif
528+
529+/*===========================================================================*/
530+/* HAL common settings. */
531+/*===========================================================================*/
532+
533+/**
534+ * @brief Disable the watch dog hardware on startup.
535+ */
536+#if !defined(HAL_CFG_DISABLE_WDG) || defined(__DOXYGEN__)
537+#define HAL_CFG_DISABLE_WDG TRUE
538+#endif
539+
540+#endif /* HALCONF_H */
541+/** @} */
--- trunk/demos/ADI/RT-ADUCM360-ADICUP360/cfg/mcuconf.h (nonexistent)
+++ trunk/demos/ADI/RT-ADUCM360-ADICUP360/cfg/mcuconf.h (revision 13100)
@@ -0,0 +1,62 @@
1+/*
2+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+*/
16+
17+#ifndef MCUCONF_H
18+#define MCUCONF_H
19+
20+/*
21+ * ADUCM36x drivers configuration.
22+ * The following settings override the default settings present in
23+ * the various device driver implementation headers.
24+ * Note that the settings for each driver only have effect if the whole
25+ * driver is enabled in halconf.h.
26+ *
27+ * IRQ priorities:
28+ * 3...0 Lowest...Highest.
29+ *
30+ * DMA priorities:
31+ * 0...3 Lowest...Highest.
32+ */
33+
34+#define ADUCM36x_MCUCONF
35+
36+/*
37+ * HAL driver system settings.
38+ */
39+#define ADUCM_NO_INIT FALSE
40+#define ADUCM_XOSC_ENABLED FALSE
41+#define ADUCM_CLKMUX ADUCM_CLKMUX_HFOSC
42+#define ADUCM_HFOSC_PREDIV ADUCM_HFOSC_DIV1
43+#define ADUCM_XOSC_PREDIV ADUCM_XOSC_DIV1
44+#define ADUCM_CD_DIV ADUCM_CD_DIV1
45+#define ADUCM_SPI0CD_DIV ADUCM_SPI0CD_DIV1
46+#define ADUCM_SPI1CD_DIV ADUCM_SPI1CD_DIV1
47+#define ADUCM_I2CCD_DIV ADUCM_I2CCD_DIV1
48+#define ADUCM_UARTCD_DIV ADUCM_UARTCD_DIV1
49+#define ADUCM_PWMCD_DIV ADUCM_PWMCD_DIV1
50+
51+/*
52+ * IRQ system settings.
53+ */
54+#define ADUCM_IRQ_UART1_PRIORITY 3
55+
56+/*
57+ * SERIAL driver system settings.
58+ */
59+#define STM32_SERIAL_USE_UART1 TRUE
60+
61+/** @} */
62+#endif /* MCUCONF_H */
--- trunk/demos/ADI/RT-ADUCM360-ADICUP360/Makefile (nonexistent)
+++ trunk/demos/ADI/RT-ADUCM360-ADICUP360/Makefile (revision 13100)
@@ -0,0 +1,189 @@
1+##############################################################################
2+# Build global options
3+# NOTE: Can be overridden externally.
4+#
5+
6+# Compiler options here.
7+ifeq ($(USE_OPT),)
8+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
9+endif
10+
11+# C specific options here (added to USE_OPT).
12+ifeq ($(USE_COPT),)
13+ USE_COPT =
14+endif
15+
16+# C++ specific options here (added to USE_OPT).
17+ifeq ($(USE_CPPOPT),)
18+ USE_CPPOPT = -fno-rtti
19+endif
20+
21+# Enable this if you want the linker to remove unused code and data.
22+ifeq ($(USE_LINK_GC),)
23+ USE_LINK_GC = yes
24+endif
25+
26+# Linker extra options here.
27+ifeq ($(USE_LDOPT),)
28+ USE_LDOPT =
29+endif
30+
31+# Enable this if you want link time optimizations (LTO).
32+ifeq ($(USE_LTO),)
33+ USE_LTO = yes
34+endif
35+
36+# Enable this if you want to see the full log while compiling.
37+ifeq ($(USE_VERBOSE_COMPILE),)
38+ USE_VERBOSE_COMPILE = no
39+endif
40+
41+# If enabled, this option makes the build process faster by not compiling
42+# modules not used in the current configuration.
43+ifeq ($(USE_SMART_BUILD),)
44+ USE_SMART_BUILD = yes
45+endif
46+
47+#
48+# Build global options
49+##############################################################################
50+
51+##############################################################################
52+# Architecture or project specific options
53+#
54+
55+# Stack size to be allocated to the Cortex-M process stack. This stack is
56+# the stack used by the main() thread.
57+ifeq ($(USE_PROCESS_STACKSIZE),)
58+ USE_PROCESS_STACKSIZE = 0x400
59+endif
60+
61+# Stack size to the allocated to the Cortex-M main/exceptions stack. This
62+# stack is used for processing interrupts and exceptions.
63+ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
64+ USE_EXCEPTIONS_STACKSIZE = 0x400
65+endif
66+
67+# Enables the use of FPU (no, softfp, hard).
68+ifeq ($(USE_FPU),)
69+ USE_FPU = no
70+endif
71+
72+# FPU-related options.
73+ifeq ($(USE_FPU_OPT),)
74+ USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
75+endif
76+
77+#
78+# Architecture or project specific options
79+##############################################################################
80+
81+##############################################################################
82+# Project, target, sources and paths
83+#
84+
85+# Define project name here
86+PROJECT = ch
87+
88+# Target settings.
89+MCU = cortex-m3
90+
91+# Imported source files and paths.
92+CHIBIOS := ../../..
93+CONFDIR := ./cfg
94+BUILDDIR := ./build
95+DEPDIR := ./.dep
96+
97+# Licensing files.
98+include $(CHIBIOS)/os/license/license.mk
99+# Startup files.
100+include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_aducm36x.mk
101+# HAL-OSAL files (optional).
102+include $(CHIBIOS)/os/hal/hal.mk
103+include $(CHIBIOS)/os/hal/ports/ADUCM/ADUCM36x/platform.mk
104+include $(CHIBIOS)/os/hal/boards/ADICUP360/board.mk
105+include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
106+# RTOS files (optional).
107+include $(CHIBIOS)/os/rt/rt.mk
108+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
109+# Auto-build files in ./source recursively.
110+include $(CHIBIOS)/tools/mk/autobuild.mk
111+# Other files (optional).
112+#include $(CHIBIOS)/test/lib/test.mk
113+#include $(CHIBIOS)/test/rt/rt_test.mk
114+#include $(CHIBIOS)/test/oslib/oslib_test.mk
115+
116+# Define linker script file here
117+LDSCRIPT= $(STARTUPLD)/ADUCM360.ld
118+
119+# C sources that can be compiled in ARM or THUMB mode depending on the global
120+# setting.
121+CSRC = $(ALLCSRC) \
122+ $(TESTSRC) \
123+ main.c
124+
125+# C++ sources that can be compiled in ARM or THUMB mode depending on the global
126+# setting.
127+CPPSRC = $(ALLCPPSRC)
128+
129+# List ASM source files here.
130+ASMSRC = $(ALLASMSRC)
131+
132+# List ASM with preprocessor source files here.
133+ASMXSRC = $(ALLXASMSRC)
134+
135+# Inclusion directories.
136+INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
137+
138+# Define C warning options here.
139+CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
140+
141+# Define C++ warning options here.
142+CPPWARN = -Wall -Wextra -Wundef
143+
144+#
145+# Project, target, sources and paths
146+##############################################################################
147+
148+##############################################################################
149+# Start of user section
150+#
151+
152+# List all user C define here, like -D_DEBUG=1
153+UDEFS =
154+
155+# Define ASM defines here
156+UADEFS =
157+
158+# List all user directories here
159+UINCDIR =
160+
161+# List the user directory to look for the libraries here
162+ULIBDIR =
163+
164+# List all user libraries here
165+ULIBS =
166+
167+#
168+# End of user section
169+##############################################################################
170+
171+##############################################################################
172+# Common rules
173+#
174+
175+RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
176+include $(RULESPATH)/arm-none-eabi.mk
177+include $(RULESPATH)/rules.mk
178+
179+#
180+# Common rules
181+##############################################################################
182+
183+##############################################################################
184+# Custom rules
185+#
186+
187+#
188+# Custom rules
189+##############################################################################
--- trunk/demos/ADI/RT-ADUCM360-ADICUP360/main.c (nonexistent)
+++ trunk/demos/ADI/RT-ADUCM360-ADICUP360/main.c (revision 13100)
@@ -0,0 +1,68 @@
1+/*
2+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+*/
16+
17+#include "ch.h"
18+#include "hal.h"
19+
20+/*
21+ * This is a periodic thread that does absolutely nothing except flashing
22+ * a LED.
23+ */
24+static THD_WORKING_AREA(waThread1, 128);
25+static THD_FUNCTION(Thread1, arg) {
26+
27+ (void)arg;
28+ chRegSetThreadName("blinker");
29+
30+ while (true) {
31+ palSetLine(LINE_LED_BLUE);
32+ chThdSleepMilliseconds(50);
33+ palSetLine(LINE_LED_GREEN);
34+ chThdSleepMilliseconds(150);
35+ palClearLine(LINE_LED_BLUE);
36+ chThdSleepMilliseconds(50);
37+ palClearLine(LINE_LED_GREEN);
38+ chThdSleepMilliseconds(150);
39+ }
40+}
41+
42+/*
43+ * Application entry point.
44+ */
45+int main(void) {
46+
47+ /*
48+ * System initializations.
49+ * - HAL initialization, this also initializes the configured device drivers
50+ * and performs the board-specific initializations.
51+ * - Kernel initialization, the main() function becomes a thread and the
52+ * RTOS is active.
53+ */
54+ halInit();
55+ chSysInit();
56+
57+ /*
58+ * Creates the example thread.
59+ */
60+ (void) chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO + 1, Thread1, NULL);
61+
62+ /*
63+ * Normal main() thread activity, in this demo it does nothing.
64+ */
65+ while (true) {
66+ chThdSleepMilliseconds(500);
67+ }
68+}
--- trunk/demos/ADI/RT-ADUCM360-ADICUP360/readme.txt (nonexistent)
+++ trunk/demos/ADI/RT-ADUCM360-ADICUP360/readme.txt (revision 13100)
@@ -0,0 +1,27 @@
1+*****************************************************************************
2+** ChibiOS/RT port for ARM-Cortex-M4 ADICUP360. **
3+*****************************************************************************
4+
5+** TARGET **
6+
7+The demo runs on an ADICUP360 board.
8+
9+** The Demo **
10+
11+The demo flashes the two on-board LEDs using a thread.
12+
13+** Build Procedure **
14+
15+The demo has been tested by using the free Codesourcery GCC-based toolchain
16+and YAGARTO.
17+Just modify the TRGT line in the makefile in order to use different GCC ports.
18+
19+** Notes **
20+
21+Some files used by the demo are not part of ChibiOS/RT but are copyright of
22+Analog Devices and are licensed under a different license.
23+Also note that not all the files present within the Analog Devices
24+Cross Core Embedded Studio are distributed with ChibiOS/RT,
25+you can find the whole library on the ADI web site:
26+
27+ http://www.analog.com
\ No newline at end of file
Show on old repository browser