Comments (3)
After writing the above, I noticed the setup_stack() function at the start of main(), which sets the stack up to the end of the SRAM area. I presume that it intended to compensate for attribute((naked)) in the definition of main(). So, then I guess the ICE in GCC occurs because GCC can't use a stack that has been set up manually?
I've had some partial success getting things to compile by creating a new main function that contains attribute((naked)) and attribute((used)) in the definition, and which only sets up the stack and calls out to another function that contains everything main used to contain. The idea being that the single call might be safe, and that the new function being called gets the regular prologue, epilogue and stack frame. This compiles, and partially works. I get it to flash the LEDs, but the program crashes when I introduce a call to LCD_GLASS_DisplayString().
LCD_GLASS_Init() and LCD_GLASS_Clear() do not crash.
from stlink.
It looks like the crash happens when stm32l_discovery_lcd.c calls out to LCD_UpdateDisplayRequest() in stm32l1xx_lcd.c.
from stlink.
Review: Does not seem to be related to the stlink-project.
from stlink.
Related Issues (20)
- stlink V3 mini not "usable" [Win7 64bit] HOT 1
- [feature] OTP Read/Write
- stlink-gui: failed to allocate 139988352155568 bytes HOT 1
- ST-LINK-V3MINIE: LIBUSB_ERROR_TIMEOUT only when debugger is powered without connection to target board HOT 2
- STLinkv3: UDEV rules in Debian not matching STLINK-V3MINIE HOT 1
- [STM32G0B1RE / Nucleo G0B1RE]: False chip id reading HOT 2
- [STM32F103] stlink programmers are disappearing after running probing twice. HOT 2
- [STM32U575RGT6]: Verification failed at offset 43008 HOT 9
- [feature] Show all info during full erase HOT 13
- Latest release stlink-1.8.0-win32 doesn't run HOT 8
- Can't build stlink 1.8.0 for Fedora HOT 8
- [feature] Caching and diffing bin/hex HOT 1
- Update on #1357 HOT 1
- [feature] Read/write operations on external SPI Serial Flash Memory HOT 1
- STM32H7A: Flash write fails on second page HOT 2
- Compiling stlink with Raspberry Pi fails for v1.8.0 HOT 2
- Cmake minimal version mismatch HOT 1
- Debian 11 x64 doesn't work with v1.8.0 because of incompatible glibc HOT 3
- When I build stlink on windows, it says libusb not found HOT 1
- [feature] Just a question .. about next release and ... clones ... HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stlink.