![stm8 cosmic .bss size overflow stm8 cosmic .bss size overflow](http://6.eewimg.cn/news/uploadfile/2021/1021/1634785427527065.png)
The GCC docs allude to possibly optimizing calls to be short when the jump distance is small enough - it clearly wasn't doing this, as noted by inspecting the listing files.
![stm8 cosmic .bss size overflow stm8 cosmic .bss size overflow](https://www.stmcu.org.cn/module/forum/data/attachment/forum/201501/05/170022flbx5hc4izg475zf.jpg)
This way more than one function could be tried for each compile cycle. Every so often the loop expired, and the pushbuttons were read. I cobbled a simple benchmark: basically two different functions: a short simple loop that did little more than toggle one of the LEDs and a slightly longer one that intentionally jumped around a bit in addition to toggling the same LED. You also have to specify -mlong-calls as GCC option and mark the functions you want in RAM like this: _heap_end_ = _ram_end_ - _stacks_total_size_ You should have received a copy of the GNU General Public License GNU General Public License for more details. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#STM8 COSMIC .BSS SIZE OVERFLOW SOFTWARE#
The Free Software Foundation either version 3 of the License, orĬhibiOS/RT is distributed in the hope that it will be useful,īut WITHOUT ANY WARRANTY without even the implied warranty of It under the terms of the GNU General Public License as published by
#STM8 COSMIC .BSS SIZE OVERFLOW CODE#
No compiler, assembler, or linker errors.Įyeballing the code and listings has been fruitless.Īny thoughts regarding what might cause this problem? Regrettably I don't think I can meaningfully run insight since this does not happen when everything starts out running in ram.ĬhibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.ĬhibiOS/RT is free software you can redistribute it and/or modify The startup code is very close to that shown in the embedded systems series of articles for bare-metal system development, with appropriate translations for the LPC2148. However most combinations of running out ram will fail in various ways that suggest that some call or return has failed.Ĭross-compiled on Debian/Linux-testing: binutils-2.17, gcc-4.1.1 (also tried gcc-4.2.0). It will even run properly when some of the do-nothing functions are set up to run out of ram. When everything is compiled to run out of flash, it works perfectly. It is split into several functions, and runs in a loop. It reads the pushbuttons and turns the two LEDs on and off. I have a mostly super-simple program that I program into an Olimex LPC-P2148 with an ARM-USB-OCD.