cancel
Showing results for 
Search instead for 
Did you mean: 

HardFault with DEBUG switch

cmaree
Associate
Posted on June 05, 2009 at 09:11

HardFault with DEBUG switch

1 REPLY 1
cmaree
Associate
Posted on May 17, 2011 at 13:14

During debugging my LED flasher using the STM FW library 2.0.3 GPIO functions, I found that when I UNcomment the

#define DEBUG 1

line in the stm32f10x_conf.h file (about line 28) to enable the debug code, my STM32F103VB throws a HardFault exception right at start-up before executing any ''debug'' code! Leaving this line commented out, removes the problem and everything works well.

Can anybody provide a solid reason for this??

I'm not comfortable with just ignoring the issue even though I don't need the debug code (yet?).

A few more notes on this:

1) The application size is quite small (only the GPIO code) and uses a fraction of the memory and storage.

2) Obviously, I removed the IDE's (Rowley's CrossStudio) ''debug switch''.