printf hardfault

Discuss how to use the features of Atollic TrueSTUDIO, including the editor, assembler, C/C++ compiler, linker, debugger, static code analysis and team collaboration tools.

Moderators: Markus Girdland, Mattias Norlander

nkeddem
Posts: 1
Joined: Mon Jan 21, 2019 4:57 pm

printf hardfault

Postby nkeddem » Mon Jan 21, 2019 5:04 pm

I am having hard faults related to using printf. I have tried increasing both stack and heap and still get errors? How big should these be for newlib standard? I have a project using the following configuration:
• Stm32L072RB
• Newlib Standard or Nano
• tiny_printf excluded

linker file:
/* Highest address of the user mode stack */
_estack = 0x20005000; /* end of 20K RAM */

/* Generate a link error if heap and stack don't fit into RAM */
_Min_Heap_Size = 0x800; /* required amount of heap */
_Min_Stack_Size = 0x800; /* required amount of stack */

/* Specify the memory areas */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 128K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K
}
pf01.JPG

pf02.JPG

pf03.JPG
You do not have the required permissions to view the files attached to this post.

Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: No registered users and 2 guests