This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

[Problem] SAMA5D27 Cortex-A5 cross compiler

Hello All

I am still a newbie to building using linix makefile cross compiling.

I have years of experience with Microchip but want to grow my knowledge in linux.

I have selected the SAMA5D27 that is part of the  ATSAMA5D27-WLSOM1-EK1 development board that has a Cortex-A5.

But I also want to implement FreeRTOS as later I want to try SafeRTOS.

I did look under the examples but even using eclipse I get the same error.

Below is my simple makefile for a starter:

#################################
# GNU ARM Embedded Toolchain
#################################
#COMP = arm-linux-gnueabi-gcc
COMP=arm-linux-gnueabi-gcc
#COMP=arm-elf-gcc

MPU_TARGET = -mcpu=cortex-a5 -Wall -fdata-sections -ffunction-sections
#MPU_TARGET = -mcpu=cortex-a5 -march=armv7-a -mfloat-abi=hard -mfpu=neon-fp-armv8 -mneon-for-64bits
#MPU_TARGET = -mcpu=sama5d27-som1-ek sama5d2-ptc-ek


#################################
# Include directories begin
#################################
#################################
# + Root directory
#################################
INCLUDE_DIR = -I./
#################################
# + FreeRTOS directory
#################################
INCLUDE_DIR += -I./include
INCLUDE_DIR += -I./portable/GCC/ARM_CA53_64_BIT

#################################
# Include directories end
#################################


SRC_DIR = $(wildcard *.c) 

OBJECT_DIR = ./obj
OBJ = $(patsubst %.c,%.o,$(wildcard *.c))

GCC : 
	$(COMP) $(MPU_TARGET) $(SRC_DIR) $(INCLUDE_DIR) 

