mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2026-02-05 09:52:07 +08:00
Demo/CORTEX_MPU_M3_MPS2_QEMU_GCC: support "gcc -flto" and fixes (#1353)
Some checks failed
CI Checks / git-secrets (push) Has been cancelled
CI Checks / formatting (push) Has been cancelled
CI Checks / spell-check (push) Has been cancelled
CI Checks / doxygen (push) Has been cancelled
CI Checks / verify-manifest (push) Has been cancelled
CI Checks / memory-statistics (push) Has been cancelled
CI Checks / proof_ci (push) Has been cancelled
FreeRTOS Demos / WIN32 MSVC (push) Has been cancelled
FreeRTOS Demos / WIN32 MingW (push) Has been cancelled
FreeRTOS Demos / Posix GCC (push) Has been cancelled
FreeRTOS Demos / GNU MSP430 Toolchain (push) Has been cancelled
FreeRTOS Demos / GNU ARM Toolchain (push) Has been cancelled
FreeRTOS MPU Demo / TI-Hercules RM46 and RM57 MPU Demos (push) Has been cancelled
Build FreeRTOS+ Demos / Windows Simulator Cellular Demos (push) Has been cancelled
Build FreeRTOS+ Demos / coreHTTP WinSim Demos (push) Has been cancelled
Build FreeRTOS+ Demos / corePKCS11 WinSim Demos (push) Has been cancelled
Build FreeRTOS+ Demos / core Library Windows Simulator Demos (push) Has been cancelled
Build FreeRTOS+ Demos / AWS IoT Windows Simulator Demos (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+TCP Posix Simulator Demo (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+TCP QEMU ARM MPS2 AN385 (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+TCP Windows Simulator Demos (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+CLI Windows Simulator Demos (push) Has been cancelled
Kernel Unit Tests / FreeRTOS/Source Submodule Revision (push) Has been cancelled
Kernel Unit Tests / FreeRTOS-Kernel Main Branch (push) Has been cancelled
Some checks failed
CI Checks / git-secrets (push) Has been cancelled
CI Checks / formatting (push) Has been cancelled
CI Checks / spell-check (push) Has been cancelled
CI Checks / doxygen (push) Has been cancelled
CI Checks / verify-manifest (push) Has been cancelled
CI Checks / memory-statistics (push) Has been cancelled
CI Checks / proof_ci (push) Has been cancelled
FreeRTOS Demos / WIN32 MSVC (push) Has been cancelled
FreeRTOS Demos / WIN32 MingW (push) Has been cancelled
FreeRTOS Demos / Posix GCC (push) Has been cancelled
FreeRTOS Demos / GNU MSP430 Toolchain (push) Has been cancelled
FreeRTOS Demos / GNU ARM Toolchain (push) Has been cancelled
FreeRTOS MPU Demo / TI-Hercules RM46 and RM57 MPU Demos (push) Has been cancelled
Build FreeRTOS+ Demos / Windows Simulator Cellular Demos (push) Has been cancelled
Build FreeRTOS+ Demos / coreHTTP WinSim Demos (push) Has been cancelled
Build FreeRTOS+ Demos / corePKCS11 WinSim Demos (push) Has been cancelled
Build FreeRTOS+ Demos / core Library Windows Simulator Demos (push) Has been cancelled
Build FreeRTOS+ Demos / AWS IoT Windows Simulator Demos (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+TCP Posix Simulator Demo (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+TCP QEMU ARM MPS2 AN385 (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+TCP Windows Simulator Demos (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+CLI Windows Simulator Demos (push) Has been cancelled
Kernel Unit Tests / FreeRTOS/Source Submodule Revision (push) Has been cancelled
Kernel Unit Tests / FreeRTOS-Kernel Main Branch (push) Has been cancelled
* Fix compiler warning "gcc -Wmissing-prototypes" in startup.c. * For "gcc -flto" fix duplicate labels in asm (startup.c) and mark some functions as "used" in startup.c and syscalls.c. * Fix "gcc -Wredundant-decls" in main.c. Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
This commit is contained in:
@@ -66,7 +66,7 @@ void Reset_Handler( void )
|
||||
_start();
|
||||
}
|
||||
|
||||
void prvGetRegistersFromStack( uint32_t * pulFaultStackAddress )
|
||||
__attribute__( ( used ) ) static void prvGetRegistersFromStack( uint32_t * pulFaultStackAddress )
|
||||
{
|
||||
/* These are volatile to try and prevent the compiler/linker optimizing them
|
||||
* away as the variables never actually get used. If the debugger won't show the
|
||||
@@ -196,7 +196,7 @@ void Debug_Handler( void )
|
||||
);
|
||||
}
|
||||
|
||||
const uint32_t * const isr_vector[] __attribute__( ( section( ".isr_vector" ) ) ) =
|
||||
const uint32_t * const isr_vector[] __attribute__( ( section( ".isr_vector" ), used ) ) =
|
||||
{
|
||||
( uint32_t * ) &_estack,
|
||||
( uint32_t * ) &Reset_Handler, /* Reset -15 */
|
||||
@@ -244,12 +244,12 @@ void exit( int status )
|
||||
__asm volatile (
|
||||
"mov r1, r0\n"
|
||||
"cmp r1, #0\n"
|
||||
"bne .notclean\n"
|
||||
"bne .notclean2\n"
|
||||
"ldr r1, =0x20026\n" /* ADP_Stopped_ApplicationExit, a clean exit */
|
||||
".notclean:\n"
|
||||
".notclean2:\n"
|
||||
"movs r0, #0x18\n" /* SYS_EXIT */
|
||||
"bkpt 0xab\n"
|
||||
"end: b end\n"
|
||||
"end2: b end2\n"
|
||||
".ltorg\n"
|
||||
);
|
||||
|
||||
|
||||
@@ -34,9 +34,6 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void vApplicationIdleHook( void );
|
||||
void vApplicationTickHook( void );
|
||||
|
||||
int main( void )
|
||||
{
|
||||
app_main();
|
||||
|
||||
@@ -90,7 +90,7 @@ static char * heap_end = ( char * ) &_heap_bottom;
|
||||
* @todo implement if necessary
|
||||
*
|
||||
*/
|
||||
int _fstat( int file )
|
||||
__attribute__( ( used ) ) int _fstat( int file )
|
||||
{
|
||||
( void ) file;
|
||||
return 0;
|
||||
@@ -101,7 +101,7 @@ int _fstat( int file )
|
||||
* @todo implement if necessary
|
||||
*
|
||||
*/
|
||||
int _read( int file,
|
||||
__attribute__( ( used ) ) int _read( int file,
|
||||
char * buf,
|
||||
int len )
|
||||
{
|
||||
@@ -119,7 +119,7 @@ int _read( int file,
|
||||
* @param [in] len length of the buffer
|
||||
* @returns the number of bytes written
|
||||
*/
|
||||
int _write( int file,
|
||||
__attribute__( ( used ) ) int _write( int file,
|
||||
char * buf,
|
||||
int len )
|
||||
{
|
||||
@@ -141,7 +141,7 @@ int _write( int file,
|
||||
* @returns the previous top of the heap
|
||||
* @note uses a global variable <b>heap_end</b> to keep track of the previous top
|
||||
*/
|
||||
void * _sbrk( int incr )
|
||||
__attribute__( ( used ) ) void * _sbrk( int incr )
|
||||
{
|
||||
void * prev_heap_end = heap_end;
|
||||
|
||||
@@ -155,12 +155,12 @@ void * _sbrk( int incr )
|
||||
return prev_heap_end;
|
||||
}
|
||||
|
||||
void _close( int fd )
|
||||
__attribute__( ( used ) ) void _close( int fd )
|
||||
{
|
||||
( void ) fd;
|
||||
}
|
||||
|
||||
int _lseek( int filedes,
|
||||
__attribute__( ( used ) ) int _lseek( int filedes,
|
||||
int offset,
|
||||
int whence )
|
||||
{
|
||||
@@ -171,7 +171,7 @@ int _lseek( int filedes,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _isatty()
|
||||
__attribute__( ( used ) ) int _isatty( void )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user