Skip to content

Commit 050ae6e

Browse files
committed
fix(build, freertos, linker): improve cmake config and adjust stack/heap settings.
1 parent ea9919c commit 050ae6e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ jobs:
2929
run: git clone https://github.com/Jiu-xiao/libxr.git
3030

3131
- name: Configure CMake
32-
run: cmake -B ${{github.workspace}}/build
32+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
3333

3434
- name: Build
3535
# Build your program with the given configuration
36-
run: cmake --build ${{github.workspace}}/build
36+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
3737

Core/FreeRTOSConfig.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
9797
#define configMAX_PRIORITIES ( 10 )
9898
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 384 ) /* Can be as low as 60 but some of the demo tasks that use this constant require it to be higher. */
99-
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 46 * 1024 ) )
99+
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) )
100100
#define configMAX_TASK_NAME_LEN ( 16 )
101101
#define configUSE_TRACE_FACILITY 1
102102
#define configUSE_16_BIT_TICKS 0
@@ -111,6 +111,7 @@
111111
#define configGENERATE_RUN_TIME_STATS 0
112112
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
113113
#define configRECORD_STACK_HIGH_ADDRESS 1
114+
#define configISR_STACK_SIZE_WORDS 256
114115

115116
/* Co-routine definitions. */
116117
#define configUSE_CO_ROUTINES 0

Link.ld

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,13 @@ SECTIONS
170170
PROVIDE( _end = _ebss);
171171
PROVIDE( end = . );
172172

173-
.stack ORIGIN(RAM) + LENGTH(RAM) - __stack_size :
173+
.stack :
174174
{
175175
PROVIDE( _heap_end = . );
176176
. = ALIGN(4);
177177
PROVIDE(_susrstack = . );
178178
. = . + __stack_size;
179179
PROVIDE( _eusrstack = .);
180-
__freertos_irq_stack_top = .;
181180
} >RAM
182181

183182
}

0 commit comments

Comments
 (0)