projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for TLS if needed
[fw/altos]
/
src
/
stm
/
ao_arch_funcs.h
diff --git
a/src/stm/ao_arch_funcs.h
b/src/stm/ao_arch_funcs.h
index 7fe6a732478b442f1b9ce445f7cb253d01cadd88..5c8d990b22a5462395735aa9134cbcbfac13c3f2 100644
(file)
--- a/
src/stm/ao_arch_funcs.h
+++ b/
src/stm/ao_arch_funcs.h
@@
-393,6
+393,9
@@
struct ao_stm_usart {
#endif
};
#endif
};
+void
+ao_debug_out(char c);
+
#if HAS_SERIAL_1
extern struct ao_stm_usart ao_stm_usart1;
#endif
#if HAS_SERIAL_1
extern struct ao_stm_usart ao_stm_usart1;
#endif
@@
-449,7
+452,7
@@
ao_arch_irqrestore(uint32_t basepri) {
}
static inline void
}
static inline void
-ao_arch_memory_barrier() {
+ao_arch_memory_barrier(
void
) {
asm volatile("" ::: "memory");
}
asm volatile("" ::: "memory");
}
@@
-470,9
+473,8
@@
ao_arch_irq_check(void) {
#if HAS_TASK
static inline void
#if HAS_TASK
static inline void
-ao_arch_init_stack(struct ao_task *task, void *start)
+ao_arch_init_stack(struct ao_task *task,
uint32_t *sp,
void *start)
{
{
- uint32_t *sp = (uint32_t *) ((void*) task->stack + AO_STACK_SIZE);
uint32_t a = (uint32_t) start;
int i;
uint32_t a = (uint32_t) start;
int i;
@@
-490,7
+492,7
@@
ao_arch_init_stack(struct ao_task *task, void *start)
/* BASEPRI with interrupts enabled */
ARM_PUSH32(sp, 0);
/* BASEPRI with interrupts enabled */
ARM_PUSH32(sp, 0);
- task->sp = sp;
+ task->sp
32
= sp;
}
static inline void ao_arch_save_regs(void) {
}
static inline void ao_arch_save_regs(void) {
@@
-514,12
+516,12
@@
static inline void ao_arch_save_regs(void) {
static inline void ao_arch_save_stack(void) {
uint32_t *sp;
asm("mov %0,sp" : "=&r" (sp) );
static inline void ao_arch_save_stack(void) {
uint32_t *sp;
asm("mov %0,sp" : "=&r" (sp) );
- ao_cur_task->sp = (sp);
+ ao_cur_task->sp
32
= (sp);
}
static inline void ao_arch_restore_stack(void) {
/* Switch stacks */
}
static inline void ao_arch_restore_stack(void) {
/* Switch stacks */
- asm("mov sp, %0" : : "r" (ao_cur_task->sp) );
+ asm("mov sp, %0" : : "r" (ao_cur_task->sp
32
) );
#ifdef AO_NONMASK_INTERRUPTS
/* Restore BASEPRI */
#ifdef AO_NONMASK_INTERRUPTS
/* Restore BASEPRI */
@@
-607,4
+609,6
@@
ao_arch_wait_interrupt(void) {
ao_arch_irqrestore(__mask); \
} while (0)
ao_arch_irqrestore(__mask); \
} while (0)
+void start(void);
+
#endif /* _AO_ARCH_FUNCS_H_ */
#endif /* _AO_ARCH_FUNCS_H_ */