1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
|
2015-03-17 Niibe Yutaka <gniibe@fsij.org>
* VERSION: 0.04a.
2014-12-10 Niibe Yutaka <gniibe@fsij.org>
* Version 0.04.
* doc/chopstx.texi (VERSION): 0.04.
* board/*.h: Updated.
* example-cdc/sys.c: Copied from example-led.
* example-led/sys.c (clock_init, GPIO_USB): Follow the change of
entry.c.
(gpio_init): Use RCC_ENR_IOP_EN and RCC_RSTR_IOP_RST.
(reset): Use ldr instead of mov.w and movt.
* entry.c (GPIO_USB) [GPIO_USB_BASE]: Conditionally defined.
* chopstx.c (preempt): Add ! for stm.
(chx_exit): Make sure RETVAL is saved onto r8.
(chopstx_usec_wait_var): Make sure USEC_P is saved onto r8.
2013-11-27 Niibe Yutaka <gniibe@fsij.org>
* board/board-stbee-mini.h: New.
* entry.c (AFIO_MAPR_SWJ_CFG_DISABLE): New.
2013-11-26 Niibe Yutaka <gniibe@fsij.org>
* board/board-stbee.h: New.
* rules.mk (OUTFILES) [ENABLE_OUTPUT_HEX]: Add hex generation.
2013-11-21 Niibe Yutaka <gniibe@fsij.org>
* example-cdc/usb_stm32f103.c, example-cdc/usb_lld.h: Update from
Gnuk.
2013-11-08 Niibe Yutaka <gniibe@fsij.org>
* Version 0.03.
* doc/chopstx.texi (VERSION): 0.03.
* chopstx.c (preempt): Disable interrupt.
2013-11-08 Niibe Yutaka <gniibe@fsij.org>
* Version 0.02.
* doc/chopstx.texi (VERSION): 0.02.
* example-cdc/usb_stm32f103.c: Updated from NeuG.
* chopstx.c (CPU_EXCEPTION_PRIORITY_SYSTICK): Equals to
CPU_EXCEPTION_PRIORITY_INTERRUPT.
2013-11-03 Niibe Yutaka <gniibe@fsij.org>
* Version 0.01.
* doc/chopstx.texi (VERSION): 0.01.
* chopstx.c (chx_clr_intr): New.
(chopstx_intr_wait): Call chopstx.c.
(chx_enable_intr): Let chx_clr_intr clear pending-bit.
2013-11-02 Niibe Yutaka <gniibe@fsij.org>
* example-cdc/usb_lld.h, example-cdc/usb_stm32f103.c: Update from
Gnuk.
* example-cdc/usb-cdc.c (usb_cb_get_descriptor): Follow the
change.
* example-cdc/sys.c, example-led/sys.c: Update from Gnuk.
* chopstx.c (CPU_EXCEPTION_PRIORITY_INTERRUPT)
(CPU_EXCEPTION_PRIORITY_PENDSV): Change the value, so that
interrupt priority matches USB interrupt priority of old SYS 1.0
implementation.
(chx_enable_intr, chx_disable_intr): Clear pending bit at
chx_enable_intr.
(chopstx_intr_wait): Call chx_enable_intr only when it's going to
sleep.
* entry.c (RCC_APB2RSTR_AFIORST, define RCC_APB2ENR_AFIOEN): New.
(AFIO, GPIO_OTHER): New.
(gpio_init): Handle AFIO and GPIO_OTHER.
* board/board-fst-01.h, board/board-stm8s-discovery.h: Add pin-cir
usage.
2013-08-21 Niibe Yutaka <gniibe@fsij.org>
* Version 0.00.
* doc: Documentation.
* example-led/sys.c: Update from NeuG.
* example-cdc/sys.c: Likewise.
* example-cdc/usb_stm32f103.c: Likewise.
* example-cdc/usb_lld.h: Likewise.
* example-cdc/usb-cdc.c: Likewise.
2013-08-19 Niibe Yutaka <gniibe@fsij.org>
* rules.mk (%.elf): Support OBJS_ADD.
2013-08-16 Niibe Yutaka <gniibe@fsij.org>
* chopstx.c (chopstx_usec_wait_var): Check usec_p at the beginning
of the loop, bug fix of sched-unlocking from sched-unlocked state.
2013-06-19 Niibe Yutaka <gniibe@fsij.org>
* chopstx.h (CHOPSTX_THREAD_SIZE): New.
* rules.mk (CSRC): Add eventflag.c.
* eventflag.h, eventflag.c: New.
* chopstx.c (chopstx_main): New.
(chx_init): Initialize chopstx_main.
* example-cdc/sample.c (usb_intr): No disable/enable interrupt,
but call the handler.
2013-06-13 Niibe Yutaka <gniibe@fsij.org>
* chopstx.c (chopstx_usec_wait_var): Rename (was:
chopstx_usec_wait_internal), as it's user visible.
2013-06-12 Niibe Yutaka <gniibe@fsij.org>
* chopstx.c (chx_init): Inhibit preemption for main thread.
2013-06-11 Niibe Yutaka <gniibe@fsij.org>
* chopstx.c (chx_timer_expired): Use uint16_t here.
(chx_cpu_sched_lock, chx_cpu_sched_unlock): Change only when
its priority is lower than CHOPSTX_PRIO_INHIBIT_PREEMPTION.
2013-06-06 Niibe Yutaka <gniibe@fsij.org>
* entry.c: Include sys.h for clock_init and gpio_init.
* chopstx.c (PREEMPTION_USEC): Fix the value.
(sched): Check tp != NULL to see flag_sched_rr.
2013-06-05 Niibe Yutaka <gniibe@fsij.org>
* chopstx.c (sched, preempt, svc, chx_timer_expired, chx_exit)
(chopstx_usec_wait, chopstx_mutex_lock, chopstx_cond_wait)
(chopstx_intr_wait, chopstx_join): Implement SCHED_RR.
(chopstx_create): Change API.
(chopstx_wakeup_usec_wait): New.
(chopstx_usec_wait): Accept wakeup to break.
(chopstx_usec_wait_internal): New.
(CHX_FLAGS_MAIN): New.
(chx_systick_init): Add chx_timer_insert for main.
(chx_set_timer): Don't set thread state.
(chopstx_usec_wait_internal): Set thread state to THREAD_WAIT_TIME.
2013-06-04 Niibe Yutaka <gniibe@fsij.org>
* chopstx.c (AIRCR): New.
(chx_init): Setting for PRIGROUP 2-bit:2-bit.
(sched): Unlock cpu_sched_lock on return to thread.
(preempt, chx_timer_expired, chx_handle_intr): Those can be
considered holding cpu_sched_lock (by its equal exception
priorities), thus no acquiring lock required.
(CHX_PRIO_MAIN): New macro.
(chopstx_create): Change API.
(chopstx_attr_init, chopstx_attr_setschedparam)
(chopstx_attr_setstack): Remove.
(chopstx_intr_wait, chopstx_join): Call chx_cpu_sched_unlock.
(chopstx_cleanup_push, chopstx_cleanup_pop): New.
(chopstx_exit): Call cleanup routines.
2013-06-03 Niibe Yutaka <gniibe@fsij.org>
* chopstx.c (chx_spin_lock, chx_spin_unlock): Rename.
(chx_cpu_sched_lock, chx_cpu_sched_unlock): New.
* chopstx.c (chx_exit): Use R8.
2013-05-29 Niibe Yutaka <gniibe@fsij.org>
* entry.c (entry): Initialize data section.
* chopstx.c (svc): Implement race avoidance between
chx_handle_intr.
(chx_handle_intr): Increment ->ready. Put to ready queue
only when it's not running.
(chx_sched): Add an argument for race avoidance.
(chopstx_intr_wait): Fix race condition.
(chopstx_cond_broadcast): Fix initial value.
(chopstx_join): Check RET.
(chx_init): Initialize q_exit and q_join.
(chopstx_release_irq, chopstx_release_irq_thread): Enable IRQ on
release (as system reset default).
* board/board-olimex-stm32-h103.h (NEUG_ADC_SETTING2_*): Add.
* chopstx.c (chx_mutex_unlock, chopstx_exit): New.
(chopstx_mutex_unlock): Use chx_mutex_unlock.
(chopstx_cond_wait): Fix race condition.
2013-05-28 Niibe Yutaka <gniibe@fsij.org>
* chopstx.c (chopstx_intr_wait): Rename from chopstx_wait_intr.
(chopstx_usec_wait): Rename from chosptx_usleep.
(chopstx_cancel, chopstx_testcancel): New.
(idle): Moved from entry.c and use WFI if USE_WFI_FOR_IDLE.
2013-05-27 Niibe Yutaka <gniibe@fsij.org>
* chopstx.c (chx_fatal, chopstx_exit, chopstx_join): New.
(struct chx_thread): Independent member of state. Use bit fields.
(chx_timer_expired, chx_handle_intr): Check priority before
calling chx_request_preemption.
(chx_disable_intr): Clear pending interrupt too.
(chopstx_claim_irq): Rename from chopstx_intr_register.
(chopstx_release_irq): New.
(chopstx_join): Promote priority of thread to be joined.
2013-05-24 Niibe Yutaka <gniibe@fsij.org>
* chopstx.c (chx_request_preemption): Rename from chx_preempt.
* entry.c: "sys.h" is only for to new sys 2.0, keeping
compatibility to 1.0, it is if-def out now.
2013-05-22 Niibe Yutaka <gniibe@fsij.org>
* chopstx.c (chx_enable_intr, chx_disable_intr): Implement.
(chx_set_intr_prio): New.
(chx_handle_intr): Use list to register interrupt threads.
(chx_init): Set PendSV priority (as minimum: bigger).
* entry.c (vector_table): set chx_handle_intr for all interrupts.
2013-05-21 Niibe Yutaka <gniibe@fsij.org>
* Initial commit.
|