cancel
Showing results for 
Search instead for 
Did you mean: 

Same Set of Code build with different Compiler not working in stm32l053 controllers

LRPS_92
Associate II
Posted on October 30, 2017 at 14:53

Hi,

I've finished building same code for a stm32l053R8 low power project using both IDE's Keil Microvision 5 & Atollic truestudio v5.5.2. Keil MicroVision project build works fine in all of our boards which we designed for the project. But Atollic build not working in some of our boards.

By switching the power, controllers flashed with keil microvision project .bin are starting from the main easily at the first attempt itself.

But, Atollic build .bin file is not getting into the main at the first attempt( requires NRST from debugger manually to reset properly & start from the main code). I've tried debugging using Atollic IDE, but it works fine, the code jumps to the main. Without debugger connected the codedoesn'trun.

What may be the reason for this kind of behaviour in controllers.?

Thanks in advance

#boot #stm32l053

Note: this post was migrated and contained many threaded conversations, some content may be missing.
15 REPLIES 15
Posted on October 31, 2017 at 14:26

I don't know how Cube plays into the differences between the Keil uVision built executable and the Atollic one.

But since you have a working project with a superior tool (also my opinion), why messing with Atollic ?

Isn't this wasted time & effort ?

Posted on October 31, 2017 at 14:57

>> I'm not using any iteration bounded clock startup code.

The Cube code has some of these, you should also look at what SystemInit() is doing.

>>

Linker Script (.ld) looks fine too from what i've seen, attached it for your consideration.

/* Highest address of the user mode stack */

_estack = 0x20002000; /* end of RAM */

That looks fine.

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

You shouldn't need to use printf(), the point of checkpoints is you can output single characters to confirm flow and arrival at certain points, and then focus on where it gets stuck, or what exactly is happening internally. ie A-Z

It might take a few dozen lines of assembler to set up the USART, and provide output functions, clocking from the HSI/MSI that is already running.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on November 01, 2017 at 06:58

My keil uVision5 license going to expire soon, so thought to port the source codes tosome other open sources.Crossworks is it licensed?

Posted on November 01, 2017 at 07:02

Hi Clive,

It is very bizarre, by reducing the clock source. I can get the code running at every attempt of power reset. Anyways i got the desired result, but i would love to debug in my leisure time.

Strange behaviour what may be the possible reason.

Posted on November 01, 2017 at 17:38

>>Crossworks is it licensed?

As you expect to get paid, people who provide you with tools and services also expected to get paid, and to pay their employees.

Free stuff should come with the expectation of zero support, where either you need to be self sustaining, or you pay going rates for support.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..