Search found 5 matches

by antm
Tue Mar 12, 2019 11:16 am
Forum: Embedded target code development discussions
Topic: Heap not work
Replies: 2
Views: 473

Re: Heap not work

I'd suggest looking in the linker file for something like this: _Min_Heap_Size = 0x200; /* required amount of heap */ sbrk will need to know where the end of the heap is, so you will need a variable defined correctly. I don't use the standard dynamic memory allocation myself, so the function below i...
by antm
Tue Mar 12, 2019 9:43 am
Forum: Embedded target code development discussions
Topic: Trouble getting printf() redirection using SWV/ITM to work
Replies: 5
Views: 829

Re: Trouble getting printf() redirection using SWV/ITM to work

You could also try poking the registers directly to see if that helps: /* Debug MCU registers base address */ #define DBGMCU ((DBGMCU_TypeDef *) DBGMCU_BASE) #define SWO_SPEED 2000000 static uint32_t CPUClockFrequencyInHz(void) { return(HAL_RCC_GetHCLKFreq()); } void KernelDebugITM_Init(void) { cons...
by antm
Tue Mar 12, 2019 9:40 am
Forum: Embedded target code development discussions
Topic: Trouble getting printf() redirection using SWV/ITM to work
Replies: 5
Views: 829

Re: Trouble getting printf() redirection using SWV/ITM to work

Maybe make sure the SWO pin is set correctly in CubeMX, and if any jumpers are required on the dev board.

I have had it working on an F7 Nucleo board, but I found that on a F401 Nucleo board it just does not work.

SWO.PNG
by antm
Mon Mar 11, 2019 3:08 pm
Forum: Atollic TrueSTUDIO tool discussions
Topic: Wrapping malloc and free
Replies: 1
Views: 392

Re: Wrapping malloc and free

To answer my own question, the code is correct.

The linker options need to be added under settings->Tool Settings-> C Linker->Miscellaneous

Other options

-Wl,--wrap=malloc, -Wl,--wrap=free

This works.
by antm
Mon Mar 11, 2019 10:45 am
Forum: Atollic TrueSTUDIO tool discussions
Topic: Wrapping malloc and free
Replies: 1
Views: 392

Wrapping malloc and free

Atollic Truestudio v 9.3.0 Project generated using STM32 CubeMX v5.1.0 Hi, I'm working on a project using STM32 and FreeRTOS, I would like to make sure that any calls to malloc and free in the application actually call the FreeRTOS memory allocation functions. So, I have the following code in a file...

Go to advanced search