mirror of
				https://github.com/FreeRTOS/FreeRTOS-Kernel.git
				synced 2025-11-04 11:09:01 +01:00 
			
		
		
		
	Add definition of portDONT_DISCARD to ARMv7-M ports (#50)
Enabling Link Time Optimization (LTO) causes some of the functions used in assembly to be incorrectly stripped off, resulting in linker error. To avoid this, these functions are marked with portDONT_DISCARD macro, definition of which is port specific. This commit adds the definition of portDONT_DISCARD for ARMv7-M ports. Signed-off-by: Gaurav Aggarwal
This commit is contained in:
		
							parent
							
								
									334de5d8ab
								
							
						
					
					
						commit
						07e672c448
					
				@ -73,6 +73,7 @@ typedef unsigned long UBaseType_t;
 | 
			
		||||
#define portSTACK_GROWTH			( -1 )
 | 
			
		||||
#define portTICK_PERIOD_MS			( ( TickType_t ) 1000 / configTICK_RATE_HZ )
 | 
			
		||||
#define portBYTE_ALIGNMENT			8
 | 
			
		||||
#define portDONT_DISCARD			__attribute__(( used ))
 | 
			
		||||
/*-----------------------------------------------------------*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -73,6 +73,7 @@ typedef unsigned long UBaseType_t;
 | 
			
		||||
#define portSTACK_GROWTH			( -1 )
 | 
			
		||||
#define portTICK_PERIOD_MS			( ( TickType_t ) 1000 / configTICK_RATE_HZ )
 | 
			
		||||
#define portBYTE_ALIGNMENT			8
 | 
			
		||||
#define portDONT_DISCARD			__attribute__(( used ))
 | 
			
		||||
/*-----------------------------------------------------------*/
 | 
			
		||||
 | 
			
		||||
/* Scheduler utilities. */
 | 
			
		||||
 | 
			
		||||
@ -109,6 +109,7 @@ typedef struct MPU_SETTINGS
 | 
			
		||||
#define portSTACK_GROWTH			( -1 )
 | 
			
		||||
#define portTICK_PERIOD_MS			( ( TickType_t ) 1000 / configTICK_RATE_HZ )
 | 
			
		||||
#define portBYTE_ALIGNMENT			8
 | 
			
		||||
#define portDONT_DISCARD			__attribute__(( used ))
 | 
			
		||||
/*-----------------------------------------------------------*/
 | 
			
		||||
 | 
			
		||||
/* SVC numbers for various services. */
 | 
			
		||||
 | 
			
		||||
@ -73,6 +73,7 @@ typedef unsigned long UBaseType_t;
 | 
			
		||||
#define portSTACK_GROWTH			( -1 )
 | 
			
		||||
#define portTICK_PERIOD_MS			( ( TickType_t ) 1000 / configTICK_RATE_HZ )
 | 
			
		||||
#define portBYTE_ALIGNMENT			8
 | 
			
		||||
#define portDONT_DISCARD			__attribute__(( used ))
 | 
			
		||||
/*-----------------------------------------------------------*/
 | 
			
		||||
 | 
			
		||||
/* Scheduler utilities. */
 | 
			
		||||
 | 
			
		||||
@ -109,6 +109,7 @@ typedef struct MPU_SETTINGS
 | 
			
		||||
#define portSTACK_GROWTH			( -1 )
 | 
			
		||||
#define portTICK_PERIOD_MS			( ( TickType_t ) 1000 / configTICK_RATE_HZ )
 | 
			
		||||
#define portBYTE_ALIGNMENT			8
 | 
			
		||||
#define portDONT_DISCARD			__attribute__(( used ))
 | 
			
		||||
/*-----------------------------------------------------------*/
 | 
			
		||||
 | 
			
		||||
/* SVC numbers for various services. */
 | 
			
		||||
 | 
			
		||||
@ -73,6 +73,7 @@ typedef unsigned long UBaseType_t;
 | 
			
		||||
#define portSTACK_GROWTH			( -1 )
 | 
			
		||||
#define portTICK_PERIOD_MS			( ( TickType_t ) 1000 / configTICK_RATE_HZ )
 | 
			
		||||
#define portBYTE_ALIGNMENT			8
 | 
			
		||||
#define portDONT_DISCARD			__attribute__(( used ))
 | 
			
		||||
/*-----------------------------------------------------------*/
 | 
			
		||||
 | 
			
		||||
/* Scheduler utilities. */
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user