Hi, On Thu, Nov 19, 2020 at 8:33 AM Philipp Klaus Krause <p...@spth.de> wrote: > Am 18.11.20 um 23:10 schrieb Karsten Langeloh: > > The target mcu is a stm8s208. > > I have two files: main.c and isr.c > > I am using SDCC : hc08/s08/stm8 4.0.0 #11528 (Linux) on Gentoo Linux > > Compiling and linking works fine BUT: > > In the resulting s19 / lst / map files the vector table only has > > entries up to int14 (the one I defined) and directly after that the > > _GSINIT code begins - starting somewhere in the vector table ... > > This is done intentionally to save Flash space. To me, it looks like the > "reserved" entries are reserved use as interrupt vectors in future STM > devices, not "reserved" as in "no other use allowed by the user".
okay, well the amount of flash saved is really not that much. From experience I consider it good practise not to use any memory that is marked as "reserved" unless there is very reliable information that it is okay. In this particular case there are two other reasons: First being able to compare the generated code to some other which is definitely easier if the start addresses match. And the second is that for the system in general the vector table flash should be empty to be written (as from code running in ram) at a later point. And yes _that_ is a very special case. > > I could of course define a service routine for vector 24 (the last > > one) but there is still address space 0x806C to 0x807F that is marked > > as 'reserved' in the datasheet [1 p.47]. > > Does anyone know how I can get sdcc to put the code at address 0x8080? > > As Basil stated -Wl-bGSINIT=0x8080, is the easiest way. Thank you very much to both of you. This is exactly what I was looking for (and wonder why I didn't find it, now I see it in the help too ..) Well has something to do with trees and wood :) > ยน If you need a bigger stack, you can use SDCC's --stack-loc to place If I need a bigger stack, I will switch to STM32 ;) With the additional benefit of being able to use gcc with some current C++ Thanks again, Karsten _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user