1
votes

just starting with FreeRTOS and I am having problem with task, so I thought it is the best time to start with learning debugging.

Trying to use Trace library to assess situation I got stuck on compilation process.

I am using CooCox IDE with ST-LinkV2. Target device is STM32F103C8T6. FreeRTOS is V8.2.2. Tracealyzer Recorder Library is v2.7.7.

Error is:

       [cc] c:/arm_development/gcc-arm-none-eabi-4_9-2015q1-20150306-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: FreeRTOSDemo.elf section `.bss' will not fit in region `ram'
       [cc] c:/arm_development/gcc-arm-none-eabi-4_9-2015q1-20150306-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region ram  overflowed with stack
       [cc] c:/arm_development/gcc-arm-none-eabi-4_9-2015q1-20150306-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `ram' overflowed by 6000 bytes
       [cc] collect2.exe: error: ld returned 1 exit status

BUILD FAILED
Total time: 11 seconds

Any hints on that matter would be helpful, tnx in advance.

1

1 Answers

1
votes

This is a basic tools question, not a FreeRTOS or FreeRTOS+Trace question, although you can fix it by changing the FreeRTOS configuration and/or FreeRTOS+Trace configuration.

The error is telling you that you have tried to use more RAM than the part you are using actually has, or at least, the amount of RAM you have told the linker your part actually has.

If you look at the map file for your application you will see which variables are consuming RAM. Probably the single largest will be the FreeRTOS heap. The FreeRTOS documentation tells you how to reduce that. Probably the second largest will be the trace buffer, and the trace configuration header file contains lots of documentation that will tell you how to reduce that.