A
A
Anatly Petrov2015-05-27 23:58:35
C++ / C#
Anatly Petrov, 2015-05-27 23:58:35

Strange behavior of STM32L152RB in different batches(?), what value of _estack should be in ld script?

There are 2 boards, they are electrically identical. Chip markings:

//4000
STM32L152 RBT6
GH24F VG
CHN GN 425

to another
//3FFF
STM32L152 RBT6
GH244 VG
CHN GH 412

The firmware is written under Linux in C++ and compiled using GCC.
In order for the firmware to work on the first script in ld ( I took it here ), the parameter _estack = 0x20004000, but the firmware with such parameters does not work as it should (the GPIOC ports do not work, but for example USART works on GPIOA and other pins) on the second chip. Then somewhere I came across someone's code for stm32l152 and there the address was _estack = 0x20003FFF and the firmware started up with it. I have no idea why.
The st-term utility from this repo produces the same output on both chips:
$ st-term
ST-Linky proof-of-concept terminal :: Created by Necromant for lulz
chip id: 0x416
core_id: 0x2ba01477
cpuid:impl_id=0x41, variant=0x2
cpuid:part=0xc23, rev=0
sram: 0x20000000 [email protected] 0x4000
stlinky magic not found in sram :(

//I used it to display information about the chip
What information should I add?
Tell me where to find information about addressing and why it behaves so strangely.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2015-05-28
@jcmvbkbc

We need to look at exactly how the _estack symbol is used by the code.
Look for an object or lib with a reference to this symbol as undefined and look in the source or disassembler.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question