git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1230 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
26ed373287
commit
e9d7b9de57
|
@ -126,10 +126,10 @@ AOPT =
|
|||
TOPT = -mthumb -DTHUMB
|
||||
|
||||
# Define C warning options here
|
||||
CWARN = -Wall -Wstrict-prototypes
|
||||
CWARN = -Wall -Wextra -Wstrict-prototypes
|
||||
|
||||
# Define C++ warning options here
|
||||
CPPWARN = -Wall
|
||||
CPPWARN = -Wall -Wextra
|
||||
|
||||
#
|
||||
# Compiler settings
|
||||
|
|
|
@ -137,6 +137,7 @@ public:
|
|||
*/
|
||||
static void TimerHandler(eventid_t id) {
|
||||
|
||||
(void)id;
|
||||
if (!(palReadPort(IOPORT1) & BOTH_BUTTONS)) { // Both buttons
|
||||
TesterThread tester;
|
||||
tester.Wait();
|
||||
|
@ -154,6 +155,9 @@ int main(int argc, char **argv) {
|
|||
static EvTimer evt;
|
||||
struct EventListener el0;
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
/*
|
||||
* Activates the serial driver 2 using the driver default configuration.
|
||||
*/
|
||||
|
|
|
@ -123,10 +123,10 @@ AOPT =
|
|||
TOPT = -mthumb -DTHUMB
|
||||
|
||||
# Define C warning options here
|
||||
CWARN = -Wall -Wstrict-prototypes
|
||||
CWARN = -Wall -Wextra -Wstrict-prototypes
|
||||
|
||||
# Define C++ warning options here
|
||||
CPPWARN = -Wall
|
||||
CPPWARN = -Wall -Wextra
|
||||
|
||||
#
|
||||
# Compiler settings
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
static WORKING_AREA(waThread1, 128);
|
||||
static msg_t Thread1(void *arg) {
|
||||
|
||||
(void)arg;
|
||||
while (TRUE) {
|
||||
palClearPort(IOPORT1, PAL_PORT_BIT(PA_LED2));
|
||||
chThdSleepMilliseconds(200);
|
||||
|
@ -47,6 +48,7 @@ static msg_t Thread1(void *arg) {
|
|||
static WORKING_AREA(waThread2, 128);
|
||||
static msg_t Thread2(void *arg) {
|
||||
|
||||
(void)arg;
|
||||
while (TRUE) {
|
||||
palClearPad(IOPORT1, PA_LEDUSB);
|
||||
chThdSleepMilliseconds(200);
|
||||
|
@ -62,6 +64,9 @@ static msg_t Thread2(void *arg) {
|
|||
*/
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
/*
|
||||
* Creates the blinker threads.
|
||||
*/
|
||||
|
|
|
@ -127,10 +127,10 @@ AOPT =
|
|||
TOPT = -mthumb -DTHUMB
|
||||
|
||||
# Define C warning options here
|
||||
CWARN = -Wall -Wstrict-prototypes
|
||||
CWARN = -Wall -Wextra -Wstrict-prototypes
|
||||
|
||||
# Define C++ warning options here
|
||||
CPPWARN = -Wall
|
||||
CPPWARN = -Wall -Wextra
|
||||
|
||||
#
|
||||
# Compiler settings
|
||||
|
|
|
@ -58,9 +58,8 @@ void InitBuzzer(void) {
|
|||
}
|
||||
|
||||
static void stop(void *p) {
|
||||
TC *tc = T1Base;
|
||||
|
||||
StopCounter(tc);
|
||||
StopCounter((TC *)p);
|
||||
chEvtBroadcastI(&BuzzerSilentEventSource);
|
||||
}
|
||||
|
||||
|
@ -77,7 +76,7 @@ void PlaySound(int freq, systime_t duration) {
|
|||
|
||||
tc->TC_MR0 = tc->TC_MR1 = (PCLK / (freq * 2));
|
||||
StartCounter(tc);
|
||||
chVTSetI(&bvt, duration, stop, NULL);
|
||||
chVTSetI(&bvt, duration, stop, tc);
|
||||
|
||||
chSysUnlock();
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
static WORKING_AREA(waThread1, 128);
|
||||
static msg_t Thread1(void *arg) {
|
||||
|
||||
(void)arg;
|
||||
while (TRUE) {
|
||||
palClearPort(IOPORT1, PAL_PORT_BIT(PA_LED2));
|
||||
chThdSleepMilliseconds(200);
|
||||
|
@ -54,6 +55,7 @@ static msg_t Thread1(void *arg) {
|
|||
static WORKING_AREA(waThread2, 128);
|
||||
static msg_t Thread2(void *arg) {
|
||||
|
||||
(void)arg;
|
||||
while (TRUE) {
|
||||
palClearPad(IOPORT1, PA_LEDUSB);
|
||||
chThdSleepMilliseconds(200);
|
||||
|
@ -70,6 +72,7 @@ static WORKING_AREA(waTestThread, 128);
|
|||
*/
|
||||
static void TimerHandler(eventid_t id) {
|
||||
|
||||
(void)id;
|
||||
if (!(palReadPort(IOPORT1) & BOTH_BUTTONS)) {
|
||||
Thread *tp = chThdCreateStatic(waTestThread, sizeof(waTestThread),
|
||||
NORMALPRIO, TestThread, &SD1);
|
||||
|
@ -94,6 +97,7 @@ static void InsertHandler(eventid_t id) {
|
|||
static uint8_t rwbuf[512];
|
||||
MMCCSD data;
|
||||
|
||||
(void)id;
|
||||
PlaySoundWait(1000, MS2ST(100));
|
||||
PlaySoundWait(2000, MS2ST(100));
|
||||
if (mmcInit())
|
||||
|
@ -111,6 +115,7 @@ static void InsertHandler(eventid_t id) {
|
|||
*/
|
||||
static void RemoveHandler(eventid_t id) {
|
||||
|
||||
(void)id;
|
||||
PlaySoundWait(2000, MS2ST(100));
|
||||
PlaySoundWait(1000, MS2ST(100));
|
||||
}
|
||||
|
@ -128,6 +133,9 @@ int main(int argc, char **argv) {
|
|||
static EvTimer evt;
|
||||
struct EventListener el0, el1, el2;
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
/*
|
||||
* Activates the serial driver 2 using the driver default configuration.
|
||||
*/
|
||||
|
|
|
@ -42,6 +42,7 @@ void InitMMC(void) {
|
|||
|
||||
void tmrfunc(void *par) {
|
||||
|
||||
(void)par;
|
||||
if (cnt) {
|
||||
if (!palReadPad(IOPORT2, PB_CP1)) {
|
||||
if (!--cnt)
|
||||
|
|
|
@ -139,10 +139,10 @@ AOPT =
|
|||
TOPT = -mthumb -DTHUMB
|
||||
|
||||
# Define C warning options here
|
||||
CWARN = -Wall -Wstrict-prototypes
|
||||
CWARN = -Wall -Wextra -Wstrict-prototypes
|
||||
|
||||
# Define C++ warning options here
|
||||
CPPWARN = -Wall
|
||||
CPPWARN = -Wall -Wextra
|
||||
|
||||
#
|
||||
# Compiler settings
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
static WORKING_AREA(waThread1, 128);
|
||||
static msg_t Thread1(void *arg) {
|
||||
|
||||
(void)arg;
|
||||
while (TRUE) {
|
||||
palClearPad(IOPORT3, GPIOC_LED);
|
||||
chThdSleepMilliseconds(500);
|
||||
|
@ -45,6 +46,9 @@ static msg_t Thread1(void *arg) {
|
|||
*/
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
/*
|
||||
* Activates the serial driver 2 using the driver default configuration.
|
||||
*/
|
||||
|
|
|
@ -91,10 +91,10 @@ HEX = $(CP) -O ihex
|
|||
BIN = $(CP) -O binary
|
||||
|
||||
# Define C warning options here
|
||||
CWARN = -Wall -Wstrict-prototypes
|
||||
CWARN = -Wall -Wextra -Wstrict-prototypes
|
||||
|
||||
# Define C++ warning options here
|
||||
CPPWARN = -Wall
|
||||
CPPWARN = -Wall -Wextra
|
||||
|
||||
#
|
||||
# Compiler settings
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
static WORKING_AREA(waThread1, 64);
|
||||
static msg_t Thread1(void *arg) {
|
||||
|
||||
(void)arg;
|
||||
while (TRUE) {
|
||||
palSetPad(IOPORT6, P6_O_LED);
|
||||
chThdSleepMilliseconds(500);
|
||||
|
@ -44,6 +45,9 @@ static msg_t Thread1(void *arg) {
|
|||
*/
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
/*
|
||||
* Hardware initialization, see board.c.
|
||||
*/
|
||||
|
|
|
@ -99,7 +99,7 @@ LIBS = $(DLIBS) $(ULIBS)
|
|||
|
||||
LDFLAGS = -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||
ASFLAGS = -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
|
||||
CPFLAGS = $(OPT) -Wall -Wstrict-prototypes -fverbose-asm -Wa,-alms=$(<:.c=.lst) $(DEFS)
|
||||
CPFLAGS = $(OPT) -Wall -Wextra -Wstrict-prototypes -fverbose-asm -Wa,-alms=$(<:.c=.lst) $(DEFS)
|
||||
|
||||
# Generate dependency information
|
||||
CPFLAGS += -MD -MP -MF .dep/$(@F).d
|
||||
|
|
|
@ -89,8 +89,9 @@ void ChkIntSources(void) {
|
|||
*/
|
||||
__attribute__((used))
|
||||
static void __dummy(Thread *otp, Thread *ntp) {
|
||||
(void)otp; (void)ntp;
|
||||
asm volatile (".globl @port_switch@8 \n\t" \
|
||||
"@port_switch@8: \n\t" \
|
||||
"@port_switch@8: \n\t" \
|
||||
"push %ebp \n\t" \
|
||||
"push %esi \n\t" \
|
||||
"push %edi \n\t" \
|
||||
|
|
|
@ -42,10 +42,11 @@ msg_t TestThread(void *p);
|
|||
* areas. The system is halted if something is wrong.
|
||||
*/
|
||||
static msg_t WatchdogThread(void *arg) {
|
||||
|
||||
(void)arg;
|
||||
wdguard = 0xA51F2E3D;
|
||||
cdguard = 0xA51F2E3D;
|
||||
while (TRUE) {
|
||||
|
||||
if ((wdguard != 0xA51F2E3D) ||
|
||||
(cdguard != 0xA51F2E3D)) {
|
||||
printf("Halted by watchdog");
|
||||
|
@ -64,6 +65,7 @@ static msg_t WatchdogThread(void *arg) {
|
|||
*/
|
||||
static msg_t ConsoleThread(void *arg) {
|
||||
|
||||
(void)arg;
|
||||
while (!chThdShouldTerminate()) {
|
||||
printf((char *)chMsgWait());
|
||||
fflush(stdout);
|
||||
|
@ -230,6 +232,7 @@ EventListener s1tel;
|
|||
static void COM1Handler(eventid_t id) {
|
||||
sdflags_t flags;
|
||||
|
||||
(void)id;
|
||||
if (s1 && chThdTerminated(s1)) {
|
||||
s1 = NULL;
|
||||
cprint("Init: disconnection on SD1\n");
|
||||
|
@ -256,6 +259,7 @@ EventListener s2tel;
|
|||
static void COM2Handler(eventid_t id) {
|
||||
sdflags_t flags;
|
||||
|
||||
(void)id;
|
||||
if (s2 && chThdTerminated(s2)) {
|
||||
s2 = NULL;
|
||||
cprint("Init: disconnection on SD2\n");
|
||||
|
|
|
@ -241,6 +241,7 @@ void sd_lld_start(SerialDriver *sdp, const SerialDriverConfig *config) {
|
|||
*/
|
||||
void sd_lld_stop(SerialDriver *sdp) {
|
||||
|
||||
(void)sdp;
|
||||
}
|
||||
|
||||
bool_t sd_lld_interrupt_pending(void) {
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#ifndef _QUEUES_H_
|
||||
#define _QUEUES_H_
|
||||
|
||||
#if CH_USE_QUEUES
|
||||
|
||||
/*
|
||||
* Module dependancies check.
|
||||
*/
|
||||
|
@ -48,7 +50,6 @@ typedef void (*qnotify_t)(void);
|
|||
/** Returned by the queue functions if the queue is full. */
|
||||
#define Q_FULL -4
|
||||
|
||||
#if CH_USE_QUEUES
|
||||
/**
|
||||
* @brief Generic I/O queue structure.
|
||||
* @details This structure represents a generic Input or Output asymmetrical
|
||||
|
|
|
@ -92,22 +92,22 @@ void SVCallVector(Thread *otp, Thread *ntp) {
|
|||
asm volatile ("mrs r3, BASEPRI \n\t" \
|
||||
"mrs r12, PSP \n\t" \
|
||||
"stmdb r12!, {r3-r6,r8-r11, lr} \n\t" \
|
||||
"str r12, [r0, #16] \n\t" \
|
||||
"ldr r12, [r1, #16] \n\t" \
|
||||
"str r12, [%0, #16] \n\t" \
|
||||
"ldr r12, [%1, #16] \n\t" \
|
||||
"ldmia r12!, {r3-r6,r8-r11, lr} \n\t" \
|
||||
"msr PSP, r12 \n\t" \
|
||||
"msr BASEPRI, r3 \n\t" \
|
||||
"bx lr ");
|
||||
"bx lr" : : "r" (otp), "r" (ntp));
|
||||
#else
|
||||
asm volatile ("mrs r3, BASEPRI \n\t" \
|
||||
"mrs r12, PSP \n\t" \
|
||||
"stmdb r12!, {r3-r11, lr} \n\t" \
|
||||
"str r12, [r0, #16] \n\t" \
|
||||
"ldr r12, [r1, #16] \n\t" \
|
||||
"str r12, [%0, #16] \n\t" \
|
||||
"ldr r12, [%1, #16] \n\t" \
|
||||
"ldmia r12!, {r3-r11, lr} \n\t" \
|
||||
"msr PSP, r12 \n\t" \
|
||||
"msr BASEPRI, r3 \n\t" \
|
||||
"bx lr ");
|
||||
"bx lr" : : "r" (otp), "r" (ntp));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
- CHANGE: Because the changes in the allocators some configuration options
|
||||
changed, see the template chconf.h file.
|
||||
- CHANGE: renamed ./demos/ARM7-AT91SAM7X-WEB-GCC in ARM7-AT91SAM7X-UIP-GCC.
|
||||
- FIX: Added the most restrictive GCC warning option to the makefiles (-Wextra)
|
||||
and fixed some warnings in the code, mostly unused function parameters.
|
||||
|
||||
*** 1.3.2 ***
|
||||
- FIX: Fixed GCC 4.4.x aliasing warnings (bug 2846336)(backported in stable
|
||||
|
|
|
@ -96,7 +96,7 @@ LIBS = $(DLIBS) $(ULIBS)
|
|||
|
||||
LDFLAGS = -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch -lgcov $(LIBDIR)
|
||||
ASFLAGS = -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
|
||||
CPFLAGS = $(OPT) -Wall -Wstrict-prototypes -fverbose-asm -Wa,-alms=$(<:.c=.lst) $(DEFS)
|
||||
CPFLAGS = $(OPT) -Wall -Wextra -Wstrict-prototypes -fverbose-asm -Wa,-alms=$(<:.c=.lst) $(DEFS)
|
||||
|
||||
# Generate dependency information
|
||||
CPFLAGS += -MD -MP -MF .dep/$(@F).d
|
||||
|
|
|
@ -84,8 +84,9 @@ void ChkIntSources(void) {
|
|||
*/
|
||||
__attribute__((used))
|
||||
static void __dummy(Thread *otp, Thread *ntp) {
|
||||
(void)otp; (void)ntp;
|
||||
asm volatile (".globl @port_switch@8 \n\t" \
|
||||
"@port_switch@8: \n\t" \
|
||||
"@port_switch@8: \n\t" \
|
||||
"push %ebp \n\t" \
|
||||
"push %esi \n\t" \
|
||||
"push %edi \n\t" \
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
int main(int argc, char *argv[]) {
|
||||
msg_t result;
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
chSysInit();
|
||||
sdStart(&SD1, NULL);
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ void sd_lld_init(void) {
|
|||
*/
|
||||
void sd_lld_start(SerialDriver *sdp, const SerialDriverConfig *config) {
|
||||
|
||||
(void)sdp;
|
||||
if (config == NULL)
|
||||
config = &default_config;
|
||||
|
||||
|
@ -106,6 +107,7 @@ void sd_lld_start(SerialDriver *sdp, const SerialDriverConfig *config) {
|
|||
*/
|
||||
void sd_lld_stop(SerialDriver *sdp) {
|
||||
|
||||
(void)sdp;
|
||||
}
|
||||
|
||||
bool_t sd_lld_interrupt_pending(void) {
|
||||
|
|
Loading…
Reference in New Issue