fix: Add big-endian support to ARM_CRx_No_GIC port

This change makes sure the Data endianness bit is set in the SPSR
register when the program is being compiled for big-endian.

Signed-off-by: Maxim De Clercq <maximdeclercq00@gmail.com>
This commit is contained in:
Maxim De Clercq 2026-01-08 14:58:35 +01:00
parent 1dbc77697f
commit 3169c924b4
No known key found for this signature in database
GPG key ID: D35643779C52BA70
2 changed files with 6 additions and 1 deletions

View file

@ -29,6 +29,7 @@ APIC
APROCFREQ
APSR
ARMCM
ARMEB
Armv
ARMVFP
ASTRINGZ

View file

@ -61,7 +61,11 @@
#define portNO_FLOATING_POINT_CONTEXT ( ( StackType_t ) 0 )
/* Constants required to setup the initial task context. */
#define portINITIAL_SPSR ( ( StackType_t ) 0x1f ) /* System mode, ARM mode, IRQ enabled FIQ enabled. */
#ifdef __ARMEB__
#define portINITIAL_SPSR ( ( StackType_t ) 0x21f ) /* System mode, ARM mode, IRQ enabled FIQ enabled, Big-endian. */
#else
#define portINITIAL_SPSR ( ( StackType_t ) 0x01f ) /* System mode, ARM mode, IRQ enabled FIQ enabled, Little-endian. */
#endif
#define portTHUMB_MODE_BIT ( ( StackType_t ) 0x20 )
#define portTHUMB_MODE_ADDRESS ( 0x01UL )