Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion platform/zynq-a9/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#define configUSE_TICKLESS_IDLE 0
#define configCPU_CLOCK_HZ 100000000UL
#define configTICK_RATE_HZ 1000
#define configMAX_PRIORITIES 8
#define configMAX_PRIORITIES 32
#define configMINIMAL_STACK_SIZE 256
#define configMAX_TASK_NAME_LEN 16
#define configIDLE_SHOULD_YIELD 1
Expand Down
2 changes: 1 addition & 1 deletion platform/zynq-a9/FreeRTOS_asm_vectors.S
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
.extern FreeRTOS_IRQ_Handler
.extern FreeRTOS_SWI_Handler

.section .freertos_vectors
.section .freertos_vectors, "ax"
_freertos_vector_table:
B _boot
B FreeRTOS_Undefined
Expand Down
5 changes: 3 additions & 2 deletions platform/zynq-a9/link.ld
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ SECTIONS
*(.boot)
} > DDR

.freertos_vectors : {
/* 32-byte aligned for ARM VBAR requirement */
.freertos_vectors : ALIGN(32) {
KEEP(*(.freertos_vectors))
KEEP(*(.vectors))
} > DDR

/* Executable code */
.text : {
.text : ALIGN(4) {
*(.text)
*(.text.*)
*(.gnu.linkonce.t.*)
Expand Down
14 changes: 11 additions & 3 deletions platform/zynq-a9/startup.S
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ _reset:
/* Disable interrupts */
cpsid if

/* Enable VFP/NEON (CP10 + CP11 full access) */
mrc p15, 0, r0, c1, c0, 2
orr r0, r0, #(0xF << 20)
mcr p15, 0, r0, c1, c0, 2
isb
mov r0, #(1 << 30) /* FPEXC.EN */
vmsr fpexc, r0

/* Set VBAR to FreeRTOS vector table */
ldr r0, =_freertos_vector_table
mcr p15, 0, r0, c12, c0, 0
Expand All @@ -64,9 +72,9 @@ _reset:
cps #0x1b
ldr sp, =__undef_stack

/* Switch to System mode (shared with User) */
cps #0x1f
ldr sp, =__stack
/* Switch to Supervisor mode — FreeRTOS ARM_CA9 port
* expects to start the scheduler from SVC mode. */
cps #0x13

/* Clear BSS */
ldr r0, =__bss_start
Expand Down
Loading