But I keep on getting tmp/cc8qyeDo.s:1907: Error: selected processor does not support requested special purpose register -- `msr DAIFSET,#2'.

arm-linux-gnueabi-gcc -mcpu=cortex-a5 -Wall -fdata-sections -ffunction-sections stream_buffer.c queue.c croutine.c list.c event_groups.c tasks.c timers.c  -I./ -I./include -I./portable/GCC/ARM_CA53_64_BIT 
In file included from ./include/portable.h:53,
                 from ./include/FreeRTOS.h:65,
                 from stream_buffer.c:39:
./portable/GCC/ARM_CA53_64_BIT/portmacro.h:105: warning: "portDISABLE_INTERRUPTS" redefined
  105 | #define portDISABLE_INTERRUPTS()         \
      | 
In file included from ./include/FreeRTOS.h:59,
                 from stream_buffer.c:39:
./FreeRTOSConfig.h:42: note: this is the location of the previous definition
   42 | #define portDISABLE_INTERRUPTS
      | 
In file included from ./include/portable.h:53,
                 from ./include/FreeRTOS.h:65,
                 from queue.c:37:
./portable/GCC/ARM_CA53_64_BIT/portmacro.h:105: warning: "portDISABLE_INTERRUPTS" redefined
  105 | #define portDISABLE_INTERRUPTS()         \
      | 
In file included from ./include/FreeRTOS.h:59,
                 from queue.c:37:
./FreeRTOSConfig.h:42: note: this is the location of the previous definition
   42 | #define portDISABLE_INTERRUPTS
      | 
In file included from ./include/portable.h:53,
                 from ./include/FreeRTOS.h:65,
                 from croutine.c:29:
./portable/GCC/ARM_CA53_64_BIT/portmacro.h:105: warning: "portDISABLE_INTERRUPTS" redefined
  105 | #define portDISABLE_INTERRUPTS()         \
      | 
In file included from ./include/FreeRTOS.h:59,
                 from croutine.c:29:
./FreeRTOSConfig.h:42: note: this is the location of the previous definition
   42 | #define portDISABLE_INTERRUPTS
      | 
In file included from ./include/portable.h:53,
                 from ./include/FreeRTOS.h:65,
                 from list.c:37:
./portable/GCC/ARM_CA53_64_BIT/portmacro.h:105: warning: "portDISABLE_INTERRUPTS" redefined
  105 | #define portDISABLE_INTERRUPTS()         \
      | 
In file included from ./include/FreeRTOS.h:59,
                 from list.c:37:
./FreeRTOSConfig.h:42: note: this is the location of the previous definition
   42 | #define portDISABLE_INTERRUPTS
      | 
In file included from ./include/portable.h:53,
                 from ./include/FreeRTOS.h:65,
                 from event_groups.c:38:
./portable/GCC/ARM_CA53_64_BIT/portmacro.h:105: warning: "portDISABLE_INTERRUPTS" redefined
  105 | #define portDISABLE_INTERRUPTS()         \
      | 
In file included from ./include/FreeRTOS.h:59,
                 from event_groups.c:38:
./FreeRTOSConfig.h:42: note: this is the location of the previous definition
   42 | #define portDISABLE_INTERRUPTS
      | 
In file included from ./include/portable.h:53,
                 from ./include/FreeRTOS.h:65,
                 from tasks.c:39:
./portable/GCC/ARM_CA53_64_BIT/portmacro.h:105: warning: "portDISABLE_INTERRUPTS" redefined
  105 | #define portDISABLE_INTERRUPTS()         \
      | 
In file included from ./include/FreeRTOS.h:59,
                 from tasks.c:39:
./FreeRTOSConfig.h:42: note: this is the location of the previous definition
   42 | #define portDISABLE_INTERRUPTS
      | 
tasks.c: In function ‘prvInitialiseNewTask’:
tasks.c:871:46: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  871 |         pxTopOfStack = ( StackType_t * ) ( ( ( portPOINTER_SIZE_TYPE ) pxTopOfStack ) & ( ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) ) ); /*lint !e923 !e9033 !e9078 MISRA exception.  Avoiding casts between pointers and integers is not practical.  Size differences accounted for using portPOINTER_SIZE_TYPE type.  Checked by assert(). */
      |                                              ^
tasks.c:871:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  871 |         pxTopOfStack = ( StackType_t * ) ( ( ( portPOINTER_SIZE_TYPE ) pxTopOfStack ) & ( ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) ) ); /*lint !e923 !e9033 !e9078 MISRA exception.  Avoiding casts between pointers and integers is not practical.  Size differences accounted for using portPOINTER_SIZE_TYPE type.  Checked by assert(). */
      |                        ^
In file included from ./include/FreeRTOS.h:59,
                 from tasks.c:39:
tasks.c:874:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  874 |         configASSERT( ( ( ( portPOINTER_SIZE_TYPE ) pxTopOfStack & ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) == 0UL ) );
      |                           ^
./FreeRTOSConfig.h:157:34: note: in definition of macro ‘configASSERT’
  157 |  #define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled( __FILE__, __LINE__ );
      |                                  ^
/tmp/cc8qyeDo.s: Assembler messages:
/tmp/cc8qyeDo.s:1850: Error: selected processor does not support requested special purpose register -- `msr DAIFSET,#2'
/tmp/cc8qyeDo.s:1907: Error: selected processor does not support requested special purpose register -- `msr DAIFSET,#2'
In file included from ./include/portable.h:53,
                 from ./include/FreeRTOS.h:65,
                 from timers.c:37:
./portable/GCC/ARM_CA53_64_BIT/portmacro.h:105: warning: "portDISABLE_INTERRUPTS" redefined
  105 | #define portDISABLE_INTERRUPTS()         \
      | 
In file included from ./include/FreeRTOS.h:59,
                 from timers.c:37:
./FreeRTOSConfig.h:42: note: this is the location of the previous definition
   42 | #define portDISABLE_INTERRUPTS
      | 
make: *** [Makefile:37: GCC] Error 1

Think I just need to get pointed into the right direction with the correct cross compiler to use. And also the appropriate flags.

If listed. Please also just a brief installation help as I am still new to Linux-mint and learning.

Thank you in advance.

GreenDragonZA