Am 18.02.2018 um 07:50 schrieb Georg Icking-Konert: > hello all, > > following a discussion on the updated STM8 SPL license (see > https://github.com/gicking/STM8-SPL_SDCC_patch/issues/1 ) I happened to > notice something strange: > > 1) build example including all SPL modules, where a pin toggles every 500ms > > - code adress range is 0x8000 to 0x1000c, i.e. >16-bit address range > > - according to map file, the topmost function starts at 0xFFE3, i.e. > within 16bit address range > > -> code works as expected > > 2) build example including all SPL modules, where byte is sent via UART > every 500ms > > - code adress range is 0x8000 to 0x10009, i.e. >16-bit address range > > - according to map file, the topmost function starts at 0xFFE0, i.e. > within 16bit address range > > -> code works as expected > > 3) add pin toggling from 1) to 2) > > - code adress range is 0x8000 to 0x1002c, i.e. >16-bit address range > > - according to map file, the topmost function starts at 0x10003, > i.e. outside 16bit address range > > -> no pin toggle, no UART output > > > I am using SDCC 3.6.0 #9615 (Linux) > > It appears to me as if code with function start addresses >16b fail, > while relative calls inside functions can exceed the 16b address range...? > > Is this just a mistake on my side (e.g. missing SDCC parameter), a known > limitation, or a bug? I know that the 8051 (w/o long calls) works around > this using code banking. From hardware side this is not required on the > STM8, but what about SDCC (coming from 8051)...? > > For your feedback thanks a lot in advance! > > Regards, > Georg
This is a known limitation. Currently, SDCC only supports 16-bit adresses for STM8, both for data and code. In particular, support for a larger memory model that uses 24-bit addresses for code or data is not yet implemented. Implementing support for 24-bit code addresses wouldn't be that hard. Implementing support for 24-bit data addresses would be more complicated. Philipp ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user