cancel
Showing results for 
Search instead for 
Did you mean: 

Using Eclipse and GCC, codes compiled, downloaded but does not work

Vu.Andy
Associate III
Posted on December 14, 2016 at 18:32

I was using Eclipse and GCC for the STM32F07x device.  The codes come from the STMCube F0 GPIO examples.   Everything was compiled.  I then use ST-Link utility to download the .hex file.  I verified that the codes downloaded correctly to the uC memory, but the codes do not seem to work. 

Does anybody know where I can start trouble shoot the codes?  Where should I look into first?

Thanks.

12 REPLIES 12
arturdav87
Associate II
Posted on December 15, 2016 at 17:42

1. When you create new  project make sure you entered right data.

2. Check your link files (*.ld). 

0690X00000605sWQAQ.png
Posted on December 15, 2016 at 18:01

GNU/GCC code is debuggable in Keil.

Use the debugger in the tool-chain of your choice and step the code to understand where it is failing. Most likely using the wrong instruction set setting, or an incompatible linker script or startup file.

And as Jan indicates there is a free license for Keil using STM Cortex-M0 devices.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on December 15, 2016 at 18:31

That's a good point.  I actually created a blank C project.  I used the .S and .ld files from the templates folder provided by STM.  I am looking to how to specify the .S file but I think Eclipse did compile the .S file in the project but I have to make sure.  I am trying to see where in the project that the .S file is explicitly specified. 

As for the Flash size and RAM size, I believe they are defined in the .ld file. 

As for Instruction set, should I specified Thumb (-mthumb) or ARM (-marm)?  Currently specified as Thumb.

Endianess : Toolchain default or Little endian or Big endian?

Unaligned access: Enable, disable, or toolchain default?