Place main and tasks stacks in CCM
This commit is contained in:
committed by
Raphael Coeffic
parent
c1979338ab
commit
836733618c
@@ -61,6 +61,12 @@
|
|||||||
#define __DMA __ALIGNED(4)
|
#define __DMA __ALIGNED(4)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CCMRAM) && !defined(SIMU)
|
||||||
|
#define __CCMRAM __attribute__((section(".ccm"), aligned(4)))
|
||||||
|
#else
|
||||||
|
#define __CCMRAM
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(SDRAM) && !defined(SIMU)
|
#if defined(SDRAM) && !defined(SIMU)
|
||||||
#define __SDRAM __attribute__((section(".sdram"), aligned(4)))
|
#define __SDRAM __attribute__((section(".sdram"), aligned(4)))
|
||||||
#define __NOINIT __attribute__((section(".noinit")))
|
#define __NOINIT __attribute__((section(".noinit")))
|
||||||
|
|||||||
+2
-1
@@ -296,7 +296,8 @@ template<int SIZE>
|
|||||||
return (RTOS_GET_TIME() * RTOS_MS_PER_TICK);
|
return (RTOS_GET_TIME() * RTOS_MS_PER_TICK);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define RTOS_DEFINE_STACK(name, size) TaskStack<size> __ALIGNED(8) name // stack must be aligned to 8 bytes otherwise printf for %f does not work!
|
// stack must be aligned to 8 bytes otherwise printf for %f does not work!
|
||||||
|
#define RTOS_DEFINE_STACK(name, size) TaskStack<size> __ALIGNED(8) name __CCMRAM
|
||||||
|
|
||||||
#define TASK_FUNCTION(task) void task(void * pdata)
|
#define TASK_FUNCTION(task) void task(void * pdata)
|
||||||
#define TASK_RETURN() return
|
#define TASK_RETURN() return
|
||||||
|
|||||||
@@ -155,11 +155,12 @@ set(RADIO_DEPENDENCIES
|
|||||||
|
|
||||||
set(FIRMWARE_DEPENDENCIES datacopy)
|
set(FIRMWARE_DEPENDENCIES datacopy)
|
||||||
|
|
||||||
add_definitions(-DPCBHORUS -DSTM32F429_439xx -DSDRAM -DCOLORLCD -DHARDWARE_KEYS)
|
add_definitions(-DPCBHORUS -DSTM32F429_439xx -DSDRAM -DCCMRAM -DCOLORLCD -DHARDWARE_KEYS)
|
||||||
add_definitions(-DEEPROM_VARIANT=0 -DAUDIO -DVOICE -DRTCLOCK)
|
add_definitions(-DEEPROM_VARIANT=0 -DAUDIO -DVOICE -DRTCLOCK)
|
||||||
add_definitions(-DGPS_USART_BAUDRATE=${INTERNAL_GPS_BAUDRATE})
|
add_definitions(-DGPS_USART_BAUDRATE=${INTERNAL_GPS_BAUDRATE})
|
||||||
add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
|
add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
|
||||||
add_definitions(-DHARDWARE_TRAINER_JACK)
|
add_definitions(-DHARDWARE_TRAINER_JACK)
|
||||||
|
|
||||||
set(SDRAM ON)
|
set(SDRAM ON)
|
||||||
|
|
||||||
if(DEFAULT_THEME)
|
if(DEFAULT_THEME)
|
||||||
|
|||||||
@@ -105,6 +105,16 @@ SECTIONS
|
|||||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
|
.ccm_ram (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_sccm_ram = .;
|
||||||
|
*(.ccm)
|
||||||
|
. = ALIGN(4);
|
||||||
|
. = . + _Main_Stack_Size;
|
||||||
|
_eccm_ram = .;
|
||||||
|
} >CCM
|
||||||
|
|
||||||
/* used by the startup to initialize data */
|
/* used by the startup to initialize data */
|
||||||
_sidata = .;
|
_sidata = .;
|
||||||
|
|
||||||
@@ -140,7 +150,7 @@ SECTIONS
|
|||||||
*(.noinit)
|
*(.noinit)
|
||||||
} >RAM
|
} >RAM
|
||||||
|
|
||||||
/* collect all uninitialized .ccm sections */
|
/* collect all uninitialized .ram sections */
|
||||||
.ram (NOLOAD) :
|
.ram (NOLOAD) :
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
@@ -153,7 +163,6 @@ SECTIONS
|
|||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
. = . + _Min_Heap_Size;
|
. = . + _Min_Heap_Size;
|
||||||
. = . + _Main_Stack_Size;
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
} >RAM
|
} >RAM
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user