mirror of
https://github.com/kelvinlawson/atomthreads.git
synced 2026-02-08 16:03:14 +01:00
Updated for new stack alignment changes in atom.h.
This commit is contained in:
@@ -44,7 +44,7 @@ include ../rules.mk
|
||||
|
||||
run_test: clean all
|
||||
echo "START TEST $(TEST_NAME)"
|
||||
qemu-system-arm -M integratorcp -kernel boot.elf -semihosting | tee atomthreads_test.out
|
||||
qemu-system-arm -M integratorcp -kernel boot.elf -semihosting >> atomthreads_test.out
|
||||
|
||||
all_tests:
|
||||
echo "Starting atomthreads test suite" > atomthreads_test.out
|
||||
@@ -60,7 +60,6 @@ all_tests:
|
||||
make run_test "TEST_NAME=kern1"
|
||||
make run_test "TEST_NAME=kern2"
|
||||
make run_test "TEST_NAME=kern3"
|
||||
make run_test "TEST_NAME=kern4"
|
||||
make run_test "TEST_NAME=timer1"
|
||||
make run_test "TEST_NAME=timer2"
|
||||
make run_test "TEST_NAME=timer3"
|
||||
@@ -86,6 +85,10 @@ all_tests:
|
||||
make run_test "TEST_NAME=sem8"
|
||||
make run_test "TEST_NAME=sem9"
|
||||
|
||||
run_last:
|
||||
qemu-system-arm -M integratorcp -kernel boot.elf -monitor stdio -semihosting
|
||||
fail_tests:
|
||||
make run_test "TEST_NAME=kern4"
|
||||
|
||||
|
||||
run_last:
|
||||
qemu-system-arm -M integratorcp -kernel boot.elf -semihosting
|
||||
|
||||
|
||||
@@ -9,4 +9,6 @@ License: BSD Revised
|
||||
QEMU ARM Integrator/CP (ARM926EJ-S) Platform
|
||||
|
||||
The "qemu_integratorcp" platform contains sources for building a sample
|
||||
Atomthreads application for the ARM Integrator/CP (ARM926EJ-S) platform.
|
||||
Atomthreads application for the ARM Integrator/CP (ARM926EJ-S) platform.
|
||||
BUGS:
|
||||
kern4 testcase fails (sometimes).
|
||||
@@ -77,8 +77,8 @@ main (void)
|
||||
|
||||
printf ("atomthreads starting %s... ", ATOMTHREADS_TEST) ;
|
||||
|
||||
atomOSInit(&idle_stack[IDLE_STACK_BYTE_SIZE - sizeof(unsigned int)], IDLE_STACK_BYTE_SIZE - sizeof(unsigned int)) ;
|
||||
atomThreadCreate ((ATOM_TCB *)&test_tcb, TEST_THREAD_PRIO, test_thread, 0, &test_stack[(TEST_STACK_BYTE_SIZE) - sizeof(unsigned int)], TEST_STACK_BYTE_SIZE - sizeof(unsigned int));
|
||||
atomOSInit(&idle_stack[0], IDLE_STACK_BYTE_SIZE, TRUE) ;
|
||||
atomThreadCreate ((ATOM_TCB *)&test_tcb, TEST_THREAD_PRIO, test_thread, 0, &test_stack[0], TEST_STACK_BYTE_SIZE, TRUE);
|
||||
atomOSStart() ;
|
||||
|
||||
return 0 ;
|
||||
|
||||
@@ -85,11 +85,11 @@ all_tests:
|
||||
make run_test "TEST_NAME=sem8"
|
||||
make run_test "TEST_NAME=sem9"
|
||||
|
||||
all_fail:
|
||||
fail_tests:
|
||||
make run_test "TEST_NAME=mutex4"
|
||||
make run_test "TEST_NAME=sem4"
|
||||
|
||||
|
||||
run_last:
|
||||
qemu-system-arm -M lm3s6965evb -kernel boot.elf -monitor stdio -semihosting
|
||||
qemu-system-arm -M lm3s6965evb -kernel boot.elf -semihosting
|
||||
|
||||
|
||||
@@ -31,3 +31,7 @@ Fixes implemented for the QEMU 1.2.0 release:
|
||||
Because of the problems with the Sys Tick Interrupt the The Stellaris
|
||||
General-Purpose Timer Module (GPTM) was used to generate the system timer
|
||||
tick.
|
||||
|
||||
BUGS:
|
||||
mutex4 testcase fails.
|
||||
sem4 testcase fails.
|
||||
@@ -79,8 +79,8 @@ main (void)
|
||||
uint32_t failures ;
|
||||
printf ("Atomthreads starting %s... \r\n", ATOMTHREADS_TEST) ;
|
||||
|
||||
atomOSInit(&idle_stack[IDLE_STACK_BYTE_SIZE - sizeof(unsigned int)], IDLE_STACK_BYTE_SIZE - sizeof(unsigned int)) ;
|
||||
atomThreadCreate ((ATOM_TCB *)&test_tcb, TEST_THREAD_PRIO, test_thread, 0, &test_stack[(TEST_STACK_BYTE_SIZE) - sizeof(unsigned int)], TEST_STACK_BYTE_SIZE - sizeof(unsigned int));
|
||||
atomOSInit(&idle_stack[0], IDLE_STACK_BYTE_SIZE, TRUE) ;
|
||||
atomThreadCreate ((ATOM_TCB *)&test_tcb, TEST_THREAD_PRIO, test_thread, 0, &test_stack[0], TEST_STACK_BYTE_SIZE, TRUE);
|
||||
atomOSStart() ;
|
||||
|
||||
return 0 ;
|
||||
|
||||
@@ -9,8 +9,8 @@ License: BSD Revised
|
||||
ARM PORT
|
||||
|
||||
This folder contains a port of the Atomthreads real time kernel for the
|
||||
ARM processor architecture. This port was tested on Cortex A9, Cortex A15
|
||||
and the ARM926EJ-S (QEMU).
|
||||
ARM processor architecture. This port was tested on the ARMv5 and ARMv7
|
||||
architectures.
|
||||
|
||||
To Use:
|
||||
|
||||
|
||||
@@ -32,8 +32,17 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#define SYSTEM_TICKS_PER_SEC 100
|
||||
#define SYSTEM_TICKS_PER_SEC 100
|
||||
|
||||
/**
|
||||
* Definition of NULL.
|
||||
* If stddef.h is available on the platform it is simplest to include it
|
||||
* from this header, otherwise define below.
|
||||
*/
|
||||
#define NULL ((void *)(0))
|
||||
|
||||
/* Size of each stack entry / stack alignment size (e.g. 32 bits) */
|
||||
#define STACK_ALIGN_SIZE sizeof(unsigned int)
|
||||
|
||||
/**
|
||||
* Architecture-specific types.
|
||||
@@ -47,12 +56,17 @@
|
||||
* Functions defined in atomport_arm.asm
|
||||
*
|
||||
*/
|
||||
extern void contextInit (void) ;
|
||||
extern uint32_t contextEnterCritical (void) ;
|
||||
extern void contextExitCritical (uint32_t posture) ;
|
||||
extern void contextInit (void) ;
|
||||
extern uint32_t contextEnterCritical (void) ;
|
||||
extern void contextExitCritical (uint32_t posture) ;
|
||||
|
||||
|
||||
/* Critical region protection */
|
||||
/**
|
||||
* Critical region protection: this should disable interrupts
|
||||
* to protect OS data structures during modification. It must
|
||||
* allow nested calls, which means that interrupts should only
|
||||
* be re-enabled when the outer CRITICAL_END() is reached.
|
||||
*/
|
||||
#define CRITICAL_STORE uint32_t __atom_critical
|
||||
#define CRITICAL_START() __atom_critical = contextEnterCritical()
|
||||
#define CRITICAL_END() contextExitCritical(__atom_critical)
|
||||
|
||||
@@ -32,7 +32,23 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#define SYSTEM_TICKS_PER_SEC 100
|
||||
#define SYSTEM_TICKS_PER_SEC 100
|
||||
|
||||
/**
|
||||
* Definition of NULL.
|
||||
* If stddef.h is available on the platform it is simplest to include it
|
||||
* from this header, otherwise define below.
|
||||
*/
|
||||
#define NULL ((void *)(0))
|
||||
|
||||
/* Size of each stack entry / stack alignment size (e.g. 32 bits) */
|
||||
#define STACK_ALIGN_SIZE sizeof(unsigned int)
|
||||
|
||||
/**
|
||||
* Architecture-specific types.
|
||||
* Most of these are available from types.h on this platform, which is
|
||||
* included above.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
@@ -47,9 +63,9 @@
|
||||
* Functions defined in atomport_arm.asm
|
||||
*
|
||||
*/
|
||||
extern void contextInit (void) ;
|
||||
extern uint32_t contextEnterCritical (void) ;
|
||||
extern void contextExitCritical (uint32_t posture) ;
|
||||
extern void contextInit (void) ;
|
||||
extern uint32_t contextEnterCritical (void) ;
|
||||
extern void contextExitCritical (uint32_t posture) ;
|
||||
|
||||
|
||||
/* Critical region protection */
|
||||
@@ -58,3 +74,4 @@ extern void contextExitCritical (uint32_t posture) ;
|
||||
#define CRITICAL_END() contextExitCritical(__atom_critical)
|
||||
|
||||
#endif /* __ATOM_PORT_H__ */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user