aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/ARM7-AT91SAM7S-FATFS-GCC/main.c5
-rw-r--r--demos/ARM7-AT91SAM7S-GCC/main.c5
-rw-r--r--demos/ARM7-AT91SAM7X-FATFS-GCC/main.c5
-rw-r--r--demos/ARM7-AT91SAM7X-GCC/main.c4
-rw-r--r--demos/ARM7-AT91SAM7X-LWIP-GCC/main.c5
-rw-r--r--demos/ARM7-AT91SAM7X-UIP-GCC/main.c5
-rw-r--r--demos/ARM7-LPC214x-FATFS-GCC/main.c5
-rw-r--r--demos/ARM7-LPC214x-G++/main.cpp5
-rw-r--r--demos/ARM7-LPC214x-GCC/main.c5
-rw-r--r--demos/ARMCM0-LPC1114-GCC/main.c5
-rw-r--r--demos/ARMCM3-LPC1343-GCC/main.c5
-rw-r--r--demos/ARMCM3-STM32F100-DISCOVERY-GCC/main.c5
-rw-r--r--demos/ARMCM3-STM32F103-FATFS-GCC/main.c5
-rw-r--r--demos/ARMCM3-STM32F103-GCC/main.c5
-rw-r--r--demos/ARMCM3-STM32F103-IAR/main.c5
-rw-r--r--demos/ARMCM3-STM32F107-GCC/main.c5
-rw-r--r--demos/AVR-AT90CANx-GCC/main.c2
-rw-r--r--demos/AVR-ATmega128-GCC/main.c2
-rw-r--r--demos/MSP430-MSP430x1611-GCC/main.c5
-rw-r--r--demos/PPC-SPC563-GCC/main.c5
-rw-r--r--os/kernel/src/chschd.c5
-rw-r--r--os/ports/GCC/ARM/crt0.s14
-rw-r--r--os/ports/GCC/ARM/port.dox2
-rw-r--r--os/ports/GCC/ARMCMx/crt0_v6m.s10
-rw-r--r--os/ports/GCC/ARMCMx/crt0_v7m.s10
-rw-r--r--os/ports/GCC/PPC/crt0.s10
-rw-r--r--os/ports/GCC/PPC/port.dox2
-rw-r--r--readme.txt12
-rw-r--r--testhal/STM32/ADC/main.c5
-rw-r--r--testhal/STM32/CAN/main.c5
-rw-r--r--testhal/STM32/PWM/main.c5
-rw-r--r--testhal/STM32/SPI/main.c5
-rw-r--r--testhal/STM32/UART/main.c5
33 files changed, 56 insertions, 127 deletions
diff --git a/demos/ARM7-AT91SAM7S-FATFS-GCC/main.c b/demos/ARM7-AT91SAM7S-FATFS-GCC/main.c
index 95c5c94a3..faf8c5a8d 100644
--- a/demos/ARM7-AT91SAM7S-FATFS-GCC/main.c
+++ b/demos/ARM7-AT91SAM7S-FATFS-GCC/main.c
@@ -293,7 +293,7 @@ static void RemoveHandler(eventid_t id) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
+int main(void) {
static const evhandler_t evhndl[] = {
InsertHandler,
RemoveHandler
@@ -301,9 +301,6 @@ int main(int argc, char **argv) {
Thread *shelltp = NULL;
struct EventListener el0, el1;
- (void)argc;
- (void)argv;
-
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
diff --git a/demos/ARM7-AT91SAM7S-GCC/main.c b/demos/ARM7-AT91SAM7S-GCC/main.c
index 49ce3df70..c49576c34 100644
--- a/demos/ARM7-AT91SAM7S-GCC/main.c
+++ b/demos/ARM7-AT91SAM7S-GCC/main.c
@@ -37,10 +37,7 @@ static msg_t Thread1(void *p) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
-
- (void)argc;
- (void)argv;
+int main(void) {
/*
* System initializations.
diff --git a/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c b/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c
index 5708cb3b3..3c3f2aae4 100644
--- a/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c
+++ b/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c
@@ -276,7 +276,7 @@ static void RemoveHandler(eventid_t id) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
+int main(void) {
static const evhandler_t evhndl[] = {
InsertHandler,
RemoveHandler
@@ -284,9 +284,6 @@ int main(int argc, char **argv) {
Thread *shelltp = NULL;
struct EventListener el0, el1;
- (void)argc;
- (void)argv;
-
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
diff --git a/demos/ARM7-AT91SAM7X-GCC/main.c b/demos/ARM7-AT91SAM7X-GCC/main.c
index a4af5dadb..d42ebfe68 100644
--- a/demos/ARM7-AT91SAM7X-GCC/main.c
+++ b/demos/ARM7-AT91SAM7X-GCC/main.c
@@ -37,9 +37,7 @@ static msg_t Thread1(void *p) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
- (void)argc;
- (void)argv;
+int main(void) {
/*
* System initializations.
diff --git a/demos/ARM7-AT91SAM7X-LWIP-GCC/main.c b/demos/ARM7-AT91SAM7X-LWIP-GCC/main.c
index bee5b36c9..d8ff64965 100644
--- a/demos/ARM7-AT91SAM7X-LWIP-GCC/main.c
+++ b/demos/ARM7-AT91SAM7X-LWIP-GCC/main.c
@@ -40,10 +40,7 @@ static msg_t Thread1(void *p) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
-
- (void)argc;
- (void)argv;
+int main(void) {
/*
* System initializations.
diff --git a/demos/ARM7-AT91SAM7X-UIP-GCC/main.c b/demos/ARM7-AT91SAM7X-UIP-GCC/main.c
index 1fd5fcf52..81ec5f89a 100644
--- a/demos/ARM7-AT91SAM7X-UIP-GCC/main.c
+++ b/demos/ARM7-AT91SAM7X-UIP-GCC/main.c
@@ -41,10 +41,7 @@ static msg_t Thread1(void *p) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
-
- (void)argc;
- (void)argv;
+int main(void) {
/*
* System initializations.
diff --git a/demos/ARM7-LPC214x-FATFS-GCC/main.c b/demos/ARM7-LPC214x-FATFS-GCC/main.c
index 9edae1db7..44afc36fd 100644
--- a/demos/ARM7-LPC214x-FATFS-GCC/main.c
+++ b/demos/ARM7-LPC214x-FATFS-GCC/main.c
@@ -223,7 +223,7 @@ static void RemoveHandler(eventid_t id) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
+int main(void) {
static const evhandler_t evhndl[] = {
TimerHandler,
InsertHandler,
@@ -232,9 +232,6 @@ int main(int argc, char **argv) {
static EvTimer evt;
struct EventListener el0, el1, el2;
- (void)argc;
- (void)argv;
-
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
diff --git a/demos/ARM7-LPC214x-G++/main.cpp b/demos/ARM7-LPC214x-G++/main.cpp
index 8a9ca1c05..ca99c67ef 100644
--- a/demos/ARM7-LPC214x-G++/main.cpp
+++ b/demos/ARM7-LPC214x-G++/main.cpp
@@ -144,16 +144,13 @@ static void TimerHandler(eventid_t id) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
+int main(void) {
static const evhandler_t evhndl[] = {
TimerHandler
};
static EvTimer evt;
struct EventListener el0;
- (void)argc;
- (void)argv;
-
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
diff --git a/demos/ARM7-LPC214x-GCC/main.c b/demos/ARM7-LPC214x-GCC/main.c
index 6cc8037f6..e4810d125 100644
--- a/demos/ARM7-LPC214x-GCC/main.c
+++ b/demos/ARM7-LPC214x-GCC/main.c
@@ -62,10 +62,7 @@ static msg_t Thread2(void *arg) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
-
- (void)argc;
- (void)argv;
+int main(void) {
/*
* System initializations.
diff --git a/demos/ARMCM0-LPC1114-GCC/main.c b/demos/ARMCM0-LPC1114-GCC/main.c
index 14f913a0a..6080d1d72 100644
--- a/demos/ARMCM0-LPC1114-GCC/main.c
+++ b/demos/ARMCM0-LPC1114-GCC/main.c
@@ -94,12 +94,9 @@ static msg_t Thread2(void *arg) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
+int main(void) {
uint8_t i;
- (void)argc;
- (void)argv;
-
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
diff --git a/demos/ARMCM3-LPC1343-GCC/main.c b/demos/ARMCM3-LPC1343-GCC/main.c
index 0600865f3..10e21bb9b 100644
--- a/demos/ARMCM3-LPC1343-GCC/main.c
+++ b/demos/ARMCM3-LPC1343-GCC/main.c
@@ -94,12 +94,9 @@ static msg_t Thread2(void *arg) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
+int main(void) {
uint8_t i;
- (void)argc;
- (void)argv;
-
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
diff --git a/demos/ARMCM3-STM32F100-DISCOVERY-GCC/main.c b/demos/ARMCM3-STM32F100-DISCOVERY-GCC/main.c
index a94600203..4b5978775 100644
--- a/demos/ARMCM3-STM32F100-DISCOVERY-GCC/main.c
+++ b/demos/ARMCM3-STM32F100-DISCOVERY-GCC/main.c
@@ -172,10 +172,7 @@ static msg_t Thread1(void *arg) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
-
- (void)argc;
- (void)argv;
+int main(void) {
/*
* System initializations.
diff --git a/demos/ARMCM3-STM32F103-FATFS-GCC/main.c b/demos/ARMCM3-STM32F103-FATFS-GCC/main.c
index 1d0018b9b..58a966278 100644
--- a/demos/ARMCM3-STM32F103-FATFS-GCC/main.c
+++ b/demos/ARMCM3-STM32F103-FATFS-GCC/main.c
@@ -266,7 +266,7 @@ static void RemoveHandler(eventid_t id) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
+int main(void) {
static const evhandler_t evhndl[] = {
InsertHandler,
RemoveHandler
@@ -274,9 +274,6 @@ int main(int argc, char **argv) {
Thread *shelltp = NULL;
struct EventListener el0, el1;
- (void)argc;
- (void)argv;
-
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
diff --git a/demos/ARMCM3-STM32F103-GCC/main.c b/demos/ARMCM3-STM32F103-GCC/main.c
index e133e6e3b..5856e07b5 100644
--- a/demos/ARMCM3-STM32F103-GCC/main.c
+++ b/demos/ARMCM3-STM32F103-GCC/main.c
@@ -40,10 +40,7 @@ static msg_t Thread1(void *arg) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
-
- (void)argc;
- (void)argv;
+int main(void) {
/*
* System initializations.
diff --git a/demos/ARMCM3-STM32F103-IAR/main.c b/demos/ARMCM3-STM32F103-IAR/main.c
index e133e6e3b..5856e07b5 100644
--- a/demos/ARMCM3-STM32F103-IAR/main.c
+++ b/demos/ARMCM3-STM32F103-IAR/main.c
@@ -40,10 +40,7 @@ static msg_t Thread1(void *arg) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
-
- (void)argc;
- (void)argv;
+int main(void) {
/*
* System initializations.
diff --git a/demos/ARMCM3-STM32F107-GCC/main.c b/demos/ARMCM3-STM32F107-GCC/main.c
index fe463af89..73bc0b402 100644
--- a/demos/ARMCM3-STM32F107-GCC/main.c
+++ b/demos/ARMCM3-STM32F107-GCC/main.c
@@ -40,10 +40,7 @@ static msg_t Thread1(void *arg) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
-
- (void)argc;
- (void)argv;
+int main(void) {
/*
* System initializations.
diff --git a/demos/AVR-AT90CANx-GCC/main.c b/demos/AVR-AT90CANx-GCC/main.c
index 79888a55a..f170a4c27 100644
--- a/demos/AVR-AT90CANx-GCC/main.c
+++ b/demos/AVR-AT90CANx-GCC/main.c
@@ -41,7 +41,7 @@ static void TimerHandler(eventid_t id) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
+int main(void) {
static EvTimer evt;
static evhandler_t handlers[1] = {
TimerHandler
diff --git a/demos/AVR-ATmega128-GCC/main.c b/demos/AVR-ATmega128-GCC/main.c
index c02ef5404..e1cb2a9d6 100644
--- a/demos/AVR-ATmega128-GCC/main.c
+++ b/demos/AVR-ATmega128-GCC/main.c
@@ -44,7 +44,7 @@ static void TimerHandler(eventid_t id) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
+int main(void) {
static EvTimer evt;
static evhandler_t handlers[1] = {
TimerHandler
diff --git a/demos/MSP430-MSP430x1611-GCC/main.c b/demos/MSP430-MSP430x1611-GCC/main.c
index c010b89b3..999ea8f49 100644
--- a/demos/MSP430-MSP430x1611-GCC/main.c
+++ b/demos/MSP430-MSP430x1611-GCC/main.c
@@ -40,10 +40,7 @@ static msg_t Thread1(void *arg) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
-
- (void)argc;
- (void)argv;
+int main(void) {
/*
* System initializations.
diff --git a/demos/PPC-SPC563-GCC/main.c b/demos/PPC-SPC563-GCC/main.c
index f5c6c9b40..3210716ae 100644
--- a/demos/PPC-SPC563-GCC/main.c
+++ b/demos/PPC-SPC563-GCC/main.c
@@ -147,12 +147,9 @@ static msg_t Thread1(void *arg) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
+int main(void) {
Thread *shelltp = NULL;
- (void)argc;
- (void)argv;
-
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
diff --git a/os/kernel/src/chschd.c b/os/kernel/src/chschd.c
index 9adf656ff..5b04c1f3d 100644
--- a/os/kernel/src/chschd.c
+++ b/os/kernel/src/chschd.c
@@ -71,12 +71,7 @@ void scheduler_init(void) {
* @iclass
*/
#if !defined(PORT_OPTIMIZED_READYI) || defined(__DOXYGEN__)
-#if CH_OPTIMIZE_SPEED
-/* NOTE: it is inlined in this module only.*/
-INLINE Thread *chSchReadyI(Thread *tp) {
-#else
Thread *chSchReadyI(Thread *tp) {
-#endif
Thread *cp;
/* Integrity check.*/
diff --git a/os/ports/GCC/ARM/crt0.s b/os/ports/GCC/ARM/crt0.s
index 33cbb5600..b3a6aa392 100644
--- a/os/ports/GCC/ARM/crt0.s
+++ b/os/ports/GCC/ARM/crt0.s
@@ -125,25 +125,21 @@ bssloop:
add r0, pc, #1
bx r0
.code 16
- mov r0, #0
- mov r1, r0
bl main
- ldr r1, =MainExitHandler
+ ldr r1, =_main_exit_handler
bx r1
.code 32
#else
- mov r0, #0
- mov r1, r0
bl main
- b MainExitHandler
+ b _main_exit_handler
#endif
/*
* Default main function exit handler.
*/
- .weak MainExitHandler
- .global MainExitHandler
-MainExitHandler:
+ .weak _main_exit_handler
+ .global _main_exit_handler
+_main_exit_handler:
.loop: b .loop
/*
diff --git a/os/ports/GCC/ARM/port.dox b/os/ports/GCC/ARM/port.dox
index 1e1fb4b64..2fe0f19c2 100644
--- a/os/ports/GCC/ARM/port.dox
+++ b/os/ports/GCC/ARM/port.dox
@@ -195,7 +195,7 @@
* -# The @p main() function is invoked with the parameters @p argc and @p argv
* set to zero.
* -# Should the @p main() function return a branch is performed to the weak
- * symbol MainExitHandler. The default code is an endless empty loop.
+ * symbol _main_exit_handler. The default code is an endless empty loop.
* .
* @section ARM_STARTUP_2 Expected linker symbols
* The startup code starts at the symbol @p ResetHandler and expects the
diff --git a/os/ports/GCC/ARMCMx/crt0_v6m.s b/os/ports/GCC/ARMCMx/crt0_v6m.s
index 82dc066fb..baaf6f32d 100644
--- a/os/ports/GCC/ARMCMx/crt0_v6m.s
+++ b/os/ports/GCC/ARMCMx/crt0_v6m.s
@@ -102,19 +102,17 @@ endbloop:
/*
* Main program invocation.
*/
- movs r0, #0
- mov r1, r0
bl main
- b MainExitHandler
+ b _main_exit_handler
/*
* Default main exit code, just a loop.
* It is a weak symbol, the application code can redefine the behavior.
*/
.thumb_func
- .global MainExitHandler
- .weak MainExitHandler
-MainExitHandler:
+ .global _main_exit_handler
+ .weak _main_exit_handler
+_main_exit_handler:
.loop: b .loop
/*
diff --git a/os/ports/GCC/ARMCMx/crt0_v7m.s b/os/ports/GCC/ARMCMx/crt0_v7m.s
index 1c76975c6..4e4a40631 100644
--- a/os/ports/GCC/ARMCMx/crt0_v7m.s
+++ b/os/ports/GCC/ARMCMx/crt0_v7m.s
@@ -97,19 +97,17 @@ bloop:
/*
* Main program invocation.
*/
- movs r0, #0
- mov r1, r0
bl main
- b MainExitHandler
+ b _main_exit_handler
/*
* Default main exit code, just a loop.
* It is a weak symbol, the application code can redefine the behavior.
*/
.thumb_func
- .global MainExitHandler
- .weak MainExitHandler
-MainExitHandler:
+ .global _main_exit_handler
+ .weak _main_exit_handler
+_main_exit_handler:
.loop: b .loop
/*
diff --git a/os/ports/GCC/PPC/crt0.s b/os/ports/GCC/PPC/crt0.s
index c40f5efb2..0a2697be8 100644
--- a/os/ports/GCC/PPC/crt0.s
+++ b/os/ports/GCC/PPC/crt0.s
@@ -89,17 +89,15 @@ _boot_address:
/*
* Main program invocation.
*/
- li %r3, 0
- li %r4, 0
bl main
- b main_exit
+ b _main_exit_handler
/*
* Default main exit code, infinite loop.
*/
- .weak main_exit
- .globl main_exit
-main_exit:
+ .weak _main_exit_handler
+ .globl _main_exit_handler
+_main_exit_handler:
forever:
b forever
diff --git a/os/ports/GCC/PPC/port.dox b/os/ports/GCC/PPC/port.dox
index 6c3bc55f2..70ba4784a 100644
--- a/os/ports/GCC/PPC/port.dox
+++ b/os/ports/GCC/PPC/port.dox
@@ -112,7 +112,7 @@
* -# The @p main() function is invoked with the parameters @p argc and @p argv
* set to zero.
* -# Should the @p main() function return a branch is performed to the weak
- * symbol @p main_exit. The default code is an endless empty loop.
+ * symbol @p _main_exit_handler. The default code is an endless empty loop.
* .
* @section PPC_STARTUP_2 Expected linker symbols
* The startup code starts at the symbol @p _boot_address and expects the
diff --git a/readme.txt b/readme.txt
index 11a6e7b6b..7c9d5505c 100644
--- a/readme.txt
+++ b/readme.txt
@@ -64,6 +64,18 @@
*** Releases ***
*****************************************************************************
+*** 2.1.7 ***
+- NEW: New ARM Cortex-Mx port for RVCT compiler (probably will not be
+ included in 2.2.0, requires more testing).
+- CHANGE: Removed enforced inlining for the chSchReadyI() function when
+ the CH_OPTIMIZE_SPEED is enabled. Now the matter is left to the compiler
+ specific settings. This change is meant to increase compatibility with
+ compilers that have a different inlining semantic than GCC when not in
+ C99 mode.
+- CHANGE: Changed the declaration of the main() function in all demos
+ without arguments. Removed the clearing of arguments from the startup
+ files and saved some space.
+
*** 2.1.6 ***
- FIX: Fixed error in sdPutTimeout() macro (bug 3138763)(backported in 2.0.9).
- NEW: New ARM Cortex-Mx port for IAR compiler (probably will not be
diff --git a/testhal/STM32/ADC/main.c b/testhal/STM32/ADC/main.c
index ded1bd2b9..c0ce8c664 100644
--- a/testhal/STM32/ADC/main.c
+++ b/testhal/STM32/ADC/main.c
@@ -84,10 +84,7 @@ static msg_t Thread1(void *arg) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
-
- (void)argc;
- (void)argv;
+int main(void) {
/*
* System initializations.
diff --git a/testhal/STM32/CAN/main.c b/testhal/STM32/CAN/main.c
index b23e85b3c..ab7fb1c5e 100644
--- a/testhal/STM32/CAN/main.c
+++ b/testhal/STM32/CAN/main.c
@@ -80,10 +80,7 @@ static msg_t can_tx(void * p) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
-
- (void)argc;
- (void)argv;
+int main(void) {
/*
* System initializations.
diff --git a/testhal/STM32/PWM/main.c b/testhal/STM32/PWM/main.c
index 71daaacdc..42a35170f 100644
--- a/testhal/STM32/PWM/main.c
+++ b/testhal/STM32/PWM/main.c
@@ -62,10 +62,7 @@ static PWMConfig pwmcfg = {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
-
- (void)argc;
- (void)argv;
+int main(void) {
/*
* System initializations.
diff --git a/testhal/STM32/SPI/main.c b/testhal/STM32/SPI/main.c
index 146894a0a..e107cb7c7 100644
--- a/testhal/STM32/SPI/main.c
+++ b/testhal/STM32/SPI/main.c
@@ -89,12 +89,9 @@ static msg_t spi_thread_2(void *p) {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
+int main(void) {
unsigned i;
- (void)argc;
- (void)argv;
-
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
diff --git a/testhal/STM32/UART/main.c b/testhal/STM32/UART/main.c
index ac4afc1c7..f672cfb1a 100644
--- a/testhal/STM32/UART/main.c
+++ b/testhal/STM32/UART/main.c
@@ -113,10 +113,7 @@ static UARTConfig uart_cfg_1 = {
/*
* Application entry point.
*/
-int main(int argc, char **argv) {
-
- (void)argc;
- (void)argv;
+int main(void) {
/*
* System initializations